mirror of https://github.com/docker/docs.git
scout: add jenkins generic runtime integration
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
This commit is contained in:
parent
331edfa628
commit
ef1d58821d
|
|
@ -108,5 +108,23 @@ stages:
|
||||||
"<ENVIRONMENT>" $(image):$(tag)
|
"<ENVIRONMENT>" $(image):$(tag)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
{{< /tab >}}
|
||||||
|
{{< tab name="Jenkins" >}}
|
||||||
|
|
||||||
|
```groovy
|
||||||
|
stage('Analyze image') {
|
||||||
|
steps {
|
||||||
|
// Install Docker Scout
|
||||||
|
sh 'curl -sSfL https://raw.githubusercontent.com/docker/scout-cli/main/install.sh | sh -s -- -b /usr/local/bin'
|
||||||
|
|
||||||
|
// Log into Docker Hub
|
||||||
|
sh 'echo $DOCKER_SCOUT_HUB_PASSWORD | docker login -u $DOCKER_SCOUT_HUB_USER --password-stdin'
|
||||||
|
|
||||||
|
// Analyze and fail on critical or high vulnerabilities
|
||||||
|
sh 'docker-scout environment --org "<MY_DOCKER_ORG>" "<ENVIRONMENT>" $IMAGE_TAG
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
{{< /tab >}}
|
{{< /tab >}}
|
||||||
{{< /tabs >}}
|
{{< /tabs >}}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue