moved the init step into one shell command to load it all, and don't use

the secret.rb file
pull/27/head
Adam Townsend 2023-10-17 21:26:23 -07:00
parent 10fe82ab6a
commit 1fae85ff9d
1 changed files with 5 additions and 3 deletions

8
Jenkinsfile vendored
View File

@ -7,9 +7,11 @@ pipeline {
stages { stages {
stage('Init') { stage('Init') {
steps { steps {
sh 'rbenv local 3.2.2' sh ''' #!/usr/local/bin/bash
sh 'echo "ENV[\\\"APP_SESSION_SECRET\\\"] ||= $(ruby secret.rb)" > .env.rb' rbenv local 3.2.2
sh 'echo "ENV[\\\"DB_NAME\\\"] ||= \\\"${DB_NAME}\\\"" >> .env.rb' 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') { stage('Build dependencies') {