forked from codefresh-contrib/cfstep-paclair
-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.yml
33 lines (33 loc) · 1.48 KB
/
example.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
version: '1.0'
steps:
BuildingDockerImage:
title: Building Docker Image
type: build
image_name: codefresh/demochat # Replace with your Docker image name
working_directory: ./
dockerfile: Dockerfile
tag: '${{CF_BRANCH_TAG_NORMALIZED}}'
CheckClair:
image: codefreshplugins/cfstep-paclair
environment:
- IMAGE=example-voting-app/worker # Replace with your Docker image name
- TAG=${{CF_BRANCH_TAG_NORMALIZED}}
on_success: # Execute only once the step succeeded
metadata: # Declare the metadata attribute
set: # Specify the set operation
- ${{BuildingDockerImage.imageId}}: # Select any number of target images
- SECURITY_SCAN: true
on_fail: # Execute only once the step failed
metadata: # Declare the metadata attribute
set: # Specify the set operation
- ${{BuildingDockerImage.imageId}}: # Select any number of target images
- SECURITY_SCAN: false
ArchiveReport:
image: mesosphere/aws-cli
commands:
- aws s3 cp ./reports/clair-scan-example-voting-app-worker-${{CF_BRANCH_TAG_NORMALIZED}}.html s3://${{S3_BUCKETNAME}}/${{CF_BUILD_ID}}/clair-scan-example-voting-app-worker-${{CF_BRANCH_TAG_NORMALIZED}}.html --acl public-read
on_success:
metadata:
set:
- ${{BuildingDockerImage.imageId}}:
- CLAIR_REPORT: "https://s3.amazonaws.com/${{S3_BUCKETNAME}}/${{CF_BUILD_ID}}/clair-scan-example-voting-app-worker-${{CF_BRANCH_TAG_NORMALIZED}}.html"