Newer
Older
DummyJnkPL / Jenkinsfile
@Benoit Donneaux Benoit Donneaux on 8 Dec 2017 800 bytes Test Indy common lib and stages
#!/usr/bin/env groovy

def libInit =[
	remote: 'https://code.digital-me.nl/git/DEVops/DummyJnkLibInit.git',
	branch: 'master',
	credentialsId: null,
]

// Load libraries
try {
	echo 'Trying to load shared libraries...' 
	library identifier: "libInit@${libInit.branch}", retriever: modernSCM(
		[$class: 'GitSCMSource',
			remote: libInit.remote,
			credentialsId: libInit.credentialsId]
	)
	echo 'Shared library loaded'
} catch (error) {
	echo "Could not load shared libraries: ${error.message}"
	exit(1)
}

// Initialize configuration
def config = initPipeline()
if (!config) {
	// Fail config is empty
    currentBuild.result = 'FAILURE'
    return
}
 
// CI Pipeline
stageCompile()
stageTest()
stagePackage()

// CD Pipeline
if (config.extended) {
	stageRelease()
	stageDelivery()
	stageNotify()
}