diff options
author | Yury V. Zaytsev <yury.zaytsev@moneymeets.com> | 2016-11-29 19:49:25 +0100 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-12-01 12:05:26 -0400 |
commit | a10fa8d45407ac9c15a5f4f5da5ea844f2faf5aa (patch) | |
tree | d8303627e60e61c72a33a2429c27136f49f784b3 /Jenkinsfile | |
parent | dbbbd4580ad55b609c3ee41f8769de35f9962ab2 (diff) |
Add initial Jenkins pipeline script
Signed-off-by: Yury V. Zaytsev <yury.zaytsev@moneymeets.com>
Diffstat (limited to 'Jenkinsfile')
-rw-r--r-- | Jenkinsfile | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 000000000..66d3753bd --- /dev/null +++ b/Jenkinsfile @@ -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 + } + +} |