Skip to content

Commit 1577599

Browse files
Update .gitlab-ci.yml file
1 parent 6bb7cdb commit 1577599

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.gitlab-ci.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
stages: # List of stages for jobs, and their order of execution
2+
- build
3+
- test
4+
- deploy
5+
6+
build-job: # This job runs in the build stage, which runs first.
7+
stage: build
8+
image: maven:11
9+
script:
10+
- echo "Compiling the code..."
11+
- mvn clean install
12+
- echo "Compile complete."
13+
14+
semgrep:
15+
image: semgrep/semgrep # A Docker image with Semgrep installed.
16+
variables:
17+
# Connect to Semgrep AppSec Platform through your SEMGREP_APP_TOKEN.
18+
# Generate a token from Semgrep AppSec Platform > Settings and add it in below variable.
19+
SEMGREP_APP_TOKEN: "5c2a721c5ea70bcc5356ab028c7e38625aca1356197866d36cfbdcf9e8ec2f92"
20+
# Upload findings to GitLab SAST Dashboard:
21+
SEMGREP_GITLAB_JSON: "1"
22+
script: semgrep ci --gitlab-sast > gl-sast-report.json || true
23+
artifacts:
24+
reports:
25+
sast: gl-sast-report.json

0 commit comments

Comments
 (0)