add linting and security checking for gitlab ci

This commit is contained in:
2026-01-11 14:38:10 +02:00
parent a2e4215dd3
commit 3e6287876e
6 changed files with 143 additions and 31 deletions

View File

@@ -7,33 +7,25 @@ workflow:
- if: $CI_PIPELINE_TAG
stages:
- build
- test
- deploy
- security
- lint
build-job:
stage: build
script:
- echo "Compiling the code..."
- echo "Compile complete."
include:
- template: Security/SAST.gitlab-ci.yml
- template: Security/DAST.gitlab-ci.yml
unit-test-job:
stage: test
script:
- echo "Running unit tests... This will take about 60 seconds."
- sleep 60
- echo "Code coverage is 90%"
sast:
stage: security
lint-test-job:
stage: test
script:
- echo "Linting code... This will take about 10 seconds."
- sleep 10
- echo "No lint issues found."
dast:
stage: security
deploy-job:
stage: deploy
environment: production
markdown_lint:
stage: lint
image: ghcr.io/igorshubovych/markdownlint-cli:latest
allow_failures: true
rules:
- changes:
- "**/*.md"
script:
- echo "Deploying application..."
- echo "Application successfully deployed."
- markdownlint "**/*.md"