Build and Push to GCR Step Settings

Updated 2 months ago by Michael Cretzman

This topic provides settings for Build and Push to GCR step.

This step builds an image and pushes it to GCR.

In this topic:

Requirements

This step assumes that the target GCR registry meets the GCR requirements for pushing images.

See Pushing and pulling images from Google.

Name

The unique name for this Connector.

ID

See Entity Identifier Reference.

GCP Connector

The Harness GCP Connector to use to connect to GCR.

See Google Cloud Platform (GCP) Connector Settings Reference.

Host

The GCR registry hostname. For example, us.gcr.io hosts image in data centers in the United States, in a separate storage bucket from images hosted by gcr.io.

Project ID

The GCP Resource Manager project ID.

Image Name

The name of the image you want to built.

Tags

Docker build tag (-t).

Each tag should added separately.

Dockerfile

The name of the Dockerfile. If you do not provide a name, Harness assumes the Dockerfile is in the root folder of the codebase.

Context

Context represents a directory containing a Dockerfile which kaniko will use to build your image. For example, COPY command in your Dockerfile should refer to a file in the build context.

Labels

Docker object labels to add metadata to the Docker image.

Build Arguments

The Docker build-time variables (--build-arg).

Target

The Docker target build stage (--target).

For example, build-env.

Remote Cache Image

Enter the Cache repo name.

The Remote Cache Repository must be already created in the same account and organization as the build image. The entered repository name must exist for caching to work.

Run as User

Set the value to specify the user id for all processes in the pod, running in containers. See Set the security context for a pod.

Set container resources

Maximum resources limit values for the resources used by the container at runtime.

Limit Memory

Maximum memory that the container can use.

You can express memory as a plain integer or as a fixed-point number using one of these suffixes: G, M.

You can also use the power-of-two equivalents: Gi, Mi.

Limit CPU

See Resource units in Kubernetes.

Limit the number of cores that the container can use.

Limits for CPU resources are measured in cpu units.

Fractional requests are allowed. The expression 0.1 is equivalent to the expression 100m, that can be read as one hundred millicpu.

Timeout

Timeout for the step. Once the timeout is reached, the step fails, and the Pipeline execution continues.

See Also


Please Provide Feedback