|
3 | 3 |
|
4 | 4 | name: Building and Pushing to MCR |
5 | 5 | on: |
6 | | - workflow_dispatch: |
7 | | - inputs: |
8 | | - releaseTag: |
9 | | - description: 'Release tag to publish images, defaults to the latest one' |
10 | | - type: string |
| 6 | + pull_request: |
| 7 | + branches: |
| 8 | + - main |
11 | 9 |
|
12 | 10 | permissions: |
13 | 11 | id-token: write |
|
54 | 52 | # NOTE: As exporting a variable from a secret is not possible, the shared variable registry obtained |
55 | 53 | # from AZURE_REGISTRY secret is not exported from here. |
56 | 54 |
|
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 | | - |
110 | 55 | publish-images-arm64: |
111 | 56 | runs-on: |
112 | 57 | labels: [self-hosted, "1ES.Pool=1es-aks-fleet-pool-ubuntu-arm64"] |
@@ -145,42 +90,10 @@ jobs: |
145 | 90 | - name: 'Login the ACR' |
146 | 91 | run: | |
147 | 92 | az login --identity |
148 | | - az acr login -n ${{ secrets.AZURE_REGISTRY }} |
| 93 | + sudo az acr login -n ${{ secrets.AZURE_REGISTRY }} |
149 | 94 | - name: 'Verify Docker CLI' |
150 | 95 | # Note (chenyu1): the Docker installation has to be invoked with root privileges by default; for |
151 | 96 | # simplicity reasons in this pipeline we will make no attempt to enable rootless Docker usage. |
152 | 97 | run: | |
153 | 98 | sudo docker version |
154 | 99 | 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