Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update build test workflow #1732

Merged
merged 1 commit into from
Sep 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 2 additions & 56 deletions .github/workflows/build-test-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -213,55 +213,6 @@ jobs:
retention-days: 2
if-no-files-found: error

upload_gcs:
# TODO: nuke this after refactoring carvel CI
runs-on: ubuntu-latest
name: Upload manifests to GCS
if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/v') }}
needs:
- build_operator
permissions:
contents: 'read'
id-token: 'write'
env:
image_version: ${{ needs.build_operator.outputs.image_tag }}
steps:
- name: Download Operator manifests
uses: actions/download-artifact@v4
with:
name: operator-manifests
path: releases/
- name: Rename manifest for GCS
run: mv releases/cluster-operator.yml cluster-operator-${{ env.image_version }}.yml

- id: auth
name: Auth to Google Cloud
uses: 'google-github-actions/auth@v2'
with:
workload_identity_provider: ${{ secrets.GCP_IDENTITY_PROVIDER }}
service_account: ${{ secrets.GCP_SA }}

- name: Upload manifests to GCS
uses: google-github-actions/upload-cloud-storage@v2
with:
path: cluster-operator-${{ env.image_version }}.yml
destination: operator-manifests-dev

- name: Update carvel-packaging-dev pipeline trigger
uses: google-github-actions/upload-cloud-storage@v2
with:
path: latest-cluster-operator-dev-manifest.txt
destination: operator-manifests-dev
process_gcloudignore: false

- name: Notify Google Chat
if: failure()
uses: SimonScholz/google-chat-action@main
with:
webhookUrl: '${{ secrets.GOOGLE_CHAT_WEBHOOK_URL }}'
jobStatus: ${{ job.status }}
title: Cluster Operator - Build and push operator

build_operator_single_arch_amd64:
name: Build single-arch AMD64 image
if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/v') }}
Expand All @@ -278,7 +229,6 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: OCI Metadata for single-arch amd64 image
#if: startsWith(github.ref, 'refs/tags/v')
id: single-arch-meta-amd64
uses: docker/metadata-action@v5
with:
Expand Down Expand Up @@ -336,7 +286,6 @@ jobs:

- name: Build and push single-arch arm64 image
if: github.event_name != 'pull_request'
#if: startsWith(github.ref, 'refs/tags/v')
uses: docker/build-push-action@v6
with:
context: .
Expand Down Expand Up @@ -402,7 +351,8 @@ jobs:
env:
KIND_NODE_IMAGE: ${{ env.KIND_NODE_IMAGE }}
RABBITMQ_IMAGE: ${{ matrix.rabbitmq-image }}
# make deploy-kind builds the image locally
# 'make deploy-kind' builds the image locally. We should avoid using that target, because we have already built
# the image in a previous job
run: |
make cert-manager
SUPPORT_VOLUME_EXPANSION=false make system-tests
Expand Down Expand Up @@ -481,10 +431,6 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.event_name != 'pull_request' }}
needs: build_operator
permissions:
# Required by google-github-actions/auth@v2
# Required by google-github-actions/get-gke-credentials@v2
id-token: 'write'
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
Expand Down
Loading