-
Notifications
You must be signed in to change notification settings - Fork 0
/
wercker.yml
84 lines (76 loc) · 2.8 KB
/
wercker.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
## This references the default golang container from
# the Docker Hub: https://registry.hub.docker.com/u/library/golang/
# If you want Google's container you would reference google/golang
# Read more about containers on our dev center
# http://devcenter.wercker.com/docs/containers/index.html
box: golang
# This is the build pipeline. Pipelines are the core of wercker
# Read more about pipelines on our dev center
# http://devcenter.wercker.com/docs/pipelines/index.html
# You can also use services such as databases. Read more on our dev center:
# http://devcenter.wercker.com/docs/services/index.html
# services:
# - postgres
# http://devcenter.wercker.com/docs/services/postgresql.html
# - mongo
# http://devcenter.wercker.com/docs/services/mongodb.html
build-box:
# The steps that will be executed on build
# Steps make up the actions in your pipeline
# Read more about steps on our dev center:
# http://devcenter.wercker.com/docs/steps/index.html
steps:
# Sets the go workspace and places you package
# at the right place in the workspace tree
- setup-go-workspace
# Build the project
- script:
name: go build
code: |
go build -o hello ./...
echo "Buildbox!"
pwd
ls -l
echo "in build pipeline" > $WERCKER_CACHE_DIR/pipelines.txt
echo "cache dir is ${WERCKER_CACHE_DIR}"
cp ./hello /pipeline/source
build:
# The steps that will be executed on build
# Steps make up the actions in your pipeline
# Read more about steps on our dev center:
# http://devcenter.wercker.com/docs/steps/index.html
steps:
# Sets the go workspace and places you package
# at the right place in the workspace tree
- setup-go-workspace
# Build the project
- script:
name: go build
code: |
go build -o hello ./...
echo "Build plain!"
echo "Env var DOLLARTEST is $DOLLARTEST"
pwd
ls -l
echo "in build pipeline" > $WERCKER_CACHE_DIR/pipelines.txt
echo "cache dir is ${WERCKER_CACHE_DIR}"
cp ./hello /pipeline/source
- internal/docker-push:
username: $DOCKER_USERNAME
password: $DOCKER_PASSWORD
working-dir: /pipeline/source
cmd: ./hello
tag: latest,$WERCKER_GIT_BRANCH-$WERCKER_GIT_COMMIT
repository: iad.ocir.io/odx-pipelines/spinnaker/demo_hellogo
registry: https://iad.ocir.io/v2
deploy:
box: golang:1.8
steps:
- internal/docker-push:
username: $DOCKER_USERNAME
password: $DOCKER_PASSWORD
working-dir: /pipeline/source
cmd: ./hello
tag: latest,$WERCKER_GIT_BRANCH-$WERCKER_GIT_COMMIT
repository: iad.ocir.io/odx-pipelines/spinnaker/demo_hellogo
registry: https://iad.ocir.io/v2