-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
49 lines (47 loc) · 1.43 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
pipeline {
agent none
options {
buildDiscarder logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '15', daysToKeepStr: '90', numToKeepStr: '')
}
stages {
stage('prepare') {
agent any
steps {
sh 'git clean -fdx'
}
}
stage('build docker image') {
agent any
steps {
script{
docker.withRegistry('https://ghcr.io','jenkins-github-container-registry') {
dockerimage_public = docker.build("intranda/goobi-proxy-docker:${env.BUILD_ID}_${env.GIT_COMMIT}")
//TODO: Activate this once we want the latest build to point to the latest release
//if (env.GIT_BRANCH == 'origin/master' || env.GIT_BRANCH == 'master') {
// dockerimage_public.push("latest")
//}
echo "Current branch: ${env.GIT_BRANCH}"
if (env.GIT_BRANCH == 'origin/develop' || env.GIT_BRANCH == 'develop') {
dockerimage_public.push("develop")
}
//TODO: Tagged releases need to be solved differently here
//if (latestTag != '') {
// dockerimage_public.push(latestTag)
//}
}
}
}
}
}
post {
changed {
emailext(
subject: '${DEFAULT_SUBJECT}',
body: '${DEFAULT_CONTENT}',
recipientProviders: [requestor(),culprits()],
attachLog: true
)
}
}
}
/* vim: set ts=2 sw=2 tw=120 et :*/