view Jenkinsfile @ 30:9be38fb4f78e

sync
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 31 Jan 2020 17:49:22 +0100
parents 02c83c12d3d5
children
line wrap: on
line source

try {
  node('docker') {
    stage 'Retrieve sources'
    deleteDir()
    checkout scm

    lock(resource: 'orthanc-authorization-plugin', inversePrecedence: false) {
      stage 'Build Docker image & run unit tests'
      sh 'scripts/ciBuildDockerImage.sh'
    }
    
    withCredentials([[$class: 'AmazonWebServicesCredentialsBinding', credentialsId: 'aws-orthanc.osimis.io']]) {
      stage 'Push Docker plugin to AWS'
      sh 'scripts/ciPushToAws.sh ${BRANCH_NAME}'
    }
  }
} 
catch (e) {
    slackSend color: '#FF0000', message: "${env.JOB_NAME} has failed ${env.JOB_URL}"
    throw e
}