mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender.git
synced 2025-07-16 09:38:49 +02:00
103 lines
2.6 KiB
YAML
103 lines
2.6 KiB
YAML
# You can override the included template(s) by including variable overrides
|
|
# SAST customization: https://docs.gitlab.com/ee/user/application_security/sast/#customizing-the-sast-settings
|
|
# Secret Detection customization: https://docs.gitlab.com/ee/user/application_security/secret_detection/pipeline/#customization
|
|
# Dependency Scanning customization: https://docs.gitlab.com/ee/user/application_security/dependency_scanning/#customizing-the-dependency-scanning-settings
|
|
# Container Scanning customization: https://docs.gitlab.com/ee/user/application_security/container_scanning/#customizing-the-container-scanning-settings
|
|
# Note that environment variables can be set in several places
|
|
# See https://docs.gitlab.com/ee/ci/variables/#cicd-variable-precedence
|
|
stages:
|
|
- lint
|
|
- sonarqube-check
|
|
- test
|
|
- build
|
|
- package
|
|
- deploy
|
|
lint-frontend:
|
|
image: node:lts
|
|
stage: lint
|
|
script:
|
|
- cd frontend
|
|
- npm i
|
|
- npm run lint-no-fix
|
|
rules:
|
|
- changes:
|
|
- frontend/**/*
|
|
lint-data-manager:
|
|
stage: lint
|
|
image: golangci/golangci-lint:latest
|
|
script:
|
|
- cd services/data-manager
|
|
- go mod download
|
|
- golangci-lint --version
|
|
- golangci-lint run -v --skip-dirs=migrations --timeout=5m
|
|
rules:
|
|
- changes:
|
|
- services/data-manager/**/*
|
|
lint-ical:
|
|
stage: lint
|
|
image: golangci/golangci-lint:latest
|
|
script:
|
|
- cd services/ical
|
|
- go mod download
|
|
- golangci-lint --version
|
|
- golangci-lint run -v --skip-dirs=migrations --timeout=5m
|
|
rules:
|
|
- changes:
|
|
- services/ical/**/*
|
|
sonarqube-data-manager:
|
|
stage: sonarqube-check
|
|
tags:
|
|
- imn
|
|
image:
|
|
name: sonarsource/sonar-scanner-cli:5.0
|
|
entrypoint:
|
|
- ''
|
|
variables:
|
|
SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar"
|
|
GIT_DEPTH: '0'
|
|
cache:
|
|
key: "${CI_JOB_NAME}"
|
|
paths:
|
|
- ".sonar/cache"
|
|
script:
|
|
- cd services/data-manager
|
|
- sonar-scanner
|
|
allow_failure: true
|
|
rules:
|
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
|
- if: $CI_COMMIT_REF_NAME == "master" || $CI_COMMIT_REF_NAME == "main" || $CI_COMMIT_REF_NAME
|
|
== "develop"
|
|
test-data-manager:
|
|
image: golang:alpine
|
|
stage: test
|
|
script:
|
|
- cd services/data-manager
|
|
- go test -v ./...
|
|
rules:
|
|
- changes:
|
|
- services/data-manager/**/*
|
|
test-ical:
|
|
image: golang:alpine
|
|
stage: test
|
|
script:
|
|
- cd services/ical
|
|
- go test -v ./...
|
|
rules:
|
|
- changes:
|
|
- services/ical/**/*
|
|
test-frontend:
|
|
image: node:lts
|
|
stage: test
|
|
script:
|
|
- cd frontend
|
|
- npm i
|
|
- npm run test
|
|
dependencies:
|
|
- lint-frontend
|
|
include:
|
|
- local: charts/ci-build-deploy.yml
|
|
- template: Security/Dependency-Scanning.gitlab-ci.yml
|
|
- template: Security/SAST.gitlab-ci.yml
|
|
sast:
|
|
stage: test
|