test:dependency_checker:npm_install: stage: test tags: - docker image: node:alpine cache: paths: - t/dependency-check/simple-app/node_modules/ script: - cd t/dependency-check/simple-app/ - npm install test:dependency_checker:sonar-scanner: stage: test needs: ["test:dependency_checker:npm_install"] 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_checker:dependency_check: stage: test needs: ["test:dependency_checker:sonar-scanner"] image: name: its-registry.unl.edu/unl-its/docker-ci/dependency-check 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: - dependency-check --format ALL -s ${SRC_DIR} --out ${DEPENDENCY_CHECK_OUT_DIR} --project ${CI_PROJECT_NAMESPACE} -n artifacts: paths: - t/dependency-check/simple-app/dependency_check_results/dependency-check-report.html - t/dependency-check/simple-app/dependency_check_results/dependency-check-report.xml expire_in: 1 day