Explorar o código

add .env file

Vildan %!s(int64=5) %!d(string=hai) anos
pai
achega
78a70955cf
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      Jenkins/master.jenkins

+ 2 - 1
Jenkins/master.jenkins

@@ -1,6 +1,7 @@
 #!groovy
 node {
   load "/var/lib/jenkins/workspace/vmshayGroovy/.env"
+  echo "${env.PORT}"
 }
 pipeline {
     agent {
@@ -22,7 +23,7 @@ pipeline {
           sh 'docker stop schedule || exit 0'
           sh 'docker rm schedule || exit 0'
           sh 'docker build -t basic .'
-          sh 'docker run -d --name schedule -p ${env.PORT}:${env.PORT} -t basic'
+          sh 'docker run -d --name schedule -p "${env.PORT}":${env.PORT} -t basic'
         }
       } 
     }