Skip to content
Snippets Groups Projects
.gitlab-ci.yml 2.64 KiB
stages:
  - verify
  - build
  - test
  - test:npm_install
  - test:dependency_checker
  - publish
  - security

.Check Makefile:
  stage: verify
  tags:
    - linux, dockerd
  script:
    - docker run --rm -v "${PWD}:/work" -w /work mandrean/checkmake ./Makefile

.Lint and Validate dockerfiles:
  stage: verify
  tags:
    - linux, dockerd
  script:
    - make test

.Make All Images:
  stage: build
  image: projectatomic/dockerfile-lint
  tags:
    - linux, dockerd
  script:
    - make 

.Test Sonar Scanner:
  stage: test
  tags:
    - dockerd
  script: 
    - 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 npm install:
  stage: test:npm_install
  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 dependency_check:
  stage: test:dependency_checker
  image: 
    name: its-registry.unl.edu/unl-its/docker-ci/dependency-check
    entrypoint: ["/bin/sh"]
  cache:
    policy: pull
  variables:
    DEPENDENCY_CHECK_OUT_DIR: /tmp/dependency_check_results
    SRC_DIR: t/dependency-check/simple-app/
  before_script:
    - cd t/dependency-check/simple-app/
    - ls -alr
  tags:
    - docker
  script:
    - echo ${DEPENDENCY_CHECK_OUT_DIR}

.Test Dependency Checker: