Skip to content
Snippets Groups Projects

Resolve "Integrate dependency-check container with Sonarqube"

1 file
+ 8
23
Compare changes
  • Side-by-side
  • Inline
+ 8
23
@@ -5,7 +5,7 @@ stages:
- publish
- security
Check Makefile:
.Check Makefile:
stage: verify
tags:
- linux, dockerd
@@ -19,7 +19,7 @@ Lint and Validate dockerfiles:
script:
- make test
Make All Images:
.Make All Images:
stage: build
image: projectatomic/dockerfile-lint
tags:
@@ -27,7 +27,7 @@ Make All Images:
script:
- make
Test Sonar Scanner:
.Test Sonar Scanner:
stage: test
tags:
- dockerd
@@ -35,38 +35,23 @@ Test Sonar Scanner:
- 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
.Test Dependency Checker:
Test Dependency Checker:
stage: test
tags:
- dockerd
script:
- docker run --rm -v "${PWD}/t/dependency-check/simple-app:/work" -w /work node:alpine npm install
- docker run --rm -v "${PWD}/t/dependency-check/simple-app:/work" -w /work its-registry.unl.edu/unl-its/docker-ci/dependency-check
- docker run --rm its-registry.unl.edu/unl-its/docker-ci/static-code-analysis sonar-scanner -Dsonar.host.url=$SONAR_URL -Dsonar.projectKey=$CI_PROJECT_PATH_SLUG -Dsonar.sources=. -Dsonar.login=$SONAR_TOKEN
artifacts:
paths:
- dependency-check-report.xml
- dependency-check-report.html
expire_in: 1 day
- docker run --rm -v "${PWD}/t/dependency-check/simple-app:/work" -w /work -e DEPENDENCY_CHECK_OUT_DIR=./ its-registry.unl.edu/unl-its/docker-ci/dependency-check
- docker run --rm -v "${PWD}:/work" -w /work its-registry.unl.edu/unl-its/docker-ci/static-code-analysis sonar-scanner -Dsonar.host.url=$SONAR_URL -Dsonar.projectKey=$CI_PROJECT_PATH_SLUG -Dsonar.sources=. -Dsonar.login=$SONAR_TOKEN -Dsonar.dependencyCheck.reportPath=dependency-check-report.xml -Dsonar.dependencyCheck.htmlReportPath=dependency-check-report.html
Test PHP Lint:
.Test PHP Lint:
stage: test
tags:
- linux, dockerd
script:
- t/php-lint/tests.sh
Test PHP Lint:
stage: test
tags:
- linux, dockerd
script:
- t/php-lint/tests.sh
Push to Container Registry:
.Push to Container Registry:
after_script:
- rm -f /var/lib/gitlab-runner/.docker/config.json
stage: publish
Loading