forked from lreimer/everything-as-code
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
33 lines (25 loc) · 812 Bytes
/
Jenkinsfile
File metadata and controls
33 lines (25 loc) · 812 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
33
#!/usr/bin/env groovy
node {
stage 'Pipeline-as-code'
echo "The build pipeline for Everything-as-code."
echo "${env.BUILD_ID}"
echo "${env.BUILD_TAG}"
stage 'Checkout SCM'
checkout scm
stage 'Build/Analyse/Test'
sh './gradlew clean build'
archiveUnitTestResults()
archiveDistributions()
// add additional stages to build docker image
// run integration and performance tests
// maybe add a stage to deploy the image to
// the infrastructure
stage 'Generate Documentation'
sh './gradlew asciidoctor'
}
def archiveUnitTestResults() {
step([$class: "JUnitResultArchiver", testResults: "build/**/TEST-*.xml"])
}
def archiveDistributions() {
step([$class: 'ArtifactArchiver', artifacts: 'build/distributions/*.zip', fingerprint: true])
}