Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Sign in
Toggle navigation
Menu
Open sidebar
open-toolchain
simple-vsi-toolchain
Commits
c30770ca
Commit
c30770ca
authored
Sep 29, 2021
by
Anamika Agrawal
Browse files
enhance cleanup logic
parent
39a28256
Changes
1
Hide whitespace changes
Inline
Side-by-side
.deploy_pipeline/task.yaml
View file @
c30770ca
...
...
@@ -291,16 +291,22 @@ spec:
-
name
:
scripts-subpath
value
:
$(params.scripts-subpath)
-
name
:
COMMON_HOSTED_REGION
value
:
$(params.commons-hosted-region)
value
:
$(params.commons-hosted-region)
-
name
:
FILE
value
:
inventory.json
script
:
|
#!/bin/bash
echo "DEPLOY_STATUS=$DEPLOY_STATUS"
echo "HEALTH_CHECK_STATUS=$HEALTH_CHECK_STATUS"
echo "ACCEPTANCE_TEST_STATUS=$ACCEPTANCE_TEST_STATUS"
cd /output
WORKDIR=/home/${HOST_USER_NAME}/app
BACKUPDIR=${WORKDIR}_backup
subpath="$(params.scripts-subpath)"
cd /output/inventory-repo;
if [[ -f "$FILE" ]]; then
PIPELINERUNID=$(cat $FILE |jq -r '.pipeline_run_id')
fi
cd /output
if [ $DEPLOY_STATUS == "Failed" ] || [ $HEALTH_CHECK_STATUS == "Failed" ] || [ $ACCEPTANCE_TEST_STATUS == "Failed" ]; then
source <(curl -ssL "$COMMON_HOSTED_REGION/scripts/deployment_strategies/basic/vsi/rollback-deploy.sh")
else
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment