trying by setting the output of the base64 generation to a jenkins variable to use later
parent
e1d0c6162d
commit
721ce33adb
|
|
@ -5,9 +5,10 @@ pipeline {
|
||||||
stage('Init') {
|
stage('Init') {
|
||||||
steps {
|
steps {
|
||||||
sh 'rbenv local 3.2.2'
|
sh 'rbenv local 3.2.2'
|
||||||
sh 'echo \\\'ENV[\\\"APP_SESSION_SECRET\\\"]=$(ruby -rsecurerandom -e \\\"puts SecureRandom.base64(64).inspect\\\")\\\' > .env.rb'
|
def secret = sh(script: 'ruby -rsecurerandom -e "puts SecureRandom.base64(64).inspect"', returnStdout: true)
|
||||||
sh 'echo "ENV[\\\"DB_NAME\\\"] ||= \\\"url_shortener.db\\\"" >> .env.rb'
|
sh 'echo {secret}'
|
||||||
sh 'cat .env.rb'
|
//sh 'echo "ENV[\\\"DB_NAME\\\"] ||= \\\"url_shortener.db\\\"" >> .env.rb'
|
||||||
|
//sh 'cat .env.rb'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue