-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathJenkinsfile
32 lines (32 loc) · 1013 Bytes
/
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
pipeline {
agent any
stages {
stage("checkout") {
steps {
git url: "[email protected]:korekontrol/packer-debian9.git"
}
}
stage("build") {
steps {
sh "packer build debian-9-stretch-virtualbox.json"
}
}
stage("publish") {
steps {
sh 'set +x && ' +
'. /opt/jenkins-go-env.sh && ' +
'export GITHUB_USER="korekontrol" && ' +
'export GITHUB_REPO="packer-debian9" && ' +
'set -x && ' +
"export TAG=\"ci-${env.BUILD_NUMBER}\" && " +
'github-release release --tag "${TAG}" --description "Automated build: ${TAG}" && ' +
'github-release upload --tag "${TAG}" --name *.box --file *.box'
}
}
stage("cleanup") {
steps {
sh 'rm -f *.box'
}
}
}
}