-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathJenkinsfile
More file actions
33 lines (31 loc) · 934 Bytes
/
Copy pathJenkinsfile
File metadata and controls
33 lines (31 loc) · 934 Bytes
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
#!/usr/bin/env groovy
pipeline {
agent any
stages {
stage("Initialization") {
steps {
script {
sh './build.sh init'
def version = sh(returnStdout: true, script: 'docker run --rm -u `id -u`:`id -g` --env MAVEN_CONFIG=/var/maven/.m2 -w /usr/src/maven -v ./:/usr/src/maven -v ~/.m2:/var/maven/.m2 opendigitaleducation/mvn-java8-node20:latest mvn -Duser.home=/var/maven help:evaluate -Dexpression=project.version -DforceStdout -q')
buildName "${env.GIT_BRANCH.replace("origin/", "")}@${version}"
}
}
}
stage('Build') {
steps {
checkout scm
sh './build.sh init clean install publish'
}
}
stage('Build image') {
steps {
sh './edifice image --archs=linux/amd64 --rebuild=false'
}
}
}
post {
cleanup {
sh 'docker-compose down || true'
}
}
}