From 1fae85ff9d4c13aeb9c5b977da48779bb3703d22 Mon Sep 17 00:00:00 2001 From: Adam Townsend Date: Tue, 17 Oct 2023 21:26:23 -0700 Subject: [PATCH] moved the init step into one shell command to load it all, and don't use the secret.rb file --- Jenkinsfile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 0a449f6..32415cb 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -7,9 +7,11 @@ pipeline { stages { stage('Init') { steps { - sh 'rbenv local 3.2.2' - sh 'echo "ENV[\\\"APP_SESSION_SECRET\\\"] ||= $(ruby secret.rb)" > .env.rb' - sh 'echo "ENV[\\\"DB_NAME\\\"] ||= \\\"${DB_NAME}\\\"" >> .env.rb' + sh ''' #!/usr/local/bin/bash + rbenv local 3.2.2 + echo 'ENV["APP_SESSION_SECRET"] ||= $(ruby -rsecurerandom -e "puts SecureRandom.base64(64).inspect()")' > .env.rb + echo 'ENV["DB_NAME"] ||= "${DB_NAME}"' >> .env.rb + ''' } } stage('Build dependencies') {