-
Notifications
You must be signed in to change notification settings - Fork 45
/
toolchains-ubuntu1604-stable.yaml
216 lines (216 loc) · 6.32 KB
/
toolchains-ubuntu1604-stable.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
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
#
# THIS IS NO LONGER REFERENCED; KEPT FOR ADDING FUTURE SUPPORT
#
toolchains:
c: [ env, compiler ]
cpp: [ env, compiler ]
erlang: [ env, otp_release ]
go: [ env, go_import_path, go ]
groovy: [ env, jdk ]
java: [ env, jdk ]
node_js: [ env, node_js ]
python: [ env, python ]
ruby: [ gemfile, env, rvm, jdk ]
shell: [ env ]
agent_custom_setup:
friendlyLabel: false
matrix: disabled
comment: Allows us to configure custom setup commands for every agent.
default_ivalue: /bin/true
'*': ${jervis_toolchain_ivalue}
compiler:
default_ivalue: gcc
friendlyLabel: true
gcc: |-
export CXX="g++"
export CC="gcc"
clang: |-
export CXX="clang++"
export CC="clang"
docker:
default_ivalue: disabled
friendlyLabel: true
matrix: disabled
comment: For hosts supporting docker in docker.
enabled: |-
# for admins to set a Docker registry mirror such as Nexus
REGISTRY_MIRROR=""
if ! groups | grep docker; then
groups
echo 'ERROR: current user is not a part of the "docker" group' >&2
exit 1
fi
# start the docker daemon which uses /var/lib/docker
dockerd_args=()
if [-n "${REGISTRY_MIRROR:-}" ]; then
dockerd_args+=( --registry-mirror "${REGISTRY_MIRROR:-}" )
fi
pgrep dockerd || sudo -i nohup dockerd "${dockerd_args[@]}" -D &> ~/docker.log &
# wait for docker daemon to finish starting
function wait_for_docker() {
local count=0
until curl -fL --unix-socket /var/run/docker.sock http://localhost/info; do
(( count=count+1 ))
if [ "${count}" -gt 300 ]; then
ps aux
sudo /bin/bash -c 'ls -l /proc/$(pgrep dockerd)/fd'
echo 'Docker daemon did not start.' >&2
[ ! -f nohup.out ] || cat nohup.out >&2
return 1
fi
sleep 1
done
}; wait_for_docker
groups
if type -P rpm &> /dev/null; then
rpm -q --info "$(rpm -q --whatprovides "$(type -P docker)")"
fi
docker info
disabled: ''
env:
matrix: advanced
'*': export ${jervis_toolchain_ivalue}
gemfile:
default_ivalue: ${PWD}/Gemfile
'*': export BUNDLE_GEMFILE="${jervis_toolchain_ivalue}"
go_import_path:
default_ivalue: ${JERVIS_DOMAIN}/${JERVIS_ORG}/${JERVIS_PROJECT}
'*': |-
GO_IMPORT_PATH="${jervis_toolchain_ivalue}"
#remove possible leading or trailing slashes
GO_IMPORT_PATH=${GO_IMPORT_PATH%/}
GO_IMPORT_PATH=${GO_IMPORT_PATH#/}
export GO_IMPORT_PATH
go:
default_ivalue: '1.5'
friendlyLabel: true
comment: Uses gimme - https://github.com/travis-ci/gimme
cleanup: |-
cd "${WORKSPACE}"
rm -rf "${GOPATH}"
'*': |-
export GOMAXPROCS=${GOMAXPROCS:-2}
eval "$(gimme ${jervis_toolchain_ivalue})"
export GOPATH="${HOME}/.gopath/${JERVIS_ORG}-${JERVIS_PROJECT}-${JERVIS_RANDOM}-${jervis_toolchain_ivalue}"
export PATH="${GOPATH}/bin:${PATH}"
mkdir -p "${GOPATH}/src/${GO_IMPORT_PATH}"
#remove the last directory at the end of the path so we can symlink
rmdir "${GOPATH}/src/${GO_IMPORT_PATH}"
ln -fs "${PWD}" "${GOPATH}/src/${GO_IMPORT_PATH}"
cd "${GOPATH}/src/${GO_IMPORT_PATH}/"
gimme version
go version
go env
jdk:
default_ivalue: openjdk8
friendlyLabel: true
openjdk8: |-
export JAVA_HOME="${HOME}/java/openjdk8"
export PATH="${JAVA_HOME}/bin:${PATH}"
java -Xmx32m -version
javac -J-Xmx32m -version
openjdk9: |-
export JAVA_HOME="${HOME}/java/openjdk9"
export PATH="${JAVA_HOME}/bin:${PATH}"
java -Xmx32m -version
javac -J-Xmx32m -version
node_js:
default_ivalue: '0.10'
friendlyLabel: true
comment: Uses nvm - https://github.com/creationix/nvm
'*': |-
set +x
echo "$ source \"${HOME}/.nvm/nvm.sh\""
source "${HOME}/.nvm/nvm.sh"
nvm install "${jervis_toolchain_ivalue}"
echo "$ nvm --version"
nvm --version
set -x
node --version
npm --version
otp_release:
default_ivalue: '0.10'
friendlyLabel: true
comment: Uses kerl - https://github.com/yrashk/kerl
'*': |-
set +x
echo "$ source \"${HOME}/otp/${jervis_toolchain_ivalue}/activate\""
source "${HOME}/otp/${jervis_toolchain_ivalue}/activate"
set -x
python:
default_ivalue: '2.7'
friendlyLabel: true
'2.6': |-
set +x
echo "$ source \"${HOME}/virtualenv/python2.6/bin/activate\""
source "${HOME}/virtualenv/python2.6/bin/activate"
set -x
python --version
pip --version
'2.7': |-
set +x
echo "$ source \"${HOME}/virtualenv/python2.7/bin/activate\""
source "${HOME}/virtualenv/python2.7/bin/activate"
set -x
python --version
pip --version
'3.2': |-
set +x
echo "$ source \"${HOME}/virtualenv/python3.2/bin/activate\""
source "${HOME}/virtualenv/python3.2/bin/activate"
set -x
python --version
pip --version
'3.3': |-
set +x
echo "$ source \"${HOME}/virtualenv/python3.3/bin/activate\""
source "${HOME}/virtualenv/python3.3/bin/activate"
set -x
python --version
pip --version
'3.4': |-
set +x
echo "$ source \"${HOME}/virtualenv/python3.4/bin/activate\""
source "${HOME}/virtualenv/python3.4/bin/activate"
set -x
python --version
pip --version
pypy: |-
set +x
echo "$ source \"${HOME}/virtualenv/pypy/bin/activate\""
source "${HOME}/virtualenv/pypy/bin/activate"
set -x
python --version
pip --version
pypy3: |-
set +x
echo "$ source \"${HOME}/virtualenv/pypy3/bin/activate\""
source "${HOME}/virtualenv/pypy3/bin/activate"
set -x
python --version
pip --version
rvm:
default_ivalue: 1.9.3
friendlyLabel: true
comment: Uses rvm - https://rvm.io/
cleanup: rvm gemset delete "${JERVIS_GEMSET}" --force
'*': |-
set +ux
echo rvm_silence_path_mismatch_check_flag=1 > ~/.rvmrc
echo "$ source \"${HOME}/.rvm/scripts/rvm\""
source "${HOME}/.rvm/scripts/rvm"
if ! rvm list | grep -q "${jervis_toolchain_ivalue}";then
rvm install "${jervis_toolchain_ivalue}"
fi
export JERVIS_GEMSET="${jervis_toolchain_ivalue}@${JERVIS_PROJECT}-${BUILD_NUMBER}"
rvm use "${JERVIS_GEMSET}" --create
if awk -F. '$1 >= 2 && $2 >= 3 {exit(1)}' <<< "${jervis_toolchain_ivalue}"; then
rvm "${jervis_toolchain_ivalue}" do gem install bundler -v '~>1'
else
rvm "${jervis_toolchain_ivalue}" do gem install bundler
fi
gem install rubygems-bundler
echo '$ rvm current'
rvm current
set -x
ruby --version