forked from tekdi/pratham-saral-school-prepareness
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
31 lines (30 loc) · 788 Bytes
/
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
29
30
31
pipeline {
agent {
label 'docker'
}
stages {
stage("build-backend") {
agent{
dockerfile {
filename 'Dockerfile'
dir './v1.0/backend'
//label '1.0-latest'
additionalBuildArgs '--build-arg PORT=3000'
//args '-v /tmp:/tmp'
}
}
steps {
script {
if (env.BRANCH_NAME == 'main' || env.BRANCH_NAME == 'v1') {
echo 'WIP....'
} else if (env.BRANCH_NAME == 'feature/v1-devops') {
def backendImg = docker.build("saral-backend:${env.BUILD_ID}", "./v1.0/backend")
backendImg.inside {
sh 'ls -l'
}
}
}
}
}
}
}