diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6e3894c691717a7d07808d56335c6065bc8f3323..3b79254e843ee4579e131fef11d596e1240bf783 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,8 +3,8 @@ stages: - build - test - test_dependency_check_npm_install - - test_dependency_check_sonar_scanner - test_dependency_check_dependency_check + - test_dependency_check_sonar_scanner - publish - security diff --git a/.gitlab/ci/test.dependency_check.yml b/.gitlab/ci/test.dependency_check.yml index 5b00aced0654ac8eb039555cdeadd2229da3d76d..525b5d5c279289e57d709c1a3874e3738bf3db92 100644 --- a/.gitlab/ci/test.dependency_check.yml +++ b/.gitlab/ci/test.dependency_check.yml @@ -1,3 +1,7 @@ +variables: + DEPENDENCY_CHECK_OUT_DIR: t/dependency-check/simple-app/dependency_check_results/ + SRC_DIR: t/dependency-check/simple-app/ + test_dependency_check_npm_install: stage: test_dependency_check_npm_install tags: @@ -10,22 +14,6 @@ test_dependency_check_npm_install: - cd t/dependency-check/simple-app/ - npm install -test_dependency_check_sonar_scanner: - stage: test_dependency_check_sonar_scanner - image: - name: its-registry.unl.edu/unl-its/docker-ci/static-code-analysis - cache: - policy: pull - paths: - - t/dependency-check/simple-app/dependency_check_results/ - variables: - DEPENDENCY_CHECK_OUT_DIR: t/dependency-check/simple-app/dependency_check_results/ - SRC_DIR: t/dependency-check/simple-app/ - tags: - - docker - script: - - sonar-scanner -Dsonar.host.url=$SONAR_URL -Dsonar.projectKey=$CI_PROJECT_PATH_SLUG -Dsonar.sources=$SRC_DIR -Dsonar.login=$SONAR_TOKEN -Dsonar.dependencyCheck.reportPath=${DEPENDENCY_CHECK_OUT_DIR}/dependency-check-report.xml -Dsonar.dependencyCheck.htmlReportPath=${DEPENDENCY_CHECK_OUT_DIR}/dependency-check-report.html -Dsonar.scm.disabled=True - test_dependency_check_dependency_check: stage: test_dependency_check_dependency_check image: @@ -34,9 +22,6 @@ test_dependency_check_dependency_check: policy: pull paths: - t/dependency-check/simple-app/dependency_check_results/ - variables: - DEPENDENCY_CHECK_OUT_DIR: t/dependency-check/simple-app/dependency_check_results/ - SRC_DIR: t/dependency-check/simple-app/ tags: - docker script: @@ -47,3 +32,15 @@ test_dependency_check_dependency_check: - t/dependency-check/simple-app/dependency_check_results/dependency-check-report.xml expire_in: 1 day +test_dependency_check_sonar_scanner: + stage: test_dependency_check_sonar_scanner + image: + name: its-registry.unl.edu/unl-its/docker-ci/static-code-analysis + cache: + policy: pull + paths: + - t/dependency-check/simple-app/dependency_check_results/ + tags: + - docker + script: + - sonar-scanner -Dsonar.host.url=$SONAR_URL -Dsonar.projectKey=$CI_PROJECT_PATH_SLUG -Dsonar.sources=$SRC_DIR -Dsonar.login=$SONAR_TOKEN -Dsonar.dependencyCheck.reportPath=${DEPENDENCY_CHECK_OUT_DIR}/dependency-check-report.xml -Dsonar.dependencyCheck.htmlReportPath=${DEPENDENCY_CHECK_OUT_DIR}/dependency-check-report.html -Dsonar.scm.disabled=True