-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy pathbuild_and_publish_image.gocd.yaml
40 lines (40 loc) · 1.16 KB
/
build_and_publish_image.gocd.yaml
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
format_version: 3
pipelines:
build_and_publish_image:
group: sample
label_template: ${COUNT}
lock_behavior: unlockWhenFinished
display_order: 1
environment_variables:
materials:
git:
git: https://github.com/gocd-demo/node-bulletin-board.git
shallow_clone: true
auto_update: true
branch: master
stages:
- build_and_publish_image:
fetch_materials: true
keep_artifacts: false
clean_workspace: false
approval:
type: success
jobs:
build_image:
timeout: 0
elastic_profile_id: demo-app
artifacts:
- external:
id: bulletin-board
store_id: dockerhub
configuration:
options:
Image: ${DOCKERHUB_USERNAME}/bulletin-board
Tag: ${GO_PIPELINE_LABEL}
tasks:
- exec:
arguments:
- -c
- docker build -t $DOCKERHUB_USERNAME/bulletin-board:$GO_PIPELINE_LABEL . -f Dockerfile.application
command: /bin/bash
run_if: passed