diff --git a/Jenkinsfile b/Jenkinsfile index df0f6e6..2c9c056 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,3 +1,5 @@ +import java.text.SimpleDateFormat + def label = "worker-${UUID.randomUUID().toString()}" podTemplate( @@ -36,6 +38,10 @@ podTemplate( { node(label) { + def dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS") + def date = new Date() + def BUILD_DATE = dateFormat.format(date) + def myRepo = checkout scm def gitCommit = myRepo.GIT_COMMIT def gitBranch = myRepo.GIT_BRANCH @@ -95,7 +101,7 @@ podTemplate( contextName: env.K8s_CONTEXT_NAME, clusterName: env.K8s_CLUSTER_NAME]) { sh """ - + sed -i -e 's*__REGISTRY_URL__*${dockerRegistryUrl}*g' ./.k8s/deployment.yaml """ } }