-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
35 lines (34 loc) · 1003 Bytes
/
Jenkinsfile
File metadata and controls
35 lines (34 loc) · 1003 Bytes
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
#!/usr/bin/env groovy
pipeline {
agent { label 'master' }
options {
skipDefaultCheckout()
timeout(time: 30, unit: 'MINUTES')
timestamps()
buildDiscarder(logRotator(numToKeepStr: '30'))
}
environment {
TERM_FLAGS=" "
}
stages {
stage('Initial cleanup and checkout') {
steps {
sh 'if [ $(docker ps -aq | wc -l) -gt 0 ] ; then docker rm -f $(docker ps -aq) ; fi'
sh 'sudo chown -R ${USER}:${USER} .'
deleteDir()
checkout scm
}
}
stage('Deploy: staging') {
when {
expression {return env.BRANCH_NAME.equals('master')}
}
steps {
echo 'Deploy to staging environment'
sh 'gcloud auth list'
sh 'make build-django-deployable-image publish-django-image'
sh 'make set-django-image-staging'
}
}
}
}