diff options
author | Fatih Degirmenci <fatih.degirmenci@ericsson.com> | 2017-01-26 15:29:13 +0100 |
---|---|---|
committer | Fatih Degirmenci <fatih.degirmenci@ericsson.com> | 2017-01-27 11:30:58 +0100 |
commit | 9f9356251d1e5d1812ac16859f8b6b6f20eeb8dd (patch) | |
tree | f8ba380db5a3363db8c350b6a9d40fd533d384c4 /tools/keystone/fetchpass.sh | |
parent | e7fe8818ece870b88556f7bad78b589b26d19151 (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/fetchpass.sh')
-rwxr-xr-x | tools/keystone/fetchpass.sh | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/tools/keystone/fetchpass.sh b/tools/keystone/fetchpass.sh index 6e3b069..50fdb5c 100755 --- a/tools/keystone/fetchpass.sh +++ b/tools/keystone/fetchpass.sh @@ -12,8 +12,6 @@ # Fetch service password from the configuration files and store them # in a file to pass further down the build chain -EXPORT_FILE="/root/servicepass.ini" - GLANCE_CONF="/etc/glance/glance-registry.conf" NOVA_CONF="/etc/nova/nova.conf" NEUTRON_CONF="/etc/neutron/neutron.conf" @@ -26,6 +24,11 @@ AODH_CONF='/etc/aodh/aodh.conf' source openrc +# if running as part of Jenkins job, create the files in WORKSPACE +WORKSPACE=${WORKSPACE:-/root} +PASSWORD_FILE_ENC="${WORKSPACE}/servicepass.ini" +PASSWORD_FILE="${WORKSPACE}/passwords.ini" + # Get an option from an INI file # iniget config-file section option function iniget { @@ -54,7 +57,7 @@ ceilometer_password=$(iniget ${CEILOMETER_CONF} keystone_authtoken password) aodh_password=$(iniget ${AODH_CONF} keystone_authtoken password) #NOTE: can't find swift in /etc -cat <<EOT >> /root/passwords.ini +cat <<EOT >> ${PASSWORD_FILE} [DEFAULT] identity_uri=${bind_host} glance=${glance_password} @@ -67,6 +70,6 @@ ceilometer=${ceilometer_password} aodh=${aodh_password} EOT -openssl enc -aes-256-cbc -salt -in /root/passwords.ini -out ${EXPORT_FILE} -k multisite +openssl enc -aes-256-cbc -salt -in ${PASSWORD_FILE} -out ${PASSWORD_FILE_ENC} -k multisite -rm /root/passwords.ini
\ No newline at end of file +rm ${PASSWORD_FILE} |