|
9 | 9 |
|
10 | 10 | working_directory: /go/src/github.com/warrensbox/terraform-switcher
|
11 | 11 |
|
12 |
| - steps: |
13 |
| - - checkout |
14 |
| - - run: go get -v -t -d ./... |
15 |
| - - run: go vet -tests=false ./... |
16 |
| - - run: go test -v ./... |
17 |
| - - run: mkdir -p build |
18 |
| - - run: go build -v -o build/tfswitch |
19 |
| - |
20 |
| - - persist_to_workspace: |
21 |
| - root: build |
22 |
| - paths: tfswitch |
23 |
| - |
24 |
| - test-ubuntu: |
25 |
| - docker: |
26 |
| - - image: "circleci/ubuntu-server" |
27 |
| - |
28 |
| - steps: |
29 |
| - |
30 |
| - - run: ls |
31 |
| - |
32 |
| - - attach_workspace: |
33 |
| - at: build |
34 |
| - |
35 |
| - test-alpine: |
36 |
| - docker: |
37 |
| - - image: "mhart/alpine-node" |
38 |
| - |
39 |
| - steps: |
40 |
| - - run: ls |
41 |
| - |
42 |
| - develop-master: |
43 |
| - docker: |
44 |
| - - image: warrensbox/go-rb-py-aws |
45 |
| - |
46 | 12 | steps:
|
47 | 13 | - checkout
|
48 | 14 | - run:
|
49 |
| - command: | |
50 |
| - echo "Placeholder" |
51 |
| - # cd docs; bundle install --path vendor/bundler; bundle exec jekyll build -c _config.yml; cd .. |
52 |
| - # git config user.email "warren.veerasingam@gmail.com" |
53 |
| - # git config user.name "warrensbox" |
54 |
| - # git add . |
55 |
| - # git commit -m "Release Version" |
56 |
| - # git push origin ${RELEASE_VERSION} |
57 |
| -
|
| 15 | + command: | |
| 16 | + set +e |
| 17 | + go get -v -t -d ./... |
| 18 | + go vet -tests=false ./... |
| 19 | + go test -v ./... |
| 20 | + mkdir -p build |
| 21 | + go build -v -o build/tfswitch |
58 | 22 |
|
59 | 23 | release:
|
60 | 24 | docker:
|
61 |
| - - image: warrensbox/go-rb-py-aws |
| 25 | + - image: circleci/golang:1.11 |
| 26 | + |
| 27 | + working_directory: /go/src/github.com/warrensbox/terraform-switcher |
62 | 28 |
|
63 | 29 | steps:
|
64 | 30 | - checkout
|
65 | 31 | - run:
|
66 | 32 | command: |
|
67 |
| - set +e |
| 33 | + set +e |
68 | 34 | source version
|
69 | 35 | export RELEASE_VERSION;
|
70 | 36 | RELEASE_VERSION=$RELEASE_VERSION.${CIRCLE_BUILD_NUM}
|
71 | 37 | export RELEASE_VERSION;
|
72 | 38 | echo $RELEASE_VERSION
|
73 |
| - |
74 |
| - go get -v -t -d ./... |
| 39 | + mkdir -p /home/circleci/bin |
| 40 | + curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh |
| 41 | + export PATH="/home/warrensbox/bin:${PATH}" |
| 42 | + rm -rf dist |
75 | 43 | git config user.email "warren.veerasingam@gmail.com"
|
76 | 44 | git config user.name "warrensbox"
|
77 | 45 | git tag -a ${RELEASE_VERSION} -m "Release Version"
|
78 | 46 | git push origin ${RELEASE_VERSION}
|
79 |
| - curl -L https://git.io/goreleaser | VERSION=v0.76.1 bash |
| 47 | + curl -L https://git.io/goreleaser | VERSION=v0.99.0 bash -s -- --rm-dist |
80 | 48 |
|
81 |
| - cd docs; bundle install --path vendor/bundler; bundle exec jekyll build -c _config.yml; cd .. |
82 | 49 |
|
83 | 50 | workflows:
|
84 | 51 | version: 2
|
85 | 52 |
|
86 | 53 | build_and_test:
|
87 | 54 | jobs:
|
88 | 55 | - build
|
89 |
| - - test-ubuntu: |
90 |
| - requires: |
91 |
| - - build |
92 |
| - - test-alpine: |
93 |
| - requires: |
94 |
| - - build |
95 |
| - - develop-master: |
96 |
| - requires: |
97 |
| - - test-ubuntu |
98 |
| - - test-alpine |
99 |
| - filters: |
100 |
| - branches: |
101 |
| - only: |
102 |
| - - master |
103 |
| - - release |
104 | 56 | - release:
|
105 | 57 | requires:
|
106 |
| - - develop-master |
| 58 | + - build |
107 | 59 | filters:
|
108 | 60 | branches:
|
109 | 61 | only:
|
|
0 commit comments