Pipeline
Defining your Pipeline
// Jenkinsfile
pipeline {
agent any
options {
skipStagesAfterUnstable()
}
stages {
stage('Build') {
steps {
// Some build steps...
}
}
stage('Test') {
steps {
// Run tests...
}
}
stage('Meterian Scan') {
steps {
withCredentials([string(credentialsId: 'MeterianApiToken', variable: 'METERIAN_API_TOKEN')]) {
sh '''
echo Perform Meterian vulnerability scan...
docker run --rm -v $(pwd):/workspace -e METERIAN_API_TOKEN=$METERIAN_API_TOKEN meterian/cli
'''
}
}
}
stage("Deploy") {
steps {
// Deployment...
}
}
}
}Pipeline configuration in Jenkins




Last updated