Skip to content

Commit

Permalink
CI(build-and-test): upload images to all regions
Browse files Browse the repository at this point in the history
  • Loading branch information
bayandin committed Jul 5, 2024
1 parent 6849ae4 commit 107a492
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1132,6 +1132,20 @@ jobs:
docker buildx imagetools create -t neondatabase/neon-test-extensions-v16:latest \
neondatabase/neon-test-extensions-v16:${{ needs.tag.outputs.build-tag }}
- name: Copy image to all dev regions
if: github.ref_name == 'main'
env:
REGIONS: ${{ vars.DEV_AWS_REGIONS_JSON }}

Check failure on line 1138 in .github/workflows/build_and_test.yml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] .github/workflows/build_and_test.yml#L1138

undefined configuration variable "dev_aws_regions_json". defined configuration variables in actionlint.yaml are "REMOTE_STORAGE_AZURE_CONTAINER", "REMOTE_STORAGE_AZURE_REGION", "SLACK_UPCOMING_RELEASE_CHANNEL_ID" [expression]
Raw output
.github/workflows/build_and_test.yml:1138:24: undefined configuration variable "dev_aws_regions_json". defined configuration variables in actionlint.yaml are "REMOTE_STORAGE_AZURE_CONTAINER", "REMOTE_STORAGE_AZURE_REGION", "SLACK_UPCOMING_RELEASE_CHANNEL_ID" [expression]
TAG: ${{ needs.tag.outputs.build-tag }}
ECR_ID: '369495373322'
run: |
for image in neon compute-tools {vm-,}compute-node-{v14,v15,v16}; do
# Create a list of arguments that looks like `-t repo-in-one-region/image:tag -t repo-in-another-region/image:tag`
ARGS=$(echo $REGIONS | jq --raw-output --arg ecr_id "${ECR_ID}" --arg image "${image}" --arg tag "${TAG}" '.[] | "-t \(ecr_id).dkr.ecr.\(.).amazonaws.com/\($image):\($tag)"' | paste -sd " " -)
docker buildx imagetools create ${ARGS} ${ECR_ID}.dkr.ecr.eu-central-1.amazonaws.com/${image}:${TAG}
done
- name: Login to prod ECR
uses: docker/login-action@v3
if: github.ref_name == 'release'|| github.ref_name == 'release-proxy'
Expand All @@ -1148,6 +1162,20 @@ jobs:
369495373322.dkr.ecr.eu-central-1.amazonaws.com/${image}:${{ needs.tag.outputs.build-tag }}
done
- name: Copy image to all prod regions
if: github.ref_name == 'release'|| github.ref_name == 'release-proxy'
env:
REGIONS: ${{ vars.PROD_AWS_REGIONS_JSON }}

Check failure on line 1168 in .github/workflows/build_and_test.yml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] .github/workflows/build_and_test.yml#L1168

undefined configuration variable "prod_aws_regions_json". defined configuration variables in actionlint.yaml are "REMOTE_STORAGE_AZURE_CONTAINER", "REMOTE_STORAGE_AZURE_REGION", "SLACK_UPCOMING_RELEASE_CHANNEL_ID" [expression]
Raw output
.github/workflows/build_and_test.yml:1168:24: undefined configuration variable "prod_aws_regions_json". defined configuration variables in actionlint.yaml are "REMOTE_STORAGE_AZURE_CONTAINER", "REMOTE_STORAGE_AZURE_REGION", "SLACK_UPCOMING_RELEASE_CHANNEL_ID" [expression]
TAG: ${{ needs.tag.outputs.build-tag }}
ECR_ID: '093970136003'
run: |
for image in neon compute-tools {vm-,}compute-node-{v14,v15,v16}; do
# Create a list of arguments that looks like `-t repo-in-one-region/image:tag -t repo-in-another-region/image:tag ...`
ARGS=$(echo $REGIONS | jq --raw-output --arg ecr_id "${ECR_ID}" --arg image "${image}" --arg tag "${TAG}" '.[] | "-t \(ecr_id).dkr.ecr.\(.).amazonaws.com/\($image):\($tag)"' | paste -sd " " -)
docker buildx imagetools create ${ARGS} ${ECR_ID}.dkr.ecr.eu-central-1.amazonaws.com/${image}:${TAG}
done
trigger-custom-extensions-build-and-wait:
needs: [ check-permissions, tag ]
runs-on: ubuntu-22.04
Expand Down

0 comments on commit 107a492

Please sign in to comment.