Skip to content

Commit c42554b

Browse files
authored
CLOUDP-166507: Migrate images on docker hub mongodbinternal org to quay.io (#925)
1 parent 6140e07 commit c42554b

File tree

4 files changed

+20
-13
lines changed

4 files changed

+20
-13
lines changed

.github/actions/build-push-image/action.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ inputs:
2424
docker_password:
2525
description: The password to access the docker registry
2626
required: true
27+
push_to_docker:
28+
description: Push image to docker.io
29+
required: false
30+
default: "true"
2731
push_to_quay:
2832
description: Also push image to quay.io
2933
required: false
@@ -63,6 +67,7 @@ runs:
6367
with:
6468
platforms: ${{ inputs.platforms }}
6569
- name: Login to docker registry
70+
if: ${{ inputs.push_to_docker == 'true' }}
6671
uses: docker/login-action@v2
6772
with:
6873
username: ${{ inputs.docker_username }}
@@ -84,6 +89,7 @@ runs:
8489
run: |
8590
go mod download
8691
- name: Build and Push Operator to Docker Registry
92+
if: ${{ inputs.push_to_docker == 'true' }}
8793
uses: docker/build-push-action@v3
8894
with:
8995
context: .

.github/workflows/build-test-app.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build test application and push it to docker repository
1+
name: Build test application and push it to repository
22

33
on:
44
push:
@@ -12,7 +12,8 @@ jobs:
1212
name: Build test app and push it
1313
runs-on: ubuntu-latest
1414
env:
15-
DOCKER_REPO: mongodbinternal/test-app
15+
REGISTRY: quay.io
16+
REPOSITORY: mongodb/mongodb-atlas-kubernetes-operator-test-app
1617

1718
steps:
1819
- name: Check out code
@@ -21,14 +22,13 @@ jobs:
2122
- name: Login to docker registry
2223
uses: docker/login-action@v2
2324
with:
24-
registry: ${{ env.DOCKER_REGISTRY }}
25-
username: ${{ secrets.DOCKER_USERNAME }}
26-
password: ${{ secrets.DOCKER_PASSWORD }}
25+
registry: ${{ env.REGISTRY }}
26+
username: mongodb+mongodb_atlas_kubernetes
27+
password: ${{ secrets.QUAY_PASSWORD }}
2728
- name: Prepare docker image tag
2829
id: prepare-docker-image-tag
2930
run: |
30-
REPOSITORY=${{ env.DOCKER_REPO }}
31-
TAGS="${REPOSITORY}:latest"
31+
TAGS="${{ env.REGISTRY }}/${{ env.REPOSITORY }}:latest"
3232
echo "tags=$TAGS" >> $GITHUB_OUTPUT
3333
- name: Push Image to repo
3434
uses: docker/build-push-action@v3

.github/workflows/test-e2e.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
env:
4949
DOCKER_REGISTRY: docker.io
5050
DOCKER_REPO: mongodb/mongodb-atlas-kubernetes-operator-prerelease
51-
DOCKER_BUNDLES_REPO: mongodbinternal/mongodb-atlas-kubernetes-bundles-prerelease
51+
DOCKER_BUNDLES_REPO: mongodb/mongodb-atlas-kubernetes-bundles-prerelease
5252
steps:
5353
- if: ${{ inputs.forked == false }}
5454
name: Check out code
@@ -110,9 +110,10 @@ jobs:
110110
repository: ${{ env.DOCKER_BUNDLES_REPO }}
111111
version: ${{ steps.prepare.outputs.tag }}
112112
platforms: linux/amd64
113-
docker_username: ${{ secrets.DOCKER_USERNAME }}
114-
docker_password: ${{ secrets.DOCKER_PASSWORD }}
115-
push_to_quay: false
113+
push_to_docker: false
114+
push_to_quay: true
115+
quay_username: mongodb+mongodb_atlas_kubernetes
116+
quay_password: ${{ secrets.QUAY_PASSWORD }}
116117
forked: ${{ inputs.forked }}
117118
e2e:
118119
name: E2E tests
@@ -121,7 +122,7 @@ jobs:
121122
env:
122123
DOCKER_REGISTRY: docker.io
123124
DOCKER_REPO: mongodb/mongodb-atlas-kubernetes-operator-prerelease
124-
DOCKER_BUNDLES_REPO: mongodbinternal/mongodb-atlas-kubernetes-bundles-prerelease
125+
DOCKER_BUNDLES_REPO: quay.io/mongodb/mongodb-atlas-kubernetes-bundles-prerelease
125126
strategy:
126127
fail-fast: false
127128
matrix:

test/app/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Please push to mongodbinternal/test-app:v1
1+
# Please push to quay.io/mongodb/mongodb-atlas-kubernetes-operator-test-app:v1
22

33
# Build the manager binary
44
FROM golang:1.19 as builder

0 commit comments

Comments
 (0)