ADDING SECRETS

This commit is contained in:
Wayne Connolly
2018-09-13 14:09:25 +10:00
committed by GitHub
parent 5b5093c493
commit 4821c9df3f
+14 -2
View File
@@ -1,6 +1,18 @@
#!/bin/sh
RANCHER_COMPOSE=`find / -name rancher-compose.yml`
DOCKER_COMPOSE=`find / -name docker-compose.yml`
if [[ -n $PLUGIN_ACCESSKEY ]]; then
ACCESSKEY="-t $PLUGIN_ACCESSKEY"
fi
if [[ -n $RANCHER_ACCESSKEY ]]; then
ACCESSKEY="-t $RANCHER_ACCESSKEY"
fi
if [[ -n $PLUGIN_SECRETKEY ]]; then
SECRETKEY="-t $PLUGIN_SECRETKEY"
fi
if [[ -n $RANCHER_SECRETKEY ]]; then
SECRETKEY="-t $RANCHER_SECRETKEY"
fi
echo "rancher-compose.yml @ ${RANCHER_COMPOSE}"
cat ${RANCHER_COMPOSE}
echo ""
@@ -8,5 +20,5 @@ echo "docker-compose.yml @ ${DOCKER_COMPOSE}"
cat ${DOCKER_COMPOSE}
echo ""
echo "Deploying Rancher Stack with force upgrade"
echo "${PLUGIN_URL} ${PLUGIN_ACCESSKEY} ${PLUGIN_SECRETKEY} ${PLUGIN_STACK}"
/bin/rancher --url http://${PLUGIN_URL} --access-key ${PLUGIN_ACCESSKEY} --secret-key ${PLUGIN_SECRETKEY} up --stack ${PLUGIN_STACK} -d -f ${DOCKER_COMPOSE} --rancher-file ${RANCHER_COMPOSE} --pull --force-recreate --confirm-upgrade
echo "${PLUGIN_URL} ${ACCESSKEY} ${SECRETKEY} ${PLUGIN_STACK}"
/bin/rancher --url http://${PLUGIN_URL} --access-key ${ACCESSKEY} --secret-key ${SECRETKEY} up --stack ${PLUGIN_STACK} -d -f ${DOCKER_COMPOSE} --rancher-file ${RANCHER_COMPOSE} --pull --force-recreate --confirm-upgrade