Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ref: dual-write docker image to artifact registry #5798

Merged
merged 1 commit into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ jobs:
- name: Pull the test image
id: image_pull
env:
IMAGE_URL: us.gcr.io/sentryio/snuba:${{ github.sha }}
IMAGE_URL: us-central1-docker.pkg.dev/sentryio/snuba/image:${{ github.sha }}
shell: bash
run: |
echo "We poll for the Docker image that the GCB/GHA build produces until it succeeds or this job times out."
Expand All @@ -455,7 +455,7 @@ jobs:
shell: bash
env:
SHORT_SHA: ${{ steps.short_sha.outputs.sha }}
IMAGE_URL: us.gcr.io/sentryio/snuba:${{ github.sha }}
IMAGE_URL: us-central1-docker.pkg.dev/sentryio/snuba/image:${{ github.sha }}
run: |
# only login if the password is set
if [[ "${{ secrets.DOCKER_HUB_RW_TOKEN }}" ]]; then echo "${{ secrets.DOCKER_HUB_RW_TOKEN }}" | docker login --username=sentrybuilder --password-stdin; fi
Expand Down
9 changes: 7 additions & 2 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ steps:
"--build-arg",
"SOURCE_COMMIT=$COMMIT_SHA",
"--destination=us.gcr.io/$PROJECT_ID/$REPO_NAME:$COMMIT_SHA",
"--destination=us-central1-docker.pkg.dev/$PROJECT_ID/snuba/image:$COMMIT_SHA",
"--target=application",
"-f",
"./Dockerfile",
Expand All @@ -20,10 +21,14 @@ steps:
# https://github.com/GoogleCloudPlatform/cloud-builders-community/issues/212#issuecomment-1478828752
- name: docker
args: [pull, "us.gcr.io/$PROJECT_ID/$REPO_NAME:$COMMIT_SHA"]

- name: docker
args: [pull, "us-central1-docker.pkg.dev/$PROJECT_ID/snuba/image:$COMMIT_SHA"]

# This is needed for Freight to find matching builds
images: ['us.gcr.io/$PROJECT_ID/$REPO_NAME:$COMMIT_SHA']
images: [
'us.gcr.io/$PROJECT_ID/$REPO_NAME:$COMMIT_SHA',
'us-central1-docker.pkg.dev/$PROJECT_ID/snuba/image:$COMMIT_SHA',
]
timeout: 2640s
options:
# We need more memory for Webpack builds & e2e self-hosted tests
Expand Down
Loading