Commit 9ef6689e authored by Guido Gunther's avatar Guido Gunther
Browse files

blessed-builds: Stash files

This makes sure we have the needed artifaces even when switching
workspace orbuilder.

Closes: #62
parent 13f1a25c
......@@ -50,6 +50,7 @@ Yaml yaml = new Yaml()
def jobsfile = (new File(__FILE__)).parent + '/jobs.yml'
println("Using jobsfile : ${jobsfile}")
def pkgs = yaml.load(new File(jobsfile).text)
def uploads = '*.deb *.tar.* *.diff.* *.dsc *.changes *.buildinfo'
pkgs.each { pkg ->
params = pkg.value
......@@ -145,6 +146,7 @@ pkgs.each { pkg ->
""".stripIndent()
node_label = "${os}-${arch}"
stash = "${os}-${pkg.key}-${arch}"
pipelineJob(name) {
......@@ -181,6 +183,7 @@ pkgs.each { pkg ->
])
def result = sh returnStatus: true, script: '''${build_cmd}'''
stash name: '${stash}', allowEmpty: false, includes: "${uploads.replaceAll(' ',',')}"
if(result != 0) {
if(result == 128) {
......@@ -209,12 +212,16 @@ pkgs.each { pkg ->
stage('Save Artifacts') {
node ('${node_label}') {
unstash '${stash}'
archiveArtifacts '${artifacts}'
}
}
stage('Upload Debian Packages') {
node ('${node_label}') {
unstash '${stash}'
def result = sh returnStatus: true, script: '''${upload_cmd}'''
if(result != 0) {
if (result == 64) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment