@@ -14,7 +14,7 @@ permissions:
1414 contents : read
1515
1616env :
17- # `public` indicates images to MCR wil be publicly available, and will be removed in the final MCR images
17+ # `public` indicates images to MCR will be publicly available, and will be removed in the final MCR images
1818 REGISTRY_REPO : public/aks/fleet
1919 ARC_REGISTRY_REPO : public/microsoft.fleetmember
2020
@@ -106,7 +106,7 @@ jobs:
106106 MCS_CONTROLLER_IMAGE_VERSION : ${{ needs.prepare-variables.outputs.fleet_networking_version }}
107107 MEMBER_NET_CONTROLLER_IMAGE_VERSION : ${{ needs.prepare-variables.outputs.fleet_networking_version }}
108108 REGISTRY : ${{ secrets.AZURE_REGISTRY }}/${{ env.ARC_REGISTRY_REPO}}
109-
109+
110110 publish-images-arm64 :
111111 runs-on :
112112 labels : [self-hosted, "1ES.Pool=1es-aks-fleet-pool-ubuntu-arm64"]
@@ -116,36 +116,70 @@ jobs:
116116 with :
117117 ref : ${{ needs.prepare-variables.outputs.release_tag }}
118118 - name : ' Install the Azure CLI'
119+ # Note (chenyu1): the self-hosted 1ES ARM64 pool, for some reason, does not have Azure CLI installed by default;
120+ # install it manually here.
119121 run :
120122 curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
123+ - name : ' Set up build essential meta package'
124+ # Note (chenyu1): the self-hosted 1ES ARM64 pool, for some reason, does not have the common build
125+ # tools (e.g., make) installed by default; install the build-essential meta package to set them up.
126+ run : |
127+ sudo apt-get update
128+ sudo apt-get install -y build-essential
129+ - name : ' Set up Docker'
130+ # Note (chenyu1): the self-hosted 1ES ARM64 pool, for some reason, does not have Docker installed by default,
131+ # and cannot have Docker installed via the docker/setup-docker-action Github Action, hence the manual setup
132+ # steps here.
133+ run : |
134+ sudo apt-get update
135+ sudo apt-get -y install ca-certificates curl
136+ sudo install -m 0755 -d /etc/apt/keyrings
137+ sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
138+ sudo chmod a+r /etc/apt/keyrings/docker.asc
139+ echo \
140+ "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
141+ $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | \
142+ sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
143+ sudo apt-get update
144+ sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
121145 - name : ' Login the ACR'
122146 run : |
123- az login --identity
147+ az login --identity
124148 az acr login -n ${{ secrets.AZURE_REGISTRY }}
149+ - name : ' Verify Docker CLI'
150+ # Note (chenyu1): the Docker installation has to be invoked with root privileges by default; for
151+ # simplicity reasons in this pipeline we will make no attempt to enable rootless Docker usage.
152+ run : |
153+ sudo docker version
154+ sudo docker info
125155 - name : Build and publish hub-agent
156+ # Note (chenyu1): must preserve the environment here.
126157 run : |
127- make docker-build-hub-agent
158+ sudo -E make docker-build-hub-agent
128159 env :
129160 HUB_AGENT_IMAGE_VERSION : ${{ needs.prepare-variables.outputs.release_tag }}-arm64
130161 REGISTRY : ${{ secrets.AZURE_REGISTRY }}/${{ env.REGISTRY_REPO}}
131162 TARGET_ARCH : arm64
132163 - name : Build and publish member-agent
164+ # Note (chenyu1): must preserve the environment here.
133165 run : |
134- make docker-build-member-agent
166+ sudo -E make docker-build-member-agent
135167 env :
136168 MEMBER_AGENT_IMAGE_VERSION : ${{ needs.prepare-variables.outputs.release_tag }}-arm64
137169 REGISTRY : ${{ secrets.AZURE_REGISTRY }}/${{ env.REGISTRY_REPO}}
138- TARGET_ARCH : linux/ arm64
170+ TARGET_ARCH : arm64
139171 - name : Build and publish refresh-token
172+ # Note (chenyu1): must preserve the environment here.
140173 run : |
141- make docker-build-refresh-token
174+ sudo -E make docker-build-refresh-token
142175 env :
143176 REFRESH_TOKEN_IMAGE_VERSION : ${{ needs.prepare-variables.outputs.release_tag }}-arm64
144177 REGISTRY : ${{ secrets.AZURE_REGISTRY }}/${{ env.REGISTRY_REPO}}
145178 TARGET_ARCH : arm64
146179 - name : Build and publish crd-installer
180+ # Note (chenyu1): must preserve the environment here.
147181 run : |
148- make docker-build-crd-installer
182+ sudo -E make docker-build-crd-installer
149183 env :
150184 CRD_INSTALLER_IMAGE_VERSION : ${{ needs.prepare-variables.outputs.release_tag }}-arm64
151185 REGISTRY : ${{ secrets.AZURE_REGISTRY }}/${{ env.REGISTRY_REPO}}
0 commit comments