Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 54 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@

pipeline {

agent any

agent {
docker {
image 'securityuniversal/jenkins-pipeline-agent:latest'
args '--group-add 999'
}
}

stages {
stage('Initialize Config') {
Expand Down Expand Up @@ -45,6 +49,11 @@ pipeline {
}

stage('Unit Testing') {
agent {
docker {
image 'securityuniversal/jenkins-python-agent:latest'
}
}
when {
expression {
def config = jslReadYamlConfig('unitTesting')
Expand All @@ -64,6 +73,11 @@ pipeline {
}

stage('Secret Scanning') {
agent {
docker {
image 'securityuniversal/jenkins-secret-agent:latest'
}
}
when {
expression {
def config = jslReadYamlConfig('secretScanning')
Expand All @@ -83,6 +97,11 @@ pipeline {
}

stage('Software Composition Analysis') {
agent {
docker {
image 'securityuniversal/jenkins-codetesting-agent:latest'
}
}
when {
expression {
def config = jslReadYamlConfig('sca')
Expand All @@ -106,6 +125,11 @@ pipeline {
}

stage('Static Application Security Testing') {
agent {
docker {
image 'securityuniversal/jenkins-codetesting-agent:latest'
}
}
when {
expression {
def config = jslReadYamlConfig('sast')
Expand All @@ -129,6 +153,12 @@ pipeline {
}

stage('Infrastructure-as-Code Security Testing') {
agent {
docker {
image 'securityuniversal/jenkins-iac-agent:latest'
args '--group-add 999'
}
}
when {
expression {
def config = jslReadYamlConfig('iac')
Expand All @@ -148,6 +178,12 @@ pipeline {
}

stage('Build Docker Service') {
agent {
docker {
image 'securityuniversal/jenkins-iac-agent:latest'
args '--group-add 999'
}
}
when {
expression {
def config = jslReadYamlConfig('buildDocker')
Expand All @@ -171,6 +207,12 @@ pipeline {
}

stage('Docker Container Scanning') {
agent {
docker {
image 'securityuniversal/jenkins-iac-agent:latest'
args '--group-add 999'
}
}
when {
expression {
def config = jslReadYamlConfig('containerScan')
Expand All @@ -195,6 +237,11 @@ pipeline {
}

stage('Release to Test') {
agent {
docker {
image 'securityuniversal/jenkins-deploy-agent:latest'
}
}
when {
expression {
def config = jslReadYamlConfig('releaseToTest')
Expand Down Expand Up @@ -266,6 +313,11 @@ pipeline {

////////// Deploy to Production //////////
stage('Deploy') {
agent {
docker {
image 'securityuniversal/jenkins-deploy-agent:latest'
}
}
when {
anyOf {
// Condition for the PROD branch
Expand Down