Skip to content

Commit 4efa1ab

Browse files
authored
Fix RBE testing (#1862)
1 parent 05bef36 commit 4efa1ab

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

.github/workflows/main.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ jobs:
4343
DOCKERFILE_HASH=$(sha256sum "$GITHUB_WORKSPACE/tools/toolchain-nativelink/Dockerfile" | awk '{print $1}')
4444
IMAGE_DETAILS=$(aws ecr describe-images --repository-name ${{ secrets.RBE_ECR_REPOSITORY_NAME }} --image-ids imageTag=$DOCKERFILE_HASH)
4545
if [ $? -ne 0 ]; then
46+
echo "Run tools/toolchain-nativelink/toolchain-nativelink.sh locally and upload a new version of the stock image"
4647
exit 1;
4748
fi
4849
echo "RBE_IMAGE=${{ secrets.RBE_ECR_AWS_ACCOUNT_ID }}.dkr.ecr.${{ secrets.RBE_ECR_AWS_ACCOUNT_REGION }}.amazonaws.com/${{ secrets.RBE_ECR_REPOSITORY_NAME }}:$DOCKERFILE_HASH" >> $GITHUB_ENV

tools/toolchain-nativelink/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install --no-instal
2424
python3=3.10.6-1~22.04 \
2525
python3-minimal=3.10.6-1~22.04 \
2626
libpython3-stdlib=3.10.6-1~22.04 \
27-
curl=7.81.0-1ubuntu1.17 \
28-
ca-certificates=20230311ubuntu0.22.04.1 \
27+
curl=7.81.0-1ubuntu1.20 \
28+
ca-certificates=20240203~22.04.1 \
2929
&& apt-get clean \
3030
&& rm -rf /var/lib/apt/lists/*
3131

tools/toolchain-nativelink/toolchain-nativelink.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
set -xeuo pipefail
44

5-
ECR=${ECR:?Error: ECR is not set}
5+
ECR=${ECR:-299166832260}
66
ECR_PROFILE=${ECR_PROFILE:?Error: ECR_PROFILE is not set}
7-
ECR_USER=${ECR_USER:?Error: ECR_USER is not set}
8-
ECR_REGION=${ECR_REGION:?Error: ECR_REGION is not set}
9-
BUILDX_NO_CACHE=${BUILDX_NO_CACHE:-true}
7+
ECR_USER=${ECR_USER:-AWS}
8+
ECR_REGION=${ECR_REGION:-us-east-2}
9+
BUILDX_NO_CACHE=${BUILDX_NO_CACHE:-false}
1010

1111
function ecr_login() {
1212
aws ecr get-login-password --profile "${ECR_PROFILE}" --region "${ECR_REGION}" | docker login --username "${ECR_USER}" --password-stdin "${ECR}.dkr.ecr.${ECR_REGION}.amazonaws.com"
@@ -23,7 +23,7 @@ else
2323
fi
2424

2525
# Build the Docker image and tag it with the hash
26-
docker buildx build --no-cache="${BUILDX_NO_CACHE}" --platform linux/amd64 -t "${ECR}.dkr.ecr.${ECR_REGION}.amazonaws.com/nativelink-rbe:$IMAGE_TAG" -f 'Dockerfile' .
26+
docker buildx build --no-cache="${BUILDX_NO_CACHE}" --platform linux/amd64 -t "${ECR}.dkr.ecr.${ECR_REGION}.amazonaws.com/nativelink-rbe:$IMAGE_TAG" --load -f 'Dockerfile' .
2727

2828
ecr_login
2929
docker push "${ECR}.dkr.ecr.${ECR_REGION}.amazonaws.com/nativelink-rbe:$IMAGE_TAG"

0 commit comments

Comments
 (0)