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 >}}