-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathJenkinsfile
36 lines (34 loc) · 927 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
33
34
35
36
pipeline {
agent any
stages {
stage('Build') {
steps {
withEnv(["DOCKER_JENKINS_HOME=${env.DOCKER_JENKINS_MOUNT}"]) {
sh('''set +x ; source ./build-env.sh
build.sh''')
}
}
}
stage('Tests') {
steps {
sh('''set +x ; source ./build-env.sh
go test''')
}
}
/* stage('Deploy') {
when { branch 'master' }
steps {
withCredentials([
usernamePassword(credentialsId: 'github-jenkins-cred', usernameVariable: 'GITHUB_USER', passwordVariable: 'GITHUB_TOKEN')]) {
sh('''set +x ; source ./build-env.sh
publish.sh latest''')
}
}
}*/
}
post {
success {
deleteDir()
}
}
}