From b75752b828411193f9263cb9572000f7700dd0c4 Mon Sep 17 00:00:00 2001 From: -z <11802769+Aloento@users.noreply.github.com> Date: Wed, 23 Sep 2026 02:05:14 +0200 Subject: [PATCH] chore: migrate CI from Zuul to GitHub Actions The eco2 jobs fail before reaching the code: the rust pre-run in zuul-infra references a missing ensure-rust role, and the builder node is unreachable. Build the image on pull requests and push change__latest on merge instead, then drop zuul.yaml. --- .github/workflows/docker-build.yaml | 57 +++++++++++++++++++++++++++++ zuul.yaml | 33 ----------------- 2 files changed, 57 insertions(+), 33 deletions(-) create mode 100644 .github/workflows/docker-build.yaml delete mode 100644 zuul.yaml diff --git a/.github/workflows/docker-build.yaml b/.github/workflows/docker-build.yaml new file mode 100644 index 0000000..007653d --- /dev/null +++ b/.github/workflows/docker-build.yaml @@ -0,0 +1,57 @@ +name: Docker Image Build + +on: + pull_request: + types: + - opened + - reopened + - synchronize + - closed + +env: + REGISTRY: quay.io + IMAGE: quay.io/stackmon/metrics-processor + +jobs: + build: + if: github.event.pull_request.merged != true + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v7 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Build image + uses: docker/build-push-action@v7 + with: + context: . + target: metrics-processor + push: false + + push_if_merged: + # The tag is pinned by stackmon-config/config.yaml, keep change__latest. + if: github.event.pull_request.merged == true + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v7 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to Container Registry + uses: docker/login-action@v4 + with: + registry: ${{ env.REGISTRY }} + username: ${{ secrets.REGISTRY_USER }} + password: ${{ secrets.REGISTRY_PASSWORD }} + + - name: Build and push + uses: docker/build-push-action@v7 + with: + context: . + target: metrics-processor + push: true + tags: ${{ env.IMAGE }}:change_${{ github.event.pull_request.number }}_latest diff --git a/zuul.yaml b/zuul.yaml deleted file mode 100644 index 2ed98d3..0000000 --- a/zuul.yaml +++ /dev/null @@ -1,33 +0,0 @@ -- job: - name: cloudmon-metrics-processor-build-image - parent: otc-build-container-image - description: Build cloudmon-metrics container image - provides: cloudmon-metrics-container-image - vars: &cloudmon-metrics_image_vars - container_images: - - context: . - registry: quay.io - repository: stackmon/metrics-processor - target: metrics-processor - tags: - &imagetag "{{ zuul.tag is defined | ternary([zuul.get('tag', '').split('.')[0], '.'.join(zuul.get('tag', '').split('.')[:2]), zuul.get('tag', '')], ['latest']) }}" - -- job: - name: cloudmon-metrics-processor-upload-image - parent: stackmon-upload-container-images - provides: cloudmon-metrics-processor-container-image - vars: *cloudmon-metrics_image_vars - -- project: - merge-mode: squash-merge - default-branch: main - check: - jobs: - - rust-build - - rust-test - - cloudmon-metrics-processor-build-image - gate: - jobs: - - rust-build - - rust-test - - cloudmon-metrics-processor-upload-image