-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathJenkinsfile
More file actions
50 lines (43 loc) · 1.13 KB
/
Copy pathJenkinsfile
File metadata and controls
50 lines (43 loc) · 1.13 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*
* Jenkinsfile to pull the source code from git, build the FairBite Docker
* images using their Dockerfiles and push those images to a registry.
*/
pipeline {
agent any
environment {
backend_dockertag = 'fairbite-backend'
frontend_dockertag = 'fairbite-frontend'
registry = 'https://registry.csd.auth.gr'
registry_credentials = 'datalab-registry'
REACT_APP_API_BASE = 'http://localhost:8000'
}
// you probably don't need to edit anything below this line
stages {
stage('Checkout the source code') {
steps {
checkout scm
}
}
stage('Build') {
steps {
script {
backend_image = docker.build("$backend_dockertag", './fairbite-backend')
frontend_image = docker.build(
"$frontend_dockertag",
"--build-arg REACT_APP_API_BASE=${REACT_APP_API_BASE} ./fairbite-frontend"
)
}
}
}
stage('Push') {
steps {
script {
docker.withRegistry(registry, registry_credentials) {
backend_image.push()
frontend_image.push()
}
}
}
}
}
}