Skip to content

Commit

Permalink
Archive artifacts in Jenkins
Browse files Browse the repository at this point in the history
  • Loading branch information
R. Kaleta committed Jun 8, 2023
1 parent 69c1ffc commit 899036a
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ pipeline {
label "local"
}

parameters {
booleanParam(name: 'archive', description: "Should artifacts be archived?", defaultValue: false)
}

options {
skipDefaultCheckout(true)
timeout(time: 20, unit: 'MINUTES')
Expand Down Expand Up @@ -50,6 +54,19 @@ pipeline {
}
}
}

stage("Archive artifacts") {
when {
beforeAgent true
expression {
params.archive
}
}

steps {
archiveArtifacts(artifacts: "buildOut/dist/*.so", onlyIfSuccessful: true)
}
}
}

post {
Expand Down

0 comments on commit 899036a

Please sign in to comment.