Permalink
Sep 6, 2016
Sep 6, 2016
Sep 6, 2016
Sep 6, 2016
Sep 6, 2016
Aug 19, 2016
Aug 19, 2016
Aug 19, 2016
Sep 13, 2016
Sep 14, 2016
Aug 19, 2016
Sep 6, 2016
Newer
100644
89 lines (63 sloc)
2.29 KB

8
stage 'Appliance build'
9
echo "My Branch is: ${env.BRANCH_NAME}"
10
11
BRANCH_TEST = "${env.BRANCH_NAME}"
12
13
if (BRANCH_TEST=="shibboleth-production"){
14
performBuild("shibboleth")
15
} else if (BRANCH_TEST=="grouper-production"){
16
performBuild("grouper")
17
} else if (BRANCH_TEST=="comanage-production"){
18
performBuild("comanage")

23
def performBuild(String project){
24
try {
25
stage 'Cleanup & Setup'
26
sh "rm -rf output-${project}-*"

28
sh 'rm -rf builds'
29
sh 'mkdir -p builds'
30
31
withCredentials([[$class: 'FileBinding', credentialsId: 'tier-aws-config', variable: 'FILE']]) {
32
ws {
33
sh 'mkdir -p ~/.aws'
34
sh 'cp $FILE ~/.aws/config'
35
}

38
withCredentials([[$class: 'FileBinding', credentialsId: 'tier-aws-credentials', variable: 'FILE']]) {
39
ws {
40
sh 'mkdir -p ~/.aws'
41
sh 'cp $FILE ~/.aws/credentials'
42
}

47
sh 'mkdir -p ansible-playbooks'
48
dir('ansible-playbooks'){
49
git([ url: "https://github.internet2.edu/docker/ansible-playbooks.git",

52

54

56

69
slackSend color: 'good', message: "BUILD SUCCESS: Appliance build success. ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL} |Open>)"
70

78
handleError("BUILD ERROR: There was a problem with ${project} Appliance. ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL} |Open>) \n\n ${err}")

80
}

83
echo "${message}"
84
currentBuild.setResult("FAILED")
85
slackSend color: 'danger', message: "${message}"
86
//step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: 'chris.bynum@levvel.io', sendToIndividuals: true])