Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Godshell
phpTodo
Commits
45e1e090
Commit
45e1e090
authored
Mar 26, 2019
by
Jason Frisvold
Browse files
- Don't start clair here, it's done outside of gitlab
parent
f18d121c
Pipeline
#425
passed with stages
in 2 minutes and 9 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
45e1e090
...
...
@@ -53,19 +53,19 @@ container_scanning:
services
:
-
docker:stable-dind
script
:
-
docker run -d --name db arminc/clair-db:latest
-
docker run -p 6060:6060 --link db:postgres -d --name clair --restart on-failure arminc/clair-local-scan:v2.0.6
#
- docker run -d --name db arminc/clair-db:latest
#
- docker run -p 6060:6060 --link db:postgres -d --name clair --restart on-failure arminc/clair-local-scan:v2.0.6
-
apk add -U wget ca-certificates
-
docker pull ${CI_APPLICATION_REPOSITORY}:${CI_APPLICATION_TAG}
-
wget https://github.com/arminc/clair-scanner/releases/download/v8/clair-scanner_linux_amd64
-
mv clair-scanner_linux_amd64 clair-scanner
-
chmod +x clair-scanner
-
touch clair-whitelist.yml
-
while( ! wget -q -O /dev/null http://
docke
r:6060/v1/namespaces ) ; do sleep 1 ; done
-
while( ! wget -q -O /dev/null http://
clai
r:6060/v1/namespaces ) ; do sleep 1 ; done
-
retries=0
-
echo "Waiting for clair daemon to start"
-
while( ! wget -T 10 -q -O /dev/null http://
docke
r:6060/v1/namespaces ) ; do sleep 1 ; echo -n "." ; if [ $retries -eq 10 ] ; then echo " Timeout, aborting." ; exit 1 ; fi ; retries=$(($retries+1)) ; done
-
./clair-scanner -c http://
docke
r:6060 --ip $(hostname -i) -r gl-container-scanning-report.json -l clair.log -w clair-whitelist.yml ${CI_APPLICATION_REPOSITORY}:${CI_APPLICATION_TAG} ||
true
-
while( ! wget -T 10 -q -O /dev/null http://
clai
r:6060/v1/namespaces ) ; do sleep 1 ; echo -n "." ; if [ $retries -eq 10 ] ; then echo " Timeout, aborting." ; exit 1 ; fi ; retries=$(($retries+1)) ; done
-
./clair-scanner -c http://
clai
r:6060 --ip $(hostname -i) -r gl-container-scanning-report.json -l clair.log -w clair-whitelist.yml ${CI_APPLICATION_REPOSITORY}:${CI_APPLICATION_TAG} ||
true
artifacts
:
reports
:
container_scanning
:
gl-container-scanning-report.json
Write
Preview
Supports
Markdown
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