Skip to content

Commit 45eb7a9

Browse files
authored
Example for Jenkins pipeline with new inline scan engine (#18)
1 parent 0a17672 commit 45eb7a9

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
pipeline {
2+
agent any
3+
4+
stages {
5+
stage('Scan image') {
6+
steps {
7+
withCredentials([usernamePassword(credentialsId: 'sysdig-secure-api-credentials', passwordVariable: 'SECURE_API_TOKEN', usernameVariable: '')]) {
8+
sh '''
9+
VERSION=$(curl -L -s https://download.sysdig.com/scanning/inlinescan/latest_version.txt)
10+
curl -LO "https://download.sysdig.com/scanning/inlinescan/inlinescan_${VERSION}_linux_amd64"
11+
chmod +x ./inlinescan_${VERSION}_linux_amd64
12+
./inlinescan_${VERSION}_linux_amd64 --apiurl https://secure.sysdig.com mongo-express:0.54.0
13+
'''
14+
}
15+
}
16+
}
17+
}
18+
}

jenkins/new-engine-scan/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Build and scan example
2+
3+
This [example pipeline](Jenkinsfile) shows how to download and execute the new inline scanner to scan an image.

0 commit comments

Comments
 (0)