Skip to content

Commit

Permalink
Merge pull request #4 from docker/fixsecrets
Browse files Browse the repository at this point in the history
fix generation of config without secrets
  • Loading branch information
pcaskey authored Oct 31, 2017
2 parents 713d641 + 7a99fe2 commit c69a6c0
Showing 1 changed file with 18 additions and 15 deletions.
33 changes: 18 additions & 15 deletions configBuilder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -502,21 +502,6 @@ fi
sed "s#keystorePass=\"password\"#keystorePass=\"${STOREPWD}\"#" ${TOMCFG}/server.xml.dist > ${TOMCFG}/server.xml


echo ""
echo "Archiving generated config..."
echo ""
#ensure zip
command -v zip >/dev/null 2>&1 || { echo >&2 "ERROR: zip is required, but doesn't appear to be installed. Aborting..."; exit 1; }
FILENAME=./shib-idp-config_`date +%m%d%Y-%H%M%S`.zip
zip -r ${FILENAME} ./* > /dev/null

#special for the special-purpose container
cp ${FILENAME} /output
zip -d /output/${FILENAME:2} "configBuilder.sh"
zip -d /output/${FILENAME:2} "Dockerfile"
zip -d /output/${FILENAME:2} "setup.log"
echo copied archive to output location...

# if the user chose a hybrid config, then generate a directory containing the config with secrets removed
# copy files
if [ ${BURNMOUNT} == "hybrid" ]; then
Expand Down Expand Up @@ -553,6 +538,24 @@ echo ""
fi


echo ""
echo "Archiving generated config..."
echo ""
#ensure zip
command -v zip >/dev/null 2>&1 || { echo >&2 "ERROR: zip is required, but doesn't appear to be installed. Aborting..."; exit 1; }
FILENAME=./shib-idp-config_`date +%m%d%Y-%H%M%S`.zip
zip -r ${FILENAME} ./* > /dev/null

#special for the special-purpose container
cp ${FILENAME} /output
zip -d /output/${FILENAME:2} "configBuilder.sh"
zip -d /output/${FILENAME:2} "Dockerfile"
zip -d /output/${FILENAME:2} "setup.log"
echo copied archive to output location...




############################################################################################################################
### notify user of next steps (docker build and docker run commands, based on burn/mount and chosen directory locations) ###
############################################################################################################################
Expand Down

0 comments on commit c69a6c0

Please sign in to comment.