diff --git a/codefresh.yml b/codefresh.yml index 016f7be..d1fbe66 100644 --- a/codefresh.yml +++ b/codefresh.yml @@ -3,7 +3,35 @@ steps: BuildImage: title: Building Docker Image type: build - image_name: otomato/my-plugin + image_name: codefreshplugins/cf-plugin-example + ScanImage: + type: composition + composition: + version: '2' + services: + imagebuild: + image: ${{BuildImage}} + command: sh -c "exit 0" + labels: + build.image.id: ${{CF_BUILD_ID}} + composition_candidates: + scan_service: + image: codefreshplugins/cf-twistlock + environment: + - TL_CONSOLE_HOSTNAME=${{TL_CONSOLE_HOSTNAME}} + - TL_CONSOLE_PORT=${{TL_CONSOLE_PORT}} + - TL_CONSOLE_USERNAME=${{TL_CONSOLE_USERNAME}} + - TL_CONSOLE_PASSWORD=${{TL_CONSOLE_PASSWORD}} + - TL_ONLY=${{TL_ONLY}} + command: twistlock.py -i "$$(docker inspect $$(docker inspect $$(docker ps -aqf label=build.image.id=${{CF_BUILD_ID}}) -f {{.Config.Image}}) -f {{.Id}} | sed 's/sha256://g')" + depends_on: + - imagebuild + volumes: + - /var/run/docker.sock:/var/run/docker.sock + - /var/lib/docker:/var/lib/docker + # Everything below this line is Optional for CF_METADATA + - '${{CF_VOLUME_NAME}}:/codefresh/volume' + add_flow_volume_to_composition: true TestSuccess: title: Running success test description: This should succeed @@ -21,4 +49,4 @@ steps: type: push title: Pushing To Registry candidate: ${{BuildImage}} - tag: '${{CF_BRANCH}}' + tag: "0.2" diff --git a/plugin.yml b/plugin.yml index 4acd42a..609b89e 100644 --- a/plugin.yml +++ b/plugin.yml @@ -1,7 +1,7 @@ image: my-cf-lugin tag: "0.2" version: "0.2" -categories: ["Security"] +categories: ["security"] description: Codefresh Plugin keywords: ['docker'] sources: []