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
bb43e750
Commit
bb43e750
authored
6 years ago
by
Jose Raul Barreras
Browse files
Options
Downloads
Patches
Plain Diff
add Tenable support
parent
612f856f
No related branches found
No related tags found
4 merge requests
!5
Develop
,
!4
Working copy
,
!3
Static code analysis on xls branch
,
!1
WIP: Static code analysis on xls branch
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+13
-4
13 additions, 4 deletions
.gitlab-ci.yml
Makefile
+12
-1
12 additions, 1 deletion
Makefile
with
25 additions
and
5 deletions
.gitlab-ci.yml
+
13
−
4
View file @
bb43e750
...
...
@@ -2,22 +2,23 @@ stages:
-
verify
-
build
-
test
-
security
Check Makefile
:
.
Check Makefile
:
stage
:
verify
tags
:
-
linux, dockerd
script
:
-
docker run --rm -v "${PWD}:/work" -w /work mandrean/checkmake ./Makefile
Lint and Validate dockerfiles
:
.
Lint and Validate dockerfiles
:
stage
:
verify
tags
:
-
linux, dockerd
script
:
-
make test
Make All Images
:
.
Make All Images
:
stage
:
build
image
:
projectatomic/dockerfile-lint
tags
:
...
...
@@ -25,9 +26,17 @@ Make All Images:
script
:
-
make
test
:
.
test
:
stage
:
test
tags
:
-
dockerd
script
:
-
docker run --rm unl-its/static-code-analysis sonar-scanner -v
Push to Tenable
:
stage
:
security
tags
:
-
linux, dockerd
script
:
-
make security
This diff is collapsed.
Click to expand it.
Makefile
+
12
−
1
View file @
bb43e750
...
...
@@ -19,7 +19,7 @@ GIT_COMMIT = $(strip $(shell git rev-parse --short HEAD))
####################
BUILD_ARGS
:=
--build-arg
VCS_REF
=
$(
GIT_COMMIT
)
.PHONY
:
all clean test $(DOCKERFILES) clean_images $(IMAGES_TO_CLEAN) static-code-analysis delete_dangling_images
.PHONY
:
all clean test $(DOCKERFILES) clean_images $(IMAGES_TO_CLEAN) static-code-analysis delete_dangling_images
security
all
:
\
php-lint_5.6 php-lint_7.0 php-lint_7.1 php-lint_7.2 php-lint_latest
\
...
...
@@ -74,6 +74,16 @@ $(IMAGES_TO_CLEAN):
@
echo
"Uninstalling
$@
"
@
docker rmi
$(
shell docker images
--format
'{{.Repository
}
}:{{.Tag}}'
--filter
reference
=
$@
)
IMAGES_TO_SCAN
=
$(
shell docker images
--format
'{{.Repository
}
}:{{.Tag}}'
|
grep
unl-its
)
security
:
docker login
-u
${
TENABLE_IO_ACCESS_KEY
}
-p
${
TENABLE_IO_SECRET_KEY
}
registry.cloud.tenable.com
@
for
image
in
$(
IMAGES_TO_SCAN
);
do
\
tenable_name
=
`
echo
$$
image |
cut
-d
"/"
-f
2
`
;
\
echo
"
$$
image --->
$$
tenable_name"
;
\
docker tag
$$
image registry.cloud.tenable.com/
$$
tenable_name
;
\
docker push registry.cloud.tenable.com/
$$
tenable_name
;
\
done
delete_dangling_images
:
@
echo
"Removing dangling images"
@
docker image prune
-f
...
...
@@ -85,3 +95,4 @@ help:
debug
:
@
echo
-e
"DOCKERFILES:
\t
$(
DOCKERFILES
)
"
@
echo
-e
"IMAGES_TO_CLEAN:
\t
$(
IMAGES_TO_CLEAN
)
"
@
echo
-e
"IMAGES_TO_SCAN:
\t
$(
IMAGES_TO_SCAN
)
"
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