forked from cilium/packer-ci-build
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
52 lines (49 loc) · 1.46 KB
/
Jenkinsfile
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
def vagrantUpload = { String branch ->
if (branch == "origin/master" || branch == "master") {
return '.'
} else {
return 'del(."post-processors"[])'
}
}
pipeline {
agent {
label 'baremetal'
}
options {
timeout(time: 400, unit: 'MINUTES')
timestamps()
ansiColor('xterm')
}
environment {
JQ = vagrantUpload(env.GIT_BRANCH)
VAGRANTCLOUD_TOKEN = credentials('vagrantcloud token')
AWS_ACCESS_KEY_ID = credentials('AWS_ACCESS_KEY_ID')
AWS_SECRET_ACCESS_KEY = credentials('AWS_SECRET_ACCESS_KEY')
AWS_DEFAULT_REGION = credentials('AWS_DEFAULT_REGION')
CILIUM_BRANCH = "${params.CiliumBranch}"
}
stages {
//stage('OpenSuse') {
// steps {
// sh 'git submodule update --init --recursive'
// sh 'make clean DISTRIBUTION=opensuse'
// sh 'make build DISTRIBUTION=opensuse'
// }
//}
stage('Ubuntu') {
steps {
sh 'echo "${JQ}"'
sh 'echo "AWS region=${AWS_DEFAULT_REGION}"'
sh 'make clean DISTRIBUTION=ubuntu'
sh 'make build DISTRIBUTION=ubuntu'
sh 'make clean NAME_PREFIX="dev-" NAME_SUFFIX="-dev" DISTRIBUTION=ubuntu'
sh 'make build NAME_PREFIX="dev-" NAME_SUFFIX="-dev" DISTRIBUTION=ubuntu'
}
}
}
post {
always {
cleanWs()
}
}
}