Skip to content
Snippets Groups Projects
Commit 59080d61 authored by Lars Bilke's avatar Lars Bilke Committed by Dmitri Naumov
Browse files

[Jenkins] Deploy tagged commits.

parent 4ac36824
No related branches found
No related tags found
No related merge requests found
...@@ -47,6 +47,13 @@ node { step([$class: 'GitHubCommitStatusSetter']) } ...@@ -47,6 +47,13 @@ node { step([$class: 'GitHubCommitStatusSetter']) }
if (currentBuild.result == "SUCCESS" || currentBuild.result == "UNSTABLE") { if (currentBuild.result == "SUCCESS" || currentBuild.result == "UNSTABLE") {
if (helper.isOriginMaster(this)) { if (helper.isOriginMaster(this)) {
build job: 'OGS-6/clang-sanitizer', wait: false build job: 'OGS-6/clang-sanitizer', wait: false
build job: 'OGS-6/Deploy', wait: false node('master') {
checkout scm
def tag = helper.getTag()
if (tag != "") {
keepBuild()
currentBuild.displayName = tag
}
}
} }
} }
...@@ -6,16 +6,25 @@ node { ...@@ -6,16 +6,25 @@ node {
fingerprintArtifacts: true, flatten: true, fingerprintArtifacts: true, flatten: true,
projectName: 'OGS-6/ufz/master', projectName: 'OGS-6/ufz/master',
selector: [$class: 'LastCompletedBuildSelector']]) selector: [$class: 'LastCompletedBuildSelector']])
s3upload('*') if (gitTag == "")
s3upload('*')
else
s3upload('*', "opengeosys/ogs6-releases/${gitTag}")
build job: 'OGS-6/Deploy-Post', wait: false build job: 'OGS-6/Deploy-Post', wait: false
} }
} }
def s3upload(files) { def s3upload(files, bucket = null) {
def managed = false
if (bucket == null) {
managed = true
bucket = 'opengeosys'
}
step([$class: 'S3BucketPublisher', step([$class: 'S3BucketPublisher',
dontWaitForConcurrentBuildCompletion: true, entries: dontWaitForConcurrentBuildCompletion: true, entries:
[[bucket: 'opengeosys', excludedFile: '', flatten: true, gzipFiles: false, [[bucket: "${bucket}", excludedFile: '', flatten: true, gzipFiles: false,
managedArtifacts: true, noUploadOnFailure: true, selectedRegion: 'eu-central-1', managedArtifacts: managed, noUploadOnFailure: true, selectedRegion: 'eu-central-1',
sourceFile: "${files}", storageClass: 'STANDARD', uploadFromSlave: true, sourceFile: "${files}", storageClass: 'STANDARD', uploadFromSlave: true,
useServerSideEncryption: false]], profileName: 'S3 UFZ', userMetadata: []]) useServerSideEncryption: false]], profileName: 'S3 UFZ', userMetadata: []])
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment