adding Jenkinsfile
Some checks failed
DevSecOps-Multibranch/pipeline/head There was a failure building this commit
Some checks failed
DevSecOps-Multibranch/pipeline/head There was a failure building this commit
ading Jenkinsfile for pipeline setup
This commit is contained in:
40
Jenkinsfile
vendored
Normal file
40
Jenkinsfile
vendored
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
pipeline {
|
||||||
|
agent any
|
||||||
|
|
||||||
|
stages {
|
||||||
|
stage('Checkout') {
|
||||||
|
steps {
|
||||||
|
checkout scm
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Install Dependencies') {
|
||||||
|
steps {
|
||||||
|
sh 'npm install' // or mvn install / pip install
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('SAST - Semgrep') {
|
||||||
|
steps {
|
||||||
|
sh 'semgrep scan --config auto --json > semgrep-report.json || true'
|
||||||
|
}
|
||||||
|
post {
|
||||||
|
always {
|
||||||
|
archiveArtifacts artifacts: 'semgrep-report.json'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Unit Tests') {
|
||||||
|
steps {
|
||||||
|
sh 'npm test || true'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
post {
|
||||||
|
always {
|
||||||
|
echo "Dev pipeline finished"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user