|
@@ -1,5 +1,8 @@
|
|
pipeline {
|
|
pipeline {
|
|
agent any
|
|
agent any
|
|
|
|
+ environment {
|
|
|
|
+ BRANCH_NAME="${env.BRANCH_NAME}".toLowerCase()
|
|
|
|
+ }
|
|
stages {
|
|
stages {
|
|
stage('Build') {
|
|
stage('Build') {
|
|
agent {
|
|
agent {
|
|
@@ -19,11 +22,10 @@ pipeline {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
stage('Deploy') {
|
|
stage('Deploy') {
|
|
- environment {
|
|
|
|
- BRANCH_NAME="${env.BRANCH_NAME}".toLowerCase()
|
|
|
|
- }
|
|
|
|
steps {
|
|
steps {
|
|
echo 'Deploying....'
|
|
echo 'Deploying....'
|
|
|
|
+ sh 'sh pwd'
|
|
|
|
+ sh 'sh ls -la'
|
|
sh 'docker build -t ${BRANCH_NAME}:${BUILD_NUMBER} .'
|
|
sh 'docker build -t ${BRANCH_NAME}:${BUILD_NUMBER} .'
|
|
sh 'docker-compose up -d'
|
|
sh 'docker-compose up -d'
|
|
}
|
|
}
|