From 88cd5c07e50c2ceca3a6ab0cddbf1b0bffb1e1bb Mon Sep 17 00:00:00 2001 From: michaelawyu Date: Wed, 17 Sep 2025 10:18:21 +1000 Subject: [PATCH 1/5] Minor fixes Signed-off-by: michaelawyu --- .github/workflows/build-publish-mcr.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-publish-mcr.yml b/.github/workflows/build-publish-mcr.yml index bbb5ec15e..14b01b5ae 100644 --- a/.github/workflows/build-publish-mcr.yml +++ b/.github/workflows/build-publish-mcr.yml @@ -59,7 +59,7 @@ jobs: labels: [self-hosted, "1ES.Pool=1es-aks-fleet-pool-ubuntu"] needs: prepare-variables steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v4 with: ref: ${{ needs.prepare-variables.outputs.release_tag }} - name: 'Login the ACR' @@ -115,6 +115,9 @@ jobs: - uses: actions/checkout@v5 with: ref: ${{ needs.prepare-variables.outputs.release_tag }} + - name: 'Install the Azure CLI' + run: + curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash - name: 'Login the ACR' run: | az login --identity From 18fdb38d5266435471d2fd12ec25d9a092178044 Mon Sep 17 00:00:00 2001 From: michaelawyu Date: Wed, 17 Sep 2025 10:32:55 +1000 Subject: [PATCH 2/5] Experimental Signed-off-by: michaelawyu --- .github/workflows/build-publish-mcr.yml | 88 +------------------------ 1 file changed, 1 insertion(+), 87 deletions(-) diff --git a/.github/workflows/build-publish-mcr.yml b/.github/workflows/build-publish-mcr.yml index 14b01b5ae..88c68897c 100644 --- a/.github/workflows/build-publish-mcr.yml +++ b/.github/workflows/build-publish-mcr.yml @@ -3,11 +3,7 @@ name: Building and Pushing to MCR on: - workflow_dispatch: - inputs: - releaseTag: - description: 'Release tag to publish images, defaults to the latest one' - type: string + push permissions: id-token: write @@ -54,59 +50,6 @@ jobs: # NOTE: As exporting a variable from a secret is not possible, the shared variable registry obtained # from AZURE_REGISTRY secret is not exported from here. - publish-images-amd64: - runs-on: - labels: [self-hosted, "1ES.Pool=1es-aks-fleet-pool-ubuntu"] - needs: prepare-variables - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ needs.prepare-variables.outputs.release_tag }} - - name: 'Login the ACR' - run: | - az login --identity - az acr login -n ${{ secrets.AZURE_REGISTRY }} - - name: Build and publish hub-agent - run: | - make docker-build-hub-agent - env: - HUB_AGENT_IMAGE_VERSION: ${{ needs.prepare-variables.outputs.release_tag }}-amd64 - REGISTRY: ${{ secrets.AZURE_REGISTRY }}/${{ env.REGISTRY_REPO}} - - name: Build and publish member-agent - run: | - make docker-build-member-agent - env: - MEMBER_AGENT_IMAGE_VERSION: ${{ needs.prepare-variables.outputs.release_tag }}-amd64 - REGISTRY: ${{ secrets.AZURE_REGISTRY }}/${{ env.REGISTRY_REPO}} - - name: Build and publish refresh-token - run: | - make docker-build-refresh-token - env: - REFRESH_TOKEN_IMAGE_VERSION: ${{ needs.prepare-variables.outputs.release_tag }}-amd64 - REGISTRY: ${{ secrets.AZURE_REGISTRY }}/${{ env.REGISTRY_REPO}} - - name: Build and publish crd-installer - run: | - make docker-build-crd-installer - env: - CRD_INSTALLER_IMAGE_VERSION: ${{ needs.prepare-variables.outputs.release_tag }}-amd64 - REGISTRY: ${{ secrets.AZURE_REGISTRY }}/${{ env.REGISTRY_REPO}} - # Build Arc Extension for member clusters - # Arc-connected clusters can join fleets as member clusters through an Arc Extension. - # An Arc Extension is a packaged Helm chart that gets deployed to Arc clusters. - # This step packages both the fleet member agent and networking agents into a single - # Helm chart for Arc deployment, since Arc Extensions require all components to be bundled together. - - name: Build and publish ARC member cluster agents helm chart - run: | - make helm-package-arc-member-cluster-agents - env: - ARC_MEMBER_AGENT_HELMCHART_VERSION: ${{ needs.prepare-variables.outputs.arc_helmchart_version }} - MEMBER_AGENT_IMAGE_VERSION: ${{ needs.prepare-variables.outputs.release_tag }} - REFRESH_TOKEN_IMAGE_VERSION: ${{ needs.prepare-variables.outputs.release_tag }} - CRD_INSTALLER_IMAGE_VERSION: ${{ needs.prepare-variables.outputs.release_tag }} - MCS_CONTROLLER_IMAGE_VERSION: ${{ needs.prepare-variables.outputs.fleet_networking_version }} - MEMBER_NET_CONTROLLER_IMAGE_VERSION: ${{ needs.prepare-variables.outputs.fleet_networking_version }} - REGISTRY: ${{ secrets.AZURE_REGISTRY }}/${{ env.ARC_REGISTRY_REPO}} - publish-images-arm64: runs-on: labels: [self-hosted, "1ES.Pool=1es-aks-fleet-pool-ubuntu-arm64"] @@ -121,32 +64,3 @@ jobs: - name: 'Login the ACR' run: | az login --identity - az acr login -n ${{ secrets.AZURE_REGISTRY }} - - name: Build and publish hub-agent - run: | - make docker-build-hub-agent - env: - HUB_AGENT_IMAGE_VERSION: ${{ needs.prepare-variables.outputs.release_tag }}-arm64 - REGISTRY: ${{ secrets.AZURE_REGISTRY }}/${{ env.REGISTRY_REPO}} - TARGET_ARCH: arm64 - - name: Build and publish member-agent - run: | - make docker-build-member-agent - env: - MEMBER_AGENT_IMAGE_VERSION: ${{ needs.prepare-variables.outputs.release_tag }}-arm64 - REGISTRY: ${{ secrets.AZURE_REGISTRY }}/${{ env.REGISTRY_REPO}} - TARGET_ARCH: linux/arm64 - - name: Build and publish refresh-token - run: | - make docker-build-refresh-token - env: - REFRESH_TOKEN_IMAGE_VERSION: ${{ needs.prepare-variables.outputs.release_tag }}-arm64 - REGISTRY: ${{ secrets.AZURE_REGISTRY }}/${{ env.REGISTRY_REPO}} - TARGET_ARCH: arm64 - - name: Build and publish crd-installer - run: | - make docker-build-crd-installer - env: - CRD_INSTALLER_IMAGE_VERSION: ${{ needs.prepare-variables.outputs.release_tag }}-arm64 - REGISTRY: ${{ secrets.AZURE_REGISTRY }}/${{ env.REGISTRY_REPO}} - TARGET_ARCH: arm64 From 6ac43624d532ca91fce143a06e33f92540b2bd0d Mon Sep 17 00:00:00 2001 From: michaelawyu Date: Wed, 17 Sep 2025 10:35:26 +1000 Subject: [PATCH 3/5] Minor fixes Signed-off-by: michaelawyu --- .github/workflows/build-publish-mcr.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-publish-mcr.yml b/.github/workflows/build-publish-mcr.yml index 88c68897c..464b1ba1a 100644 --- a/.github/workflows/build-publish-mcr.yml +++ b/.github/workflows/build-publish-mcr.yml @@ -3,7 +3,10 @@ name: Building and Pushing to MCR on: - push + pull_request: + branches: + - main + - release-* permissions: id-token: write From 8596e81ba8797d6226f620b1f4f31133007f2d04 Mon Sep 17 00:00:00 2001 From: michaelawyu Date: Wed, 17 Sep 2025 10:43:24 +1000 Subject: [PATCH 4/5] Reverted the experimental change Signed-off-by: michaelawyu --- .github/workflows/build-publish-mcr.yml | 91 +++++++++++++++++++++++-- 1 file changed, 87 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-publish-mcr.yml b/.github/workflows/build-publish-mcr.yml index 464b1ba1a..14b01b5ae 100644 --- a/.github/workflows/build-publish-mcr.yml +++ b/.github/workflows/build-publish-mcr.yml @@ -3,10 +3,11 @@ name: Building and Pushing to MCR on: - pull_request: - branches: - - main - - release-* + workflow_dispatch: + inputs: + releaseTag: + description: 'Release tag to publish images, defaults to the latest one' + type: string permissions: id-token: write @@ -53,6 +54,59 @@ jobs: # NOTE: As exporting a variable from a secret is not possible, the shared variable registry obtained # from AZURE_REGISTRY secret is not exported from here. + publish-images-amd64: + runs-on: + labels: [self-hosted, "1ES.Pool=1es-aks-fleet-pool-ubuntu"] + needs: prepare-variables + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ needs.prepare-variables.outputs.release_tag }} + - name: 'Login the ACR' + run: | + az login --identity + az acr login -n ${{ secrets.AZURE_REGISTRY }} + - name: Build and publish hub-agent + run: | + make docker-build-hub-agent + env: + HUB_AGENT_IMAGE_VERSION: ${{ needs.prepare-variables.outputs.release_tag }}-amd64 + REGISTRY: ${{ secrets.AZURE_REGISTRY }}/${{ env.REGISTRY_REPO}} + - name: Build and publish member-agent + run: | + make docker-build-member-agent + env: + MEMBER_AGENT_IMAGE_VERSION: ${{ needs.prepare-variables.outputs.release_tag }}-amd64 + REGISTRY: ${{ secrets.AZURE_REGISTRY }}/${{ env.REGISTRY_REPO}} + - name: Build and publish refresh-token + run: | + make docker-build-refresh-token + env: + REFRESH_TOKEN_IMAGE_VERSION: ${{ needs.prepare-variables.outputs.release_tag }}-amd64 + REGISTRY: ${{ secrets.AZURE_REGISTRY }}/${{ env.REGISTRY_REPO}} + - name: Build and publish crd-installer + run: | + make docker-build-crd-installer + env: + CRD_INSTALLER_IMAGE_VERSION: ${{ needs.prepare-variables.outputs.release_tag }}-amd64 + REGISTRY: ${{ secrets.AZURE_REGISTRY }}/${{ env.REGISTRY_REPO}} + # Build Arc Extension for member clusters + # Arc-connected clusters can join fleets as member clusters through an Arc Extension. + # An Arc Extension is a packaged Helm chart that gets deployed to Arc clusters. + # This step packages both the fleet member agent and networking agents into a single + # Helm chart for Arc deployment, since Arc Extensions require all components to be bundled together. + - name: Build and publish ARC member cluster agents helm chart + run: | + make helm-package-arc-member-cluster-agents + env: + ARC_MEMBER_AGENT_HELMCHART_VERSION: ${{ needs.prepare-variables.outputs.arc_helmchart_version }} + MEMBER_AGENT_IMAGE_VERSION: ${{ needs.prepare-variables.outputs.release_tag }} + REFRESH_TOKEN_IMAGE_VERSION: ${{ needs.prepare-variables.outputs.release_tag }} + CRD_INSTALLER_IMAGE_VERSION: ${{ needs.prepare-variables.outputs.release_tag }} + MCS_CONTROLLER_IMAGE_VERSION: ${{ needs.prepare-variables.outputs.fleet_networking_version }} + MEMBER_NET_CONTROLLER_IMAGE_VERSION: ${{ needs.prepare-variables.outputs.fleet_networking_version }} + REGISTRY: ${{ secrets.AZURE_REGISTRY }}/${{ env.ARC_REGISTRY_REPO}} + publish-images-arm64: runs-on: labels: [self-hosted, "1ES.Pool=1es-aks-fleet-pool-ubuntu-arm64"] @@ -67,3 +121,32 @@ jobs: - name: 'Login the ACR' run: | az login --identity + az acr login -n ${{ secrets.AZURE_REGISTRY }} + - name: Build and publish hub-agent + run: | + make docker-build-hub-agent + env: + HUB_AGENT_IMAGE_VERSION: ${{ needs.prepare-variables.outputs.release_tag }}-arm64 + REGISTRY: ${{ secrets.AZURE_REGISTRY }}/${{ env.REGISTRY_REPO}} + TARGET_ARCH: arm64 + - name: Build and publish member-agent + run: | + make docker-build-member-agent + env: + MEMBER_AGENT_IMAGE_VERSION: ${{ needs.prepare-variables.outputs.release_tag }}-arm64 + REGISTRY: ${{ secrets.AZURE_REGISTRY }}/${{ env.REGISTRY_REPO}} + TARGET_ARCH: linux/arm64 + - name: Build and publish refresh-token + run: | + make docker-build-refresh-token + env: + REFRESH_TOKEN_IMAGE_VERSION: ${{ needs.prepare-variables.outputs.release_tag }}-arm64 + REGISTRY: ${{ secrets.AZURE_REGISTRY }}/${{ env.REGISTRY_REPO}} + TARGET_ARCH: arm64 + - name: Build and publish crd-installer + run: | + make docker-build-crd-installer + env: + CRD_INSTALLER_IMAGE_VERSION: ${{ needs.prepare-variables.outputs.release_tag }}-arm64 + REGISTRY: ${{ secrets.AZURE_REGISTRY }}/${{ env.REGISTRY_REPO}} + TARGET_ARCH: arm64 From 56b47fc3f6e10f292d8ef28fb840f1b6760fdf23 Mon Sep 17 00:00:00 2001 From: michaelawyu Date: Wed, 17 Sep 2025 10:44:13 +1000 Subject: [PATCH 5/5] Minor fixes Signed-off-by: michaelawyu --- .github/workflows/build-publish-mcr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-publish-mcr.yml b/.github/workflows/build-publish-mcr.yml index 14b01b5ae..a2495fac1 100644 --- a/.github/workflows/build-publish-mcr.yml +++ b/.github/workflows/build-publish-mcr.yml @@ -59,7 +59,7 @@ jobs: labels: [self-hosted, "1ES.Pool=1es-aks-fleet-pool-ubuntu"] needs: prepare-variables steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: ref: ${{ needs.prepare-variables.outputs.release_tag }} - name: 'Login the ACR'