Skip to content
Snippets Groups Projects
.gitlab-ci.yml 1.08 KiB
docs:
  stage: "build"
  script:
    - "nix-shell --run 'nix-build docs.nix'"

unit-tests:
  stage: "test"
  script:
    - "nix-shell --run 'nix-build nixos/unit-tests.nix' && cat result"

vulnerability-scan:
  stage: "test"
  script:
    - "ci-tools/vulnerability-scan security-report.json"
    - "ci-tools/count-vulnerabilities <security-report.json"
  artifacts:
    paths:
      - "security-report.json"
    expose_as: "security report"


system-tests:
  stage: "test"
  timeout: "3 hours"
  script:
    - "nix-shell --run 'nix-build nixos/system-tests.nix'"

deploy-to-staging:
  stage: "deploy"
  only:
    - "staging"
  script:
    - echo -n "Hello $GITLAB_USER_LOGIN from $CI_JOB_NAME. I was triggered by $CI_PIPELINE_SOURCE "
    - echo "and would like to deploy the $CI_COMMIT_BRANCH branch to the staging environment."

deploy-to-production:
  stage: "deploy"
  only:
    - "production"
  script:
    - echo -n "Hello $GITLAB_USER_LOGIN from $CI_JOB_NAME. I was triggered by $CI_PIPELINE_SOURCE "
    - echo "and would like to deploy the $CI_COMMIT_BRANCH branch to the production environment."