Skip to content

Commit

Permalink
feat: add Gitlab pipelines snippet
Browse files Browse the repository at this point in the history
  • Loading branch information
vishnu-deepsource committed Feb 6, 2024
1 parent e15aed3 commit 34dedf3
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions analyzers/cfn-lint/CI/gitlab-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
stages:
- scan

scan:
stage: scan
image: python:latest # Using Python image because cfn-lint is a Python package
before_script:
- pip install cfn-lint # Install cfn-lint
script:
- cfn-lint -t ./**/*.yaml -f sarif > cfn-lint.sarif || true # Run cfn-lint and generate SARIF report
- curl -sSL https://deepsource.io/cli | sh # Install DeepSource CLI
- ./bin/deepsource report --analyzer cfn-lint --analyzer-type community --value-file ./cfn-lint.sarif # Upload SARIF report to DeepSource
rules:
- if: $CI_PIPELINE_SOURCE == "push"

0 comments on commit 34dedf3

Please sign in to comment.