Skip to content

Commit cc83d7f

Browse files
Hackity hack
1 parent e182069 commit cc83d7f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

bin/codedeploy/ValidateService.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ ${DEBUG:-false} && set -vx
1515
export PS4='+(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'
1616

1717
GAUNTLT_RESULTS=/app/build/gauntlt-results.html
18+
# TODO: save this to S3 instead
19+
GAUNTLT_RESULTS_SAVE="/home/centos/$DEPLOYMENT_ID-gauntlt-results.html"
1820

1921
check_every() {
2022
local delay=${1:-}
@@ -34,4 +36,9 @@ echo "Scanning with openscap and gauntlt"
3436
mkdir -p /app/build
3537
cat < /dev/null > "$GAUNTLT_RESULTS"
3638
chown centos:centos "$GAUNTLT_RESULTS"
39+
set +e
3740
sudo -u centos HOME=/home/centos /app/bin/ansible.sh scan-openscap.yml scan-gauntlt.yml
41+
RETCODE=$?
42+
cp "$GAUNTLT_RESULTS" "$GAUNTLT_RESULTS_SAVE"
43+
set -e
44+
exit "$RETCODE"

0 commit comments

Comments
 (0)