Skip to content
Snippets Groups Projects
Commit 3e96a6c8 authored by Raul Barreras's avatar Raul Barreras
Browse files

fix Test Dependency Checker job

parent 209028b5
No related branches found
No related tags found
1 merge request!33Resolve "Integrate dependency-check container with Sonarqube"
...@@ -5,7 +5,7 @@ stages: ...@@ -5,7 +5,7 @@ stages:
- publish - publish
- security - security
Check Makefile: .Check Makefile:
stage: verify stage: verify
tags: tags:
- linux, dockerd - linux, dockerd
...@@ -19,7 +19,7 @@ Lint and Validate dockerfiles: ...@@ -19,7 +19,7 @@ Lint and Validate dockerfiles:
script: script:
- make test - make test
Make All Images: .Make All Images:
stage: build stage: build
image: projectatomic/dockerfile-lint image: projectatomic/dockerfile-lint
tags: tags:
...@@ -27,7 +27,7 @@ Make All Images: ...@@ -27,7 +27,7 @@ Make All Images:
script: script:
- make - make
Test Sonar Scanner: .Test Sonar Scanner:
stage: test stage: test
tags: tags:
- dockerd - dockerd
...@@ -35,38 +35,23 @@ Test Sonar Scanner: ...@@ -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 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 - 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 stage: test
tags: tags:
- dockerd - dockerd
script: 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 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 -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 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 - 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
artifacts:
paths:
- dependency-check-report.xml
- dependency-check-report.html
expire_in: 1 day
.Test PHP Lint:
Test PHP Lint:
stage: test stage: test
tags: tags:
- linux, dockerd - linux, dockerd
script: script:
- t/php-lint/tests.sh - t/php-lint/tests.sh
.Push to Container Registry:
Test PHP Lint:
stage: test
tags:
- linux, dockerd
script:
- t/php-lint/tests.sh
Push to Container Registry:
after_script: after_script:
- rm -f /var/lib/gitlab-runner/.docker/config.json - rm -f /var/lib/gitlab-runner/.docker/config.json
stage: publish stage: publish
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment