-
Notifications
You must be signed in to change notification settings - Fork 11
/
Jenkinsfile
28 lines (27 loc) · 1.11 KB
/
Jenkinsfile
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
try { // massive try{} catch{} around the entire build for failure notifications
timestamps {
node('docker') {
checkout scm
stage('Build the scrapers Docker image') {
docker.withRegistry('https://quay.io/', 'quay-io-factory2-builder-sa-credentials') {
def image = docker.build "factory2/estuary-scrapers:latest", "-f docker/Dockerfile-scrapers ."
image.push()
}
}
stage('Build the API Docker image') {
docker.withRegistry('https://quay.io/', 'quay-io-factory2-builder-sa-credentials') {
def image = docker.build "factory2/estuary-api:latest", "-f docker/Dockerfile-api ."
image.push()
}
}
}
}
} catch (e) {
if (ownership.job.ownershipEnabled) {
mail to: ownership.job.primaryOwnerEmail,
cc: ownership.job.secondaryOwnerEmails.join(', '),
subject: "Jenkins job ${env.JOB_NAME} #${env.BUILD_NUMBER} failed",
body: "${env.BUILD_URL}\n\n${e}"
}
throw e
}