-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added codefresh template #40
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# More examples of Codefresh YAML can be found at | ||
# https://codefresh.io/docs/docs/yaml-examples/examples/ | ||
|
||
version: "1.0" | ||
# Stages can help you organize your steps in stages | ||
stages: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. consider setting up a "security" stage and showcase the 4 snyk products in a task each, so code, open source, container+image, iac |
||
- "prepare" | ||
- "verify" | ||
- "deploy" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this stage is declared but not used below, I suggest to remove it |
||
|
||
steps: | ||
main_clone: | ||
title: "Cloning repository" | ||
type: "git-clone" | ||
repo: "codefresh-contrib/unlimited-test-environments-source-code" | ||
revision: "${{CF_REVISION}}" | ||
stage: "prepare" | ||
|
||
run_unit_tests: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we don't need to run unit tests for these examples, let's focus solely on the steps required for getting snyk tests to work (also, the |
||
title: Compile/Unit test | ||
stage: prepare | ||
image: 'maven:3.5.2-jdk-8-alpine' | ||
commands: | ||
- mvn -Dmaven.repo.local=/codefresh/volume/m2_repository package | ||
build_app_image: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. after the docker image is built, it is not used in the below stages
|
||
title: Building Docker Image | ||
type: build | ||
stage: prepare | ||
image_name: kostiscodefresh/spring-actuator-sample-app | ||
working_directory: ./ | ||
tag: '${{CF_BRANCH}}' | ||
dockerfile: Dockerfile | ||
|
||
# Snyk scan starts here from a SNYK CLI image | ||
|
||
scan_code: | ||
title: Source security scan | ||
stage: verify | ||
image: 'snyk/snyk-cli:maven-3.6.3_java11' | ||
commands: | ||
- snyk monitor | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this command needs a token & authentication - where is it handled? |
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the moment, no report artefacts are generated. I suggest we go without first and setup a GH issue on this repo to showcase static HTML reports like these https://codefresh.io/docs/docs/testing/test-reports/ (via
snyk-to-html
)