Add initial Jenkins pipeline script
Signed-off-by: Yury V. Zaytsev <yury.zaytsev@moneymeets.com>
This commit is contained in:
parent
591cdf5578
commit
4aff2fc6d9
1 changed files with 55 additions and 0 deletions
55
Jenkinsfile
vendored
Normal file
55
Jenkinsfile
vendored
Normal file
|
@ -0,0 +1,55 @@
|
|||
currentBuild.result = 'SUCCESS'
|
||||
def caught_exception = null
|
||||
|
||||
final def EMAIL_RECIPIENTS = 'joey+git-annex@joeyh.name'
|
||||
|
||||
properties([
|
||||
buildDiscarder(logRotator(artifactNumToKeepStr: '1')),
|
||||
pipelineTriggers([[$class: 'hudson.triggers.SCMTrigger', scmpoll_spec: ''],]) // pollScm('') in 2.22+
|
||||
])
|
||||
|
||||
try {
|
||||
|
||||
node('windows') {
|
||||
|
||||
dir('git-annex') {
|
||||
|
||||
stage('Checkout') {
|
||||
checkout scm
|
||||
}
|
||||
|
||||
stage('Build') {
|
||||
bat 'c:/msysgit/bin/sh standalone/windows/build.sh'
|
||||
}
|
||||
|
||||
stage('Archive') {
|
||||
archiveArtifacts 'git-annex-installer.exe,dist/build-version'
|
||||
}
|
||||
|
||||
stage('Upload') {
|
||||
withCredentials([usernamePassword(credentialsId: 'rsync-downloads-kitenet-net', passwordVariable: 'RSYNC_PASSWORD', usernameVariable: 'DUMMY')]) {
|
||||
bat 'c:/cygwin/bin/rsync git-annex-installer.exe winautobuild@downloads.kitenet.net::winautobuild'
|
||||
bat 'c:/cygwin/bin/rsync dist/build-version winautobuild@downloads.kitenet.net::winautobuild'
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} catch (exception) {
|
||||
|
||||
caught_exception = exception
|
||||
currentBuild.result = 'FAILURE'
|
||||
|
||||
} finally {
|
||||
|
||||
node('master') {
|
||||
step([$class: 'Mailer', notifyEveryUnstableBuild: false, recipients: EMAIL_RECIPIENTS, sendToIndividuals: false])
|
||||
}
|
||||
|
||||
if (caught_exception) {
|
||||
throw caught_exception
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue