-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pass the build qualifier to the build script
VN-3066
- Loading branch information
1 parent
238d089
commit 405b91d
Showing
1 changed file
with
10 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
def qualifier | ||
|
||
pipeline { | ||
agent { | ||
dockerfile { | ||
|
@@ -29,6 +31,8 @@ pipeline { | |
stage('Setup') { | ||
steps { | ||
script { | ||
qualifier = "v${new Date().format('yyyyMMddHHmmss')}" | ||
echo "Using build qualifier $qualifier" | ||
if (params.distSign && !params.dists) { | ||
def msg = 'You have to enable dists, if you want to sign packages.' | ||
buildDescription msg | ||
|
@@ -50,19 +54,19 @@ pipeline { | |
} | ||
} | ||
buildDescription "${env.GIT_BRANCH} ${env.GIT_COMMIT[0..8]}" | ||
sh './verinice-distribution/build.sh clean' | ||
sh "./verinice-distribution/build.sh QUALIFIER=${qualifier} clean" | ||
} | ||
} | ||
stage('Fetch JREs') { | ||
steps { | ||
sh "./verinice-distribution/build.sh JREVERSION=${params.jreversion} -j4 jres" | ||
sh "./verinice-distribution/build.sh QUALIFIER=${qualifier} JREVERSION=${params.jreversion} -j4 jres" | ||
} | ||
} | ||
stage('Build') { | ||
steps { | ||
script { | ||
def buildTask = params.runIntegrationTests ? 'verify' : 'products' | ||
sh "./verinice-distribution/build.sh ${buildTask}" | ||
sh "./verinice-distribution/build.sh QUALIFIER=${qualifier} ${buildTask}" | ||
archiveArtifacts artifacts: 'sernet.verinice.releng.client.product/target/products/*.zip,sernet.verinice.releng.server.product/target/*.war', fingerprint: true | ||
if (params.archiveUpdateSite || params.dists){ | ||
archiveArtifacts artifacts: 'sernet.verinice.releng.client.product/target/repository/**', fingerprint: true | ||
|
@@ -112,7 +116,7 @@ pipeline { | |
} | ||
stage('Documentation') { | ||
steps { | ||
sh "./verinice-distribution/build.sh -j4 docs" | ||
sh "./verinice-distribution/build.sh QUALIFIER=${qualifier} -j4 docs" | ||
archiveArtifacts artifacts: 'doc/manual/*/*.pdf,doc/manual/*/*.zip', fingerprint: true | ||
} | ||
} | ||
|
@@ -135,7 +139,7 @@ pipeline { | |
expression { params.dists && currentBuild.result in [null, 'SUCCESS'] } | ||
} | ||
steps { | ||
sh "./verinice-distribution/build.sh -j2 dists" | ||
sh "./verinice-distribution/build.sh QUALIFIER=${qualifier} -j2 dists" | ||
} | ||
} | ||
// Signing is a separate step because we want to be able to build RPMs any time, to test them. | ||
|
@@ -160,7 +164,7 @@ pipeline { | |
emailext body: '${JELLY_SCRIPT,template="text"}', subject: '$DEFAULT_SUBJECT', to: '[email protected], [email protected], [email protected], [email protected], [email protected]' | ||
} | ||
success { | ||
sh './verinice-distribution/build.sh clean' | ||
sh './verinice-distribution/build.sh QUALIFIER=${qualifier} clean' | ||
} | ||
} | ||
} | ||
|