-
Notifications
You must be signed in to change notification settings - Fork 8
/
orb.tmpl.yml
40 lines (38 loc) · 1.21 KB
/
orb.tmpl.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
version: 2.1
description: "Automatically builds and pushes Docker images."
display:
source_url: "https://github.com/remind101/docker-build"
jobs:
# build a docker image and push to docker hub and ECR
build-push:
parameters:
checkout:
description: >-
If false, skip checking out the repository. This is useful when
combined with pre-steps to use only workspace-attached files.
type: "boolean"
default: true
build-args:
description: >-
Additional arguments to be passed to "docker build", e.g. "--target my-stage --build-arg FOO=42".
type: "string"
default: ""
resource-class:
description: Docker executor resource class.
type: "string"
default: "medium"
docker:
- image: "{{docker_image}}"
resource_class: << parameters.resource-class >>
environment:
DOCKER_BUILDKIT: "1"
BUILDKIT_PROGRESS: "plain"
steps:
- when:
condition: << parameters.checkout >>
steps:
- checkout
- setup_remote_docker
- run:
name: Build, tag, and push to Docker Hub and AWS ECR
command: docker-build << parameters.build-args >>