Provide official container that deploys to GCP-GCR

Problem to solve

Users want to easily Log into Google Cloud Platform, then build and push image to GCR

Intended users

Further details

How this looks in CircleCI orbs:

Usage Examples simple-build-and-push Log into Google Cloud Plaform, then build and push image to GCR

orbs:
  gcp-gcr: circleci/gcp-gcr@x.y.z
version: 2.1
workflows:
  build_and_push_image:
    jobs:
      - gcp-gcr/build-and-push-image:
          context: myContext
          image: my-image
          registry-url: us.gcr.io

tag-existing-image Log into Google Cloud Plaform, then tag an existing image with "latest"

orbs:
  gcp-gcr: circleci/gcp-gcr@x.y.z
version: 2.1
workflows:
  build_and_push_image:
    jobs:
      - gcp-gcr/add-image-tag:
          context: myContext
          image: my-image
          registry-url: us.gcr.io
          source-tag: mytag1
          target-tag: mytag2

Proposal

Users need to:

  • Install GCP CLI
  • Build a Docker image
  • Configure Docker to use gcloud as a credential helper.
  • Push a container image to the GCR registry
  • Tag image

Partial yml file (linked below):

stages:
  - publish
publish:
  stage: publish
  script:
    - docker build -t $IMAGE_NAME .
    - docker tag $IMAGE_NAME "us.gcr.io/$GCLOUD_PROJECT_ID/$IMAGE_NAME"
    - docker push "us.gcr.io/$GCLOUD_PROJECT_ID/$IMAGE_NAME:latest"
  only:
    - master

Permissions and Security

Documentation

Availability & Testing

What does success look like, and how can we measure that?

What is the type of buyer?

Links / references

This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.

Edited by 🤖 GitLab Bot 🤖