summaryrefslogtreecommitdiffstats
path: root/tools/keystone/writepass.sh
diff options
context:
space:
mode:
authorFatih Degirmenci <fatih.degirmenci@ericsson.com>2017-01-26 15:29:13 +0100
committerFatih Degirmenci <fatih.degirmenci@ericsson.com>2017-01-27 11:30:58 +0100
commit9f9356251d1e5d1812ac16859f8b6b6f20eeb8dd (patch)
treef8ba380db5a3363db8c350b6a9d40fd533d384c4 /tools/keystone/writepass.sh
parente7fe8818ece870b88556f7bad78b589b26d19151 (diff)
Fixes for Multisite Kingbird Jenkins jobs
This patch contains the changes needed to get scripts working as part of Jenkins jobs. Changes include fixes for below issues. - Archive servicepass.ini and endpoints.ini under $WORKSPACE due to inability of Jenkins with archiving artifacts that are stored in directories which has no read permissions for. - Fetch servicepass.ini and endpoints.ini from corresponding locations and store them in $WORKSPACE. Change-Id: I88d477f5c6217a6ad7db250ae582fab2a17dc30e Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
Diffstat (limited to 'tools/keystone/writepass.sh')
-rwxr-xr-xtools/keystone/writepass.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/keystone/writepass.sh b/tools/keystone/writepass.sh
index 2b0a965..d125854 100755
--- a/tools/keystone/writepass.sh
+++ b/tools/keystone/writepass.sh
@@ -13,8 +13,10 @@ set -o errexit
set -o nounset
set -o pipefail
-PASSWORD_FILE_ENC="servicepass.ini"
-PASSWORD_FILE="/root/passwords.ini"
+# if running as part of Jenkins job, read and create the files from/in WORKSPACE
+WORKSPACE=${WORKSPACE:-/root}
+PASSWORD_FILE_ENC="${WORKSPACE}/servicepass.ini"
+PASSWORD_FILE="${WORKSPACE}/passwords.ini"
function ini_has_option {
local file=$1
@@ -67,7 +69,7 @@ $option = $value
}
function decode_passwords() {
- openssl enc -aes-256-cbc -d -a -in ${PASSWORD_FILE_ENC} -out /root/passwords.ini -k multisite
+ openssl enc -aes-256-cbc -d -a -in ${PASSWORD_FILE_ENC} -out ${PASSWORD_FILE} -k multisite
}
function write_controller() {