Build and Push to ECR Step Settings

Updated 1 month ago by Michael Cretzman

This topic provides settings for the Build and Push to ECR step.

This step builds an image and pushes it to AWS ECR.

In this topic:

Name

The unique name for this Connector.

ID

See Entity Identifier Reference.

AWS Connector

The Harness AWS Connector to use to connect to ECR.

The AWS IAM roles and policies associated with the account used in the Harness AWS Connector must be able to push to ECR.

See AWS Connector Settings Reference.

Region

The AWS region to use when pushing the image.

The registry format for ECR is aws_account_id.dkr.ecr.region.amazonaws.com and a region is required.

See Pushing a Docker image from AWS.

Account ID

The AWS account ID to use when pushing the image.

The registry format for ECR is aws_account_id.dkr.ecr.region.amazonaws.com and an account ID is required.

See Pushing a Docker image from AWS.

Image Name

The name of the image you are pushing. It can be any name.

Tags

Docker build tag (-t).

Each tag should added separately.

Optimize

Enables this option to redo snapshot mode.

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 remote cache image name.

The Remote Cache Image must be already created in the same account and organization as the build image. The entered image 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