Add clean up stage.

This commit is contained in:
Manuele Simi 2019-09-03 21:05:07 -04:00
parent 78e6dc98aa
commit bb39712cf5
1 changed files with 13 additions and 3 deletions

View File

@ -51,11 +51,10 @@ def text = releaseURL.toURL().getText()
//parsing
def jsonConfig = new Yaml().load(text)
println jsonConfig.inspect()
echo "gCube v. ${jsonConfig.gCube_release.Version}"
assert jsonConfig.gCube_release.Version == params.gCube_release_version : "Release versions do not match!"
echo "BUilding gCube v. ${jsonConfig.gCube_release.Version}"
echo "Found components:"
jsonConfig.gCube_release.Components.each{println it.key}
jsonConfig.gCube_release.Components.each{ println it.key }
pipeline {
@ -84,6 +83,17 @@ pipeline {
//see https://jenkins.io/doc/book/pipeline/syntax/#stages
stages {
stage('clean up before starting') {
steps {
sh '''
echo "Create a fresh local repository"
rm -rf $MAVEN_LOCAL_REPO
mkdir -p $MAVEN_LOCAL_REPO
echo "Done with local repository"
'''
}
}
stage('build SmartGears components') {
steps {
buildComponents items: jsonConfig.gCube_release.Components.SmartGears.collect { "${it}" }