From ef1d58821dbcd7401f20775d60d239169135eaaf Mon Sep 17 00:00:00 2001 From: David Karlsson <35727626+dvdksn@users.noreply.github.com> Date: Tue, 26 Sep 2023 10:28:10 +0200 Subject: [PATCH] scout: add jenkins generic runtime integration Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> --- content/scout/integrations/environment/cli.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/content/scout/integrations/environment/cli.md b/content/scout/integrations/environment/cli.md index e02e21c06f..fabed6aeae 100644 --- a/content/scout/integrations/environment/cli.md +++ b/content/scout/integrations/environment/cli.md @@ -108,5 +108,23 @@ stages: "" $(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 "" "" $IMAGE_TAG + } +} +``` + {{< /tab >}} {{< /tabs >}}