From 6320b491bef979f240705f5f869ccd963e1344ff Mon Sep 17 00:00:00 2001 From: Mark Drake <33191761+SharpRake@users.noreply.github.com> Date: Fri, 24 May 2024 17:15:02 -0700 Subject: [PATCH] renaming image-copy-gcr to image-copy-gcp (#206) I thought it made sense to update this example (which is useful and works perfectly fine) to reflect recent changes to GCP's product offerings. They [recently deprecated GCR](https://cloud.google.com/artifact-registry/docs/transition/transition-from-gcr) and the service will be totally shut down in 2025. This PR updates the name of this example to `image-copy-gcp` and updates other docs in this repository to reflect the change. After updating it :sparkles: works on my machine :sparkles: but I may very well have missed something important, so please test things out yourself. Signed-off-by: Mark Drake --- .github/workflows/build-push.yaml | 2 +- .github/workflows/build.yaml | 2 +- README.md | 2 +- {image-copy-gcr => image-copy-gcp}/README.md | 4 ++-- {image-copy-gcr => image-copy-gcp}/go.mod | 2 +- {image-copy-gcr => image-copy-gcp}/go.sum | 0 {image-copy-gcr => image-copy-gcp}/hack/update-codegen.sh | 0 {image-copy-gcr => image-copy-gcp}/hack/update-deps.sh | 0 {image-copy-gcr => image-copy-gcp}/iac/.gitignore | 0 {image-copy-gcr => image-copy-gcp}/iac/main.tf | 2 +- {image-copy-gcr => image-copy-gcp}/iac/outputs.tf | 0 {image-copy-gcr => image-copy-gcp}/iac/variables.tf | 0 {image-copy-gcr => image-copy-gcp}/main.go | 0 13 files changed, 7 insertions(+), 7 deletions(-) rename {image-copy-gcr => image-copy-gcp}/README.md (98%) rename {image-copy-gcr => image-copy-gcp}/go.mod (99%) rename {image-copy-gcr => image-copy-gcp}/go.sum (100%) rename {image-copy-gcr => image-copy-gcp}/hack/update-codegen.sh (100%) rename {image-copy-gcr => image-copy-gcp}/hack/update-deps.sh (100%) rename {image-copy-gcr => image-copy-gcp}/iac/.gitignore (100%) rename {image-copy-gcr => image-copy-gcp}/iac/main.tf (99%) rename {image-copy-gcr => image-copy-gcp}/iac/outputs.tf (100%) rename {image-copy-gcr => image-copy-gcp}/iac/variables.tf (100%) rename {image-copy-gcr => image-copy-gcp}/main.go (100%) diff --git a/.github/workflows/build-push.yaml b/.github/workflows/build-push.yaml index 1574bf4..74d33c0 100644 --- a/.github/workflows/build-push.yaml +++ b/.github/workflows/build-push.yaml @@ -22,7 +22,7 @@ jobs: - aws-auth - github-issue-opener - image-copy-ecr - - image-copy-gcr + - image-copy-gcp - image-diff - jira-issue-opener - slack-webhook diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 4f1f64d..db5bc55 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -15,7 +15,7 @@ jobs: - aws-auth - github-issue-opener - image-copy-ecr - - image-copy-gcr + - image-copy-gcp - image-diff - jira-issue-opener - slack-webhook diff --git a/README.md b/README.md index de12944..6591245 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ This repo holds a number of example apps demonstrating integrations with Chaingu - [GitHub Issue Opener](./github-issue-opener/README.md) - opens an issue in GitHub when a policy is violated - [Slack Webhook](./slack-webhook/README.md) - sends a message to a Slack channel when a policy is violated - [Jira Issuer Opener](./jira-issue-opener/) - opens an issue in Jira when a policy is violated -- [GCR Image Copier](./image-copy-gcr/) - copies images to Google Container Registry when an image is pushed to cgr.dev +- [GCP Image Copier](./image-copy-gcp/) - copies images to Google Artifact Registry when an image is pushed to cgr.dev - [ECR Image Copier](./image-copy-ecr/) - copies images to Amazon Elastic Container Registry when an image is pushed to cgr.dev - [AWS Auth Example](./aws-auth/) - demonstrates configuration of an AWS assumable Chainguard identity, as well as calling the Chainguard API from a Lambda function - [Tag History Example](./tag-history/) - demonstrates how to use the Chainguard API to track tag history for images in a registry diff --git a/image-copy-gcr/README.md b/image-copy-gcp/README.md similarity index 98% rename from image-copy-gcr/README.md rename to image-copy-gcp/README.md index 6a936ec..a0d569b 100644 --- a/image-copy-gcr/README.md +++ b/image-copy-gcp/README.md @@ -1,4 +1,4 @@ -# `image-copy-gcr` +# `image-copy-gcp` This sets up a Cloud Run app to listen for [`registry.push` events](https://edu.chainguard.dev/chainguard/chainguard-enforce/reference/events/#service-registry---push) to a private Chainguard Registry group, and mirrors those new images to a repository in Google Artifact Registry. @@ -9,7 +9,7 @@ it like this: ``` module "image-copy" { - source = "github.com/chainguard-dev/platform-examples//image-copy-gcr/iac" + source = "github.com/chainguard-dev/platform-examples//image-copy-gcp/iac" # name is used to prefix resources created by this demo application # where possible. diff --git a/image-copy-gcr/go.mod b/image-copy-gcp/go.mod similarity index 99% rename from image-copy-gcr/go.mod rename to image-copy-gcp/go.mod index 5aa1695..f11719c 100644 --- a/image-copy-gcr/go.mod +++ b/image-copy-gcp/go.mod @@ -1,4 +1,4 @@ -module github.com/chainguard-dev/platform-examples/image-copy-gcr +module github.com/chainguard-dev/platform-examples/image-copy-gcp go 1.21 diff --git a/image-copy-gcr/go.sum b/image-copy-gcp/go.sum similarity index 100% rename from image-copy-gcr/go.sum rename to image-copy-gcp/go.sum diff --git a/image-copy-gcr/hack/update-codegen.sh b/image-copy-gcp/hack/update-codegen.sh similarity index 100% rename from image-copy-gcr/hack/update-codegen.sh rename to image-copy-gcp/hack/update-codegen.sh diff --git a/image-copy-gcr/hack/update-deps.sh b/image-copy-gcp/hack/update-deps.sh similarity index 100% rename from image-copy-gcr/hack/update-deps.sh rename to image-copy-gcp/hack/update-deps.sh diff --git a/image-copy-gcr/iac/.gitignore b/image-copy-gcp/iac/.gitignore similarity index 100% rename from image-copy-gcr/iac/.gitignore rename to image-copy-gcp/iac/.gitignore diff --git a/image-copy-gcr/iac/main.tf b/image-copy-gcp/iac/main.tf similarity index 99% rename from image-copy-gcr/iac/main.tf rename to image-copy-gcp/iac/main.tf index 0ac7ff1..ef1795c 100644 --- a/image-copy-gcr/iac/main.tf +++ b/image-copy-gcp/iac/main.tf @@ -8,7 +8,7 @@ terraform { } locals { - importpath = "github.com/chainguard-dev/platform-examples/image-copy-gcr" + importpath = "github.com/chainguard-dev/platform-examples/image-copy-gcp" } provider "google" { diff --git a/image-copy-gcr/iac/outputs.tf b/image-copy-gcp/iac/outputs.tf similarity index 100% rename from image-copy-gcr/iac/outputs.tf rename to image-copy-gcp/iac/outputs.tf diff --git a/image-copy-gcr/iac/variables.tf b/image-copy-gcp/iac/variables.tf similarity index 100% rename from image-copy-gcr/iac/variables.tf rename to image-copy-gcp/iac/variables.tf diff --git a/image-copy-gcr/main.go b/image-copy-gcp/main.go similarity index 100% rename from image-copy-gcr/main.go rename to image-copy-gcp/main.go