Build and Push to GCR Step Settings
This topic provides settings for Build and Push to GCR step.
This step builds an image and pushes it to GCR.
In this topic:
- GCP Connector
- Project ID
- Image Name
- Build Arguments
- Remote Cache Image
- Run as User
- Set container resources
- See Also
This step assumes that the target GCR registry meets the GCR requirements for pushing images.
See Pushing and pulling images from Google.
The unique name for this Connector.
The Harness GCP Connector to use to connect to GCR.
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
The GCP Resource Manager project ID.
The name of the image you want to built.
Docker build tag (
Each tag should added separately.
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 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.
Docker object labels to add metadata to the Docker image.
The Docker build-time variables (
The Docker target build stage (--target).
Remote Cache Image
Enter the Cache repo name.
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.
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 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 for the step. Once the timeout is reached, the step fails, and the Pipeline execution continues.