Update Jenkinsfile

This commit is contained in:
Manraj 2023-03-11 02:00:18 -05:00 committed by GitHub
parent 671fc2a1b0
commit d36893e54a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

8
Jenkinsfile vendored
View File

@ -7,12 +7,14 @@ pipeline {
// Stop running microblog container (microblog label applied to microblog container by this repo's Dockerfile)
sh 'docker stop $(docker ps -q --filter name=microblog) || true && docker rm $(docker ps -q --filter name=microblog) || true'
}
withCredentials([file(credentialsId: twilio-creds, variable: 'env')]) {
sh "cp \$env /.env"
}
}
stage('Build') {
environment {
TWILIO_CREDS = credentials('twilio-creds')
}
steps {
echo 'Copying .env file...'
sh 'cp SECRET_FILE_ID ./'
sh 'docker build -t microblog:latest .'
}
}