Jenkins Pipeline project
node('master') {
stage('Scan') {
prismaCloudScanFunction
}
stage('Publish') {
prismaCloudPublish
}
}Setting up a Pipeline project for container images

pipeline { agent any stages { stage('Build') { steps { // Build an image for scanning | Input values for your image below sh 'echo "FROM <registry/repository:tag> Dockerfile' sh 'docker build --no-cache -t <registry/repository:tag> .' } } stage('Scan') { steps { // Scan the image | Input value from first script copied below, '' prismaCloudScanImage - Scan Prisma Cloud Images" <PASTE_SCRIPT_HERE> } } } post { always { // The post section lets you run the publish step regardless of the scan results | Input value from second script copied below, " prismaCloudPublish - Publish Prisma Cloud analysis results." <PASTE_SCRIPT_HERE> } } }


pipeline { agent any stages { stage('Build') { steps { // Build an image for scanning sh 'echo "FROM imiell/bad-dockerfile:latest" > Dockerfile' sh 'docker build --no-cache -t test/test-image:0.1 .' } } stage('Scan') { steps { // Scan the image prismaCloudScanImage ca: '', cert: '', dockerAddress: 'unix:///var/run/docker.sock', image: 'test/test-image*', key: '', logLevel: 'info', podmanPath: '', // The project field below is only applicable if you are using Prisma Cloud Compute Edition and have set up projects (multiple consoles) on Prisma Cloud. project: '', resultsFile: 'prisma-cloud-scan-results.json', ignoreImageBuildTime:true } } } post { always { // The post section lets you run the publish step regardless of the scan results prismaCloudPublish resultsFilePattern: 'prisma-cloud-scan-results.json' } } }
Setting up a Pipeline project for serverless functions

Last updated
Was this helpful?



