diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000000..378a7a17495 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,70 @@ +version: 2.1 +orbs: + snyk: snyk/snyk@0.0.8 + +workflows: #creating a workflow to define the context - collection of different jobs + test-env-vars: #setting up a job to define the context which this project will use + jobs: + - build-test-monitor-app: #building the relevant context + context: Snyk # has an env var called Snyk-Token + - build-test-monitor-docker: + context: Snyk + + +jobs: # a collection of steps + build-test-monitor-app: # runs not using Workflows must have a `build` job as entry point #directory where steps will run + working_directory: ~/goof + docker: + - image: circleci/node:4.8.2 + steps: + - checkout + - run: + name: echo "install and build npm project" + command: 'sudo npm install -q' + - run: + name: echo "build project" + command: 'npm run build' + #- run: + # name: echo "build Docker image" + # command: 'docker build -t my-new-container-goof-image .' + - snyk/scan: + fail-on-issues: false + monitor-on-build: true + token-variable: SNYKTOKEN + organization: panda-not-omar + project: circleCi-goof + severity-threshold: high + + + build-test-monitor-docker: # runs not using Workflows must have a `build` job as entry point #directory where steps will run + #working_directory: ~/goof + docker: + - image: circleci/buildpack-deps:stretch + environment: + IMAGE_NAME: akanchhaS/goof + steps: + - checkout + - setup_remote_docker + - run: + name: echo "Build Docker image" + command: 'docker build -t my-new-container-circleci-goof-image .' + - snyk/scan: + fail-on-issues: false + monitor-on-build: true + token-variable: SNYKTOKEN + organization: panda-not-omar + project: circleCi-goof-container + severity-threshold: low + target-file: Dockerfile + docker-image-name: my-new-container-circleci-goof-image + +#workflows: + #node-tests: + #jobs: + # - node/test + #- snyk/scan: + # fail-on-issues: false + # monitor-on-build: true + # token-variable: SNYKTOKEN + # organization: panda-not-omar + # project: circleCi-dotnet-goof \ No newline at end of file