Commit 70eecfc1 authored by SBassett's avatar SBassett
Browse files

More testing of variable expansion and assignment

parent 18541e68
Pipeline #1399 passed with stage
in 46 seconds
npm_audit_dependency_check:
image: docker-registry.wikimedia.org/${WM_APPSEC_NPM_IMAGE}
image: docker-registry.wikimedia.org/"$WM_APPSEC_NPM_IMAGE"
stage: test
allow_failure: false
......@@ -18,8 +18,8 @@ npm_audit_dependency_check:
{*package.json,*package-lock.json,*/package.json,*/package-lock.json})
# check if alternative npm audit options were specified calling gitlab-ci.yml file
if [ ! -z ${WM_APPSEC_NPM_AUDIT_OPTIONS} ]; then
NPM_AUDIT_OPTIONS=${WM_APPSEC_NPM_AUDIT_OPTIONS}
if [ ! -z "$WM_APPSEC_NPM_AUDIT_OPTIONS" ]; then
NPM_AUDIT_OPTIONS="$WM_APPSEC_NPM_AUDIT_OPTIONS"
fi
# find all modified package.json files and run audit-ci against them
......@@ -30,12 +30,12 @@ npm_audit_dependency_check:
npm install --package-lock-only
echo -e "\n "
echo -e "----- $f -----"
echo "test: ${WM_APPSEC_NPM_AUDIT_OPTIONS}"
echo "test: ${NPM_AUDIT_OPTIONS}"
echo "test: $WM_APPSEC_NPM_AUDIT_OPTIONS"
echo "test: $NPM_AUDIT_OPTIONS"
echo -e "\n "
set -e
EXIT_CODE=0
audit-ci ${NPM_AUDIT_OPTIONS} || EXIT_CODE=$?
audit-ci "$NPM_AUDIT_OPTIONS" || EXIT_CODE=$?
TOTAL_EXIT_CODES=$(($TOTAL_EXIT_CODES + $EXIT_CODE))
done
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment