From d36893e54a2f81745d749e8169808c17e20b5d28 Mon Sep 17 00:00:00 2001 From: Manraj Date: Sat, 11 Mar 2023 02:00:18 -0500 Subject: [PATCH] Update Jenkinsfile --- Jenkinsfile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index ce0e501..cef8097 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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 .' } }