-
Notifications
You must be signed in to change notification settings - Fork 232
/
config.yml
125 lines (120 loc) · 3.09 KB
/
config.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
## Circleci version
version: 2
## Machine specific variable
jobs:
build:
macos:
xcode: "10.0.0"
environment:
GOVERSION: "1.13.4"
## Build crc
steps:
- checkout
- run:
name: Configure GOPATH
command: echo 'export GOPATH=$HOME/go' >> $BASH_ENV
- run:
name: Configure Path
command: echo 'export PATH=$GOPATH/bin:/usr/local/go/bin/:$PATH' >> $BASH_ENV
- run:
name: Cleanup GOROOT
command: sudo rm -rf /usr/local/go
- run:
name: Install go
command: curl https://dl.google.com/go/go${GOVERSION}.darwin-amd64.tar.gz | sudo tar -C /usr/local -xz
- run:
name: List go version
command: go version
- run:
name: List go environment
command: go env
- run:
name: Make
command: make
- run:
name: Make fmtcheck
command: make fmtcheck
- run:
name: Run golangci-lint
command: make cross-lint
- run:
name: Run gosec
command: make gosec
- run:
name: Make cross
command: make cross
- run:
name: Run unit tests
command: make test
- store_artifacts:
path: ~/project/out
destination: crc
build_docs:
machine:
image: ubuntu-1604:201903-01
steps:
- checkout
- run:
name: Update repo
command: sudo apt -y update
- run:
name: Add podman ppa
command: sudo add-apt-repository -y ppa:projectatomic/ppa && sudo apt -y update
- run:
name: Update repo
command: sudo apt -y update
- run:
name: Install podman
command: sudo apt -y install podman
- run:
name: Install slirp4netns
command: sudo apt -y install slirp4netns
- run:
name: Check podman
command: podman info
- run:
name: Make build_docs
# force GOPATH to a sane value as the image we are using has an older go version
# with a 'go env GOPATH' output which causes make failures
command: make GOPATH="/home/circleci/go" build_docs
- persist_to_workspace:
root: docs/build
paths: index.html
docs_deploy:
machine:
image: ubuntu-1604:201903-01
steps:
- attach_workspace:
at: docs/build
- add_ssh_keys:
fingerprints:
- "c5:64:d4:79:8f:c7:9b:80:b8:16:71:20:57:6b:8c:94"
- run:
name: Configure git
command: |
cd docs/build/
git init
git remote add origin git@github.com:code-ready/crc.git
git config user.email "codereadycontainers@gmail.com"
git config user.name "crc-bot"
- run:
name: Deploy docs to gh-pages branch
command: |
cd docs/build/
git checkout -b gh-pages
git add .
git commit -m "[skip ci] Docs update"
git push origin HEAD -f
workflows:
version: 2
build:
jobs:
- build
- build_docs
- docs_deploy:
requires:
- build
- build_docs
filters:
branches:
only: master