XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Buildbot
    • None

    Description

      > What are some good options for getting the mariadb operator to run on the images generated in CI? How would the image be places in a testable location?

      As long as the images are available in a registry that is accessible from the GitHub runners, it should be doable one way or another. I'm conscious we might need credentials. I guess this registry might be the quay.io you mentioned?

      > What is required to trigger the tests?

      At the moment the operator tests are only triggered by PRs in our repo. But we can make this tests available in a separate workflow and give you credentials to trigger the GitHub action remotely. Here an example. If you don't want to install the GH client, it also has an HTTP API to trigger a workflow.

      We can pass the image to test as an argument of the GitHub action, which later on is used as part of the tests.

      > Can the CI results end up back in buildbot?

      Can we submit test results via an API or similar to buildbot? We could capture the exit code of the tests and ship the logs

      From martin.montes:

      I've just created the GitHub actions workflows so you can remotely run the operator tests to validate the images.

      Test image: This is used to verify if a image is compatible with the community operator. It can be invoked using this script.

      #!/bin/bash
       
      set -eo pipefail
       
      # usage: GHA_TOKEN="$GHA_TOKEN" MARIADB_IMAGE="mariadb:10.11.7" test_image.sh
       
      if [ -z "$GHA_TOKEN" ]; then 
        echo "GHA_TOKEN environment variable is mandatory"
        exit 1
      fi
      if [ -z "$MARIADB_IMAGE" ]; then 
        echo "MARIADB_IMAGE environment variable is mandatory"
        exit 1
      fi
       
      curl -L \
        -X POST \
        -H "Accept: application/vnd.github+json" \
        -H "Authorization: Bearer $GHA_TOKEN" \
        -H "X-GitHub-Api-Version: 2022-11-28" \
        https://api.github.com/repos/mariadb-operator/mariadb-operator/actions/workflows/test-image.yml/dispatches \
        -d "{\"ref\":\"main\",\"inputs\":{\"mariadb_image\":\"$MARIADB_IMAGE\"}}"
      

      trigger 1: buildbot amd64-rhel8-dockerlibrary pushing amd64 image in a manifest
      trigger 2: github mariadb-docker master branch - push to registry and trigger https://github.com/MariaDB/mariadb-docker/blob/master/.github/workflows/ci.yml
      trigger 3; github mariadb-docker -next branch - use https://ci.mariadb.org/$mainbranch-latest-amd64-$baseimage - to build/test and push to repo and trigger.

      Attachments

        Activity

          People

            Unassigned Unassigned
            danblack Daniel Black
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0d
                0d
                Logged:
                Time Spent - 0.75d
                0.75d