Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
docker-ci
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
UNL ITS
docker-ci
Commits
c5b42049
Commit
c5b42049
authored
5 years ago
by
Jose Raul Barreras
Browse files
Options
Downloads
Patches
Plain Diff
fix detect-secrets/entrypoint.sh exit code
parent
d5828fe2
No related branches found
No related tags found
4 merge requests
!34
develop to master
,
!18
sync dependency-check with secrets-detection
,
!17
Resolve "Add Dependency Check"
,
!16
Resolve "Add Automated Secrets Detection"
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+1
-1
1 addition, 1 deletion
.gitlab-ci.yml
detect-secrets/Dockerfile
+1
-1
1 addition, 1 deletion
detect-secrets/Dockerfile
detect-secrets/entrypoint.sh
+18
-3
18 additions, 3 deletions
detect-secrets/entrypoint.sh
with
20 additions
and
5 deletions
.gitlab-ci.yml
+
1
−
1
View file @
c5b42049
...
...
@@ -33,7 +33,7 @@ test:
-
dockerd
script
:
-
docker run --rm its-registry.unl.edu/unl-its/docker-ci/static-code-analysis sonar-scanner -v
-
docker run --rm -v "${PWD}:/work" -w /work its-registry.unl.edu/unl-its/docker-ci/detect-secrets s
can
-
docker run --rm -v "${PWD}:/work" -w /work its-registry.unl.edu/unl-its/docker-ci/detect-secrets
-
s
Push to Container Registry
:
after_script
:
...
...
This diff is collapsed.
Click to expand it.
detect-secrets/Dockerfile
+
1
−
1
View file @
c5b42049
...
...
@@ -15,7 +15,7 @@ LABEL org.label-schema.build-date=$BUILD_DATE \
WORKDIR
/work
RUN
apk update
&&
apk upgrade
&&
\
apk add
--no-cache
git
&&
\
apk add
--no-cache
git
jq
&&
\
pip
install
detect-secrets
COPY
entrypoint.sh /usr/local/bin/
...
...
This diff is collapsed.
Click to expand it.
detect-secrets/entrypoint.sh
+
18
−
3
View file @
c5b42049
#!/bin/sh
set
-e
PARAM
=
${
2
:-
scan
}
/usr/local/bin/detect-secrets
${
PARAM
}
exit
$?
while
[
-n
"
$1
"
]
;
do
case
"
$1
"
in
-s
)
RESULT
=
`
/usr/local/bin/detect-secrets scan | jq
'.results | length == 0'
`
echo
${
RESULT
}
if
[
"
${
RESULT
}
"
=
"true"
]
;
then
exit
0
else
exit
1
fi
;;
*
)
exec
/bin/sh
;;
esac
shift
done
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment