Skip to content

Commit

Permalink
fix: deprecate GCR repo
Browse files Browse the repository at this point in the history
  • Loading branch information
danistrebel committed Dec 17, 2024
1 parent 53efbe3 commit 34bea94
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
16 changes: 8 additions & 8 deletions references/cicd-pipeline/jenkins-build/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ docker build -f ./jenkins-web/Dockerfile -t apigee/devrel-jenkins:latest .
PROJECT_ID=<my-project>
gcloud builds submit --config ./cloudbuild.yml --project $PROJECT_ID
gcloud builds submit --config ./jenkins-web/cloudbuild.yml --project $PROJECT_ID
docker pull gcr.io/$PROJECT_ID/apigee/devrel-jenkins:latest
docker tag gcr.io/$PROJECT_ID/apigee/devrel-jenkins:latest apigee/devrel-jenkins:latest
docker pull europe-docker.pkg.dev/$PROJECT_ID/devrel/devrel-jenkins:latest
docker tag europe-docker.pkg.dev/$PROJECT_ID/devrel/devrel-jenkins:latest apigee/devrel-jenkins:latest
```

### Run the Jenkins Container
Expand All @@ -56,8 +56,8 @@ Image in GCR. If you have not used Cloud Build to build your Image then push it
to GCR like so:

```sh
docker tag apigee/devrel-jenkins:latest gcr.io/$PROJECT_ID/apigee/devrel-jenkins:latest
docker push gcr.io/$PROJECT_ID/apigee/devrel-jenkins:latest
docker tag apigee/devrel-jenkins:latest europe-docker.pkg.dev/$PROJECT_ID/devrel/devrel-jenkins:latest
docker push europe-docker.pkg.dev/$PROJECT_ID/devrel/devrel-jenkins:latest
```

If you are building for Apigee X or hybrid you should create a dedicated service
Expand Down Expand Up @@ -108,7 +108,7 @@ CONTAINER_ENVS+=",APIGEE_PROD_ENV=prod1"
CONTAINER_ENVS+=",TEST_HOST=$APIGEE_X_HOSTNAME"

gcloud compute instances create-with-container jenkins --tags jenkins \
--container-image gcr.io/$PROJECT_ID/apigee/devrel-jenkins:latest \
--container-image europe-docker.pkg.dev/$PROJECT_ID/devrel/devrel-jenkins:latest \
--container-env "$CONTAINER_ENVS" \
--machine-type e2-standard-2 \
--service-account "$JENKINS_SA_EMAIL" \
Expand All @@ -134,7 +134,7 @@ CONTAINER_ENVS+=",APIGEE_PASS=$APIGEE_PASS"
CONTAINER_ENVS+=",TEST_HOST=$APIGEE_ORG-$APIGEE_ENV.apigee.net"

gcloud compute instances create-with-container jenkins --tags jenkins \
--container-image gcr.io/$PROJECT_ID/apigee/devrel-jenkins:latest \
--container-image europe-docker.pkg.dev/$PROJECT_ID/devrel/devrel-jenkins:latest \
--container-env "$CONTAINER_ENVS" \
--machine-type e2-standard-2 \
--service-account "$JENKINS_SA_EMAIL" --scopes cloud-platform
Expand Down Expand Up @@ -233,8 +233,8 @@ docker build -f jenkinsfile-runner/Dockerfile -t apigee/devrel-jenkinsfile:lates
PROJECT_ID=$(gcloud config get-value project)\
gcloud builds submit --config ./cloudbuild.yml --project $PROJECT_ID
gcloud builds submit --config ./jenkinsfile-runner/cloudbuild.yml --project $PROJECT_ID
docker pull gcr.io/$PROJECT_ID/apigee/devrel-jenkinsfile-runner:latest
docker tag gcr.io/$PROJECT_ID/apigee/devrel-jenkinsfile-runner:latest apigee/devrel-jenkinsfile:latest
docker pull europe-docker.pkg.dev/$PROJECT_ID/devrel/devrel-jenkinsfile-runner:latest
docker tag europe-docker.pkg.dev/$PROJECT_ID/devrel/devrel-jenkinsfile-runner:latest apigee/devrel-jenkinsfile:latest
```

### Example Run
Expand Down
4 changes: 2 additions & 2 deletions references/cicd-pipeline/jenkins-build/cloudbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ steps:
- name: "gcr.io/cloud-builders/docker"
args:
- build
- "--tag=gcr.io/$PROJECT_ID/apigee/devrel-jenkins-base:latest"
- "--tag=europe-docker.pkg.dev/$PROJECT_ID/devrel/devrel-jenkins-base:latest"
- "--file=./Dockerfile"
- .
images:
- "gcr.io/$PROJECT_ID/apigee/devrel-jenkins-base:latest"
- "europe-docker.pkg.dev/$PROJECT_ID/devrel/devrel-jenkins-base:latest"
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ steps:
- name: "gcr.io/cloud-builders/docker"
args:
- build
- "--tag=gcr.io/$PROJECT_ID/apigee/devrel-jenkins:latest"
- "--tag=europe-docker.pkg.dev/$PROJECT_ID/devrel/devrel-jenkins:latest"
- "--file=./jenkins-web/Dockerfile"
- "--build-arg=baseImage=gcr.io/$PROJECT_ID/apigee/devrel-jenkins-base"
- "--build-arg=baseImage=europe-docker.pkg.dev/$PROJECT_ID/devrel/devrel-jenkins-base"
- "--build-arg=baseImageTag=latest"
- .
images:
- "gcr.io/$PROJECT_ID/apigee/devrel-jenkins:latest"
- "europe-docker.pkg.dev/$PROJECT_ID/devrel/devrel-jenkins:latest"
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ steps:
- name: "gcr.io/cloud-builders/docker"
args:
- build
- "--tag=gcr.io/$PROJECT_ID/apigee/devrel-jenkinsfile-runner:latest"
- "--tag=europe-docker.pkg.dev/$PROJECT_ID/devrel/devrel-jenkinsfile-runner:latest"
- "--file=./jenkinsfile-runner/Dockerfile"
- "--build-arg=baseImage=gcr.io/$PROJECT_ID/apigee/devrel-jenkins-base"
- "--build-arg=baseImage=europe-docker.pkg.dev/$PROJECT_ID/devrel/devrel-jenkins-base"
- "--build-arg=baseImageTag=latest"
- .
images:
- "gcr.io/$PROJECT_ID/apigee/devrel-jenkinsfile-runner:latest"
- "europe-docker.pkg.dev/$PROJECT_ID/devrel/devrel-jenkinsfile-runner:latest"
4 changes: 2 additions & 2 deletions references/cloud-run/pipeline.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ SCRIPTPATH="$( cd "$(dirname "$0")" || exit >/dev/null 2>&1 ; pwd -P )"
export PATH="$PATH:$SCRIPTPATH/../../tools/apigee-sackmesser/bin"

PROJECT_ID=$(gcloud config get-value project)
gcloud builds submit --tag "gcr.io/$PROJECT_ID/apigee-target" --project "$PROJECT_ID"
gcloud builds submit --tag "europe-docker.pkg.dev/$PROJECT_ID/devrel" --project "$PROJECT_ID"

gcloud run deploy apigee-target-demo \
--image="gcr.io/$(gcloud config get-value project)/apigee-target" \
--image="europe-docker.pkg.dev/$PROJECT_ID/devrel" \
--platform=managed \
--region=europe-west1 \
--no-allow-unauthenticated --project "$PROJECT_ID"
Expand Down

0 comments on commit 34bea94

Please sign in to comment.