YAML examples for Tag Docker Image
Promote Docker image between registries
yaml
- action: "Promote Docker image"
type: "PROMOTE_IMAGE"
same_location: false
src:
docker_registry: "AMAZON_ECR"
image: "my-app"
tag: "$BUDDY_RUN_COMMIT"
integration: "aws_source"
region: "us-east-1"
dest:
docker_registry: "GOOGLE_GCR"
image: "gcr.io/my-project/my-app"
tag: "$BUDDY_RUN_COMMIT"
integration: "gcp_dest"
region: "us-central1"
Simple image promotion
yaml
- action: "Promote image"
type: "PROMOTE_IMAGE"
same_location: true
src:
docker_registry: "DOCKER_HUB"
image: "my-app"
tag: "staging"
integration: "docker_hub"
dest:
tag: "production"
Promote from Google Artifact Registry to custom registry
yaml
- action: "Promote to private registry"
type: "PROMOTE_IMAGE"
same_location: false
src:
docker_registry: "GOOGLE_ARTIFACT_REGISTRY"
registry: "us-central1-docker.pkg.dev"
image: "my-gcp-project/my-repo/myapp:staging"
integration: "google_service_account"
dest:
docker_registry: "OTHER"
registry: "registry.mycompany.com"
image: "mycompany/myapp:production"
username: "deploy-user"
password: "secure_password"
Promote from Docker Hub to Google Artifact Registry
yaml
- action: "Promote to Artifact Registry"
type: "PROMOTE_IMAGE"
same_location: false
src:
docker_registry: "DOCKER_HUB"
image: "mycompany/myapp:v2.1.0"
integration: "docker_hub"
dest:
docker_registry: "GOOGLE_ARTIFACT_REGISTRY"
registry: "us-central1-docker.pkg.dev"
image: "my-gcp-project/my-repo/myapp:production"
integration: "google_service_account"
Promote from GitHub Container Registry to Amazon ECR
yaml
- action: "Promote from GHCR to ECR"
type: "PROMOTE_IMAGE"
same_location: false
src:
docker_registry: "GIT_HUB_CONTAINER_REGISTRY"
image: "mycompany/myapp:latest"
integration: "github_token"
dest:
docker_registry: "AMAZON_ECR"
image: "123456789.dkr.ecr.us-east-1.amazonaws.com/myapp:production"
integration: "aws_integration"
region: "us-east-1"