Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
repos
security
Gitlab CI Security Templates
Commits
69f2318f
Commit
69f2318f
authored
Dec 17, 2021
by
SBassett
Browse files
See if gitlab ci likes this kind of variable expansion/assignment
parent
ab38c3ae
Pipeline
#1392
passed with stage
in 44 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
npm-audit/nodejs12/npm-audit-nodejs-12-ci.yml
View file @
69f2318f
...
...
@@ -12,8 +12,8 @@ npm_audit_dependency_check:
-
npm install -g audit-ci
-
|
# 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
script
:
...
...
@@ -29,11 +29,11 @@ npm_audit_dependency_check:
npm install --package-lock-only
echo -e "\n "
echo -e "----- $f -----"
echo
"
$NPM_AUDIT_OPTIONS
"
echo $
{
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
if [ "$TOTAL_EXIT_CODES" -gt 0 ]; then
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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