#!/usr/bin/env groovy
// Load Jenkins shared libraries for all Hypeledger Indy project
def libIndy =[
remote: 'git@github.com:digital-me/indy-jenkins-lib.git',
branch: 'draft-01',
credentialsId: null,
]
try {
echo 'Trying to load shared libraries...'
library identifier: "libIndy@${libIndy.branch}", retriever: modernSCM(
[$class: 'GitSCMSource',
remote: libIndy.remote,
credentialsId: libIndy.credentialsId]
)
echo 'Shared library loaded'
} catch (error) {
echo "Could not load shared libraries: ${error.message}"
currentBuild.result = 'FAILURE'
return
}
// Initialize configuration
def config = initConfig()
if (!config) {
// Fail config is empty
currentBuild.result = 'FAILURE'
return
}
// CI Pipeline
stageCompile()
stageTest()
stagePackage()
// CD Pipeline
if (config.extended) {
stageRelease()
stageDelivery()
stageNotify()
}