|
3 | 3 |
|
4 | 4 | name: Building and Pushing to MCR |
5 | 5 | on: |
6 | | - pull_request: |
7 | | - branches: |
8 | | - - main |
| 6 | + workflow_dispatch: |
| 7 | + inputs: |
| 8 | + releaseTag: |
| 9 | + description: 'Release tag to publish images, defaults to the latest one' |
| 10 | + type: string |
9 | 11 |
|
10 | 12 | permissions: |
11 | 13 | id-token: write |
|
52 | 54 | # NOTE: As exporting a variable from a secret is not possible, the shared variable registry obtained |
53 | 55 | # from AZURE_REGISTRY secret is not exported from here. |
54 | 56 |
|
| 57 | + publish-images-amd64: |
| 58 | + runs-on: |
| 59 | + labels: [self-hosted, "1ES.Pool=1es-aks-fleet-pool-ubuntu"] |
| 60 | + needs: prepare-variables |
| 61 | + steps: |
| 62 | + - uses: actions/checkout@v5 |
| 63 | + with: |
| 64 | + ref: ${{ needs.prepare-variables.outputs.release_tag }} |
| 65 | + - name: 'Login the ACR' |
| 66 | + run: | |
| 67 | + az login --identity |
| 68 | + az acr login -n ${{ secrets.AZURE_REGISTRY }} |
| 69 | + - name: Build and publish hub-agent |
| 70 | + run: | |
| 71 | + make docker-build-hub-agent |
| 72 | + env: |
| 73 | + HUB_AGENT_IMAGE_VERSION: ${{ needs.prepare-variables.outputs.release_tag }}-amd64 |
| 74 | + REGISTRY: ${{ secrets.AZURE_REGISTRY }}/${{ env.REGISTRY_REPO}} |
| 75 | + - name: Build and publish member-agent |
| 76 | + run: | |
| 77 | + make docker-build-member-agent |
| 78 | + env: |
| 79 | + MEMBER_AGENT_IMAGE_VERSION: ${{ needs.prepare-variables.outputs.release_tag }}-amd64 |
| 80 | + REGISTRY: ${{ secrets.AZURE_REGISTRY }}/${{ env.REGISTRY_REPO}} |
| 81 | + - name: Build and publish refresh-token |
| 82 | + run: | |
| 83 | + make docker-build-refresh-token |
| 84 | + env: |
| 85 | + REFRESH_TOKEN_IMAGE_VERSION: ${{ needs.prepare-variables.outputs.release_tag }}-amd64 |
| 86 | + REGISTRY: ${{ secrets.AZURE_REGISTRY }}/${{ env.REGISTRY_REPO}} |
| 87 | + - name: Build and publish crd-installer |
| 88 | + run: | |
| 89 | + make docker-build-crd-installer |
| 90 | + env: |
| 91 | + CRD_INSTALLER_IMAGE_VERSION: ${{ needs.prepare-variables.outputs.release_tag }}-amd64 |
| 92 | + REGISTRY: ${{ secrets.AZURE_REGISTRY }}/${{ env.REGISTRY_REPO}} |
| 93 | + # Build Arc Extension for member clusters |
| 94 | + # Arc-connected clusters can join fleets as member clusters through an Arc Extension. |
| 95 | + # An Arc Extension is a packaged Helm chart that gets deployed to Arc clusters. |
| 96 | + # This step packages both the fleet member agent and networking agents into a single |
| 97 | + # Helm chart for Arc deployment, since Arc Extensions require all components to be bundled together. |
| 98 | + - name: Build and publish ARC member cluster agents helm chart |
| 99 | + run: | |
| 100 | + make helm-package-arc-member-cluster-agents |
| 101 | + env: |
| 102 | + ARC_MEMBER_AGENT_HELMCHART_VERSION: ${{ needs.prepare-variables.outputs.arc_helmchart_version }} |
| 103 | + MEMBER_AGENT_IMAGE_VERSION: ${{ needs.prepare-variables.outputs.release_tag }} |
| 104 | + REFRESH_TOKEN_IMAGE_VERSION: ${{ needs.prepare-variables.outputs.release_tag }} |
| 105 | + CRD_INSTALLER_IMAGE_VERSION: ${{ needs.prepare-variables.outputs.release_tag }} |
| 106 | + MCS_CONTROLLER_IMAGE_VERSION: ${{ needs.prepare-variables.outputs.fleet_networking_version }} |
| 107 | + MEMBER_NET_CONTROLLER_IMAGE_VERSION: ${{ needs.prepare-variables.outputs.fleet_networking_version }} |
| 108 | + REGISTRY: ${{ secrets.AZURE_REGISTRY }}/${{ env.ARC_REGISTRY_REPO}} |
| 109 | + |
55 | 110 | publish-images-arm64: |
56 | 111 | runs-on: |
57 | 112 | labels: [self-hosted, "1ES.Pool=1es-aks-fleet-pool-ubuntu-arm64"] |
@@ -97,3 +152,35 @@ jobs: |
97 | 152 | run: | |
98 | 153 | sudo docker version |
99 | 154 | sudo docker info |
| 155 | + - name: Build and publish hub-agent |
| 156 | + # Note (chenyu1): must preserve the environment here. |
| 157 | + run: | |
| 158 | + sudo -E make docker-build-hub-agent |
| 159 | + env: |
| 160 | + HUB_AGENT_IMAGE_VERSION: ${{ needs.prepare-variables.outputs.release_tag }}-arm64 |
| 161 | + REGISTRY: ${{ secrets.AZURE_REGISTRY }}/${{ env.REGISTRY_REPO}} |
| 162 | + TARGET_ARCH: arm64 |
| 163 | + - name: Build and publish member-agent |
| 164 | + # Note (chenyu1): must preserve the environment here. |
| 165 | + run: | |
| 166 | + sudo -E make docker-build-member-agent |
| 167 | + env: |
| 168 | + MEMBER_AGENT_IMAGE_VERSION: ${{ needs.prepare-variables.outputs.release_tag }}-arm64 |
| 169 | + REGISTRY: ${{ secrets.AZURE_REGISTRY }}/${{ env.REGISTRY_REPO}} |
| 170 | + TARGET_ARCH: arm64 |
| 171 | + - name: Build and publish refresh-token |
| 172 | + # Note (chenyu1): must preserve the environment here. |
| 173 | + run: | |
| 174 | + sudo -E make docker-build-refresh-token |
| 175 | + env: |
| 176 | + REFRESH_TOKEN_IMAGE_VERSION: ${{ needs.prepare-variables.outputs.release_tag }}-arm64 |
| 177 | + REGISTRY: ${{ secrets.AZURE_REGISTRY }}/${{ env.REGISTRY_REPO}} |
| 178 | + TARGET_ARCH: arm64 |
| 179 | + - name: Build and publish crd-installer |
| 180 | + # Note (chenyu1): must preserve the environment here. |
| 181 | + run: | |
| 182 | + sudo -E make docker-build-crd-installer |
| 183 | + env: |
| 184 | + CRD_INSTALLER_IMAGE_VERSION: ${{ needs.prepare-variables.outputs.release_tag }}-arm64 |
| 185 | + REGISTRY: ${{ secrets.AZURE_REGISTRY }}/${{ env.REGISTRY_REPO}} |
| 186 | + TARGET_ARCH: arm64 |
0 commit comments