Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathJenkinsfile
More file actions
Latest commit
36 lines (34 loc) · 1.25 KB
/
Copy pathJenkinsfile
File metadata and controls
36 lines (34 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
properties([
pipelineTriggers([[$class: "SCMTrigger", scmpoll_spec: "H/15 * * * *"]])
])
node ("docker-light") {
defSOURCEDIR= pwd()
try {
stage("Clean up") {
step([$class: 'WsCleanup'])
}
stage("Checkout Code") {
checkout scm
}
stage("Test with Docker") {
echo "${env.ALT_URL}"
def useUrl = ("${env.ALT_URL}"=="null") ?"${env.BINDING_TEST_URL}":"${env.ALT_URL}"
withEnv(["API_KEY=${env.ROSETTE_API_KEY}", "ALT_URL=${useUrl}"]) {
sh "docker pull rosette/docker-python"
sh "docker run --rm -e API_KEY=${API_KEY} -e ALT_URL=${ALT_URL} -v ${SOURCEDIR}:/source rosette/docker-python"
}
}
postToTeams(true)
} catch (e) {
currentBuild.result ="FAILED"
postToTeams(false)
throw e
}
}
defpostToTeams(booleansuccess) {
def webhookUrl ="${env.TEAMS_PNC_JENKINS_WEBHOOK_URL}"
def color = success ?"#00FF00":"#FF0000"
def status = success ?"SUCCESSFUL":"FAILED"
def message ="*"+ status +":* '${env.JOB_NAME}' - [${env.BUILD_NUMBER}] - ${env.BUILD_URL}"
office365ConnectorSend(webhookUrl: webhookUrl, color: color, message: message, status: status)
}