This repository has been archived by the owner on May 19, 2020. It is now read-only.
/
circle.yml
55 lines (53 loc) · 2.19 KB
/
circle.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
machine:
environment:
GODIST: "go1.6.linux-amd64.tar.gz"
WS: "/home/ubuntu/.go_workspace/src/github.com/18F/cg-deck"
CF_API: "https://api.cloud.gov"
CF_ORGANIZATION: "cf"
CF_API_GC: "https://api.fr.cloud.gov"
CF_ORGANIZATION_GC: "cloud-gov"
post:
- cd cg-deck && nvm install && nvm use && nvm alias default $(nvm current)
- mkdir -p download
- test -e download/$GODIST || curl -o download/$GODIST https://storage.googleapis.com/golang/$GODIST
- sudo rm -rf /usr/local/go
- sudo tar -C /usr/local -xzf download/$GODIST
dependencies:
cache_directories:
- "$WS/node_modules/"
pre:
- sudo apt-get update; sudo apt-get install libicu52
- curl --output /home/ubuntu/bin/phantomjs-2.0.1-linux-x86_64-dynamic https://s3.amazonaws.com/circle-support-bucket/phantomjs/phantomjs-2.0.1-linux-x86_64-dynamic
- chmod a+x /home/ubuntu/bin/phantomjs-2.0.1-linux-x86_64-dynamic
- sudo ln -s --force /home/ubuntu/bin/phantomjs-2.0.1-linux-x86_64-dynamic /usr/local/bin/phantomjs
- go version
- go get github.com/Masterminds/glide
- mkdir -p $WS && cp -R /home/ubuntu/cg-deck/. $WS
- cd $WS && glide install
- cd $WS && npm install
override:
- cd $WS && go build
- cd $WS && npm run build
test:
pre:
- go get github.com/axw/gocov/gocov
- go get github.com/mattn/goveralls
- if ! go get github.com/golang/tools/cmd/cover; then go get golang.org/x/tools/cmd/cover; fi
override:
- cd $WS && ./codecheck.sh -u
- cd $WS && npm test
deployment:
deploy:
branch: [master, staging, deprecated]
owner: 18F
commands:
- pip install --user ruamel.yaml
- export BUILD_INFO=build::$CIRCLE_BRANCH::$(date -u "+%Y-%m-%d-%H-%M-%S")::$CIRCLE_BUILD_NUM::$(deploy/npm-version.sh) && python deploy/vars-to-manifest.py
- chmod a+x deploy/circle_deploy.sh && deploy/circle_deploy.sh
production:
tag: /[0-9]+(\.[0-9]+)*/
owner: 18F
commands:
- pip install --user ruamel.yaml
- export BUILD_INFO=build::$CIRCLE_BRANCH::$(date -u "+%Y-%m-%d-%H-%M-%S")::$CIRCLE_BUILD_NUM::$(deploy/npm-version.sh) && python deploy/vars-to-manifest.py
- chmod a+x deploy/circle_deploy.sh && deploy/circle_deploy.sh