1
+ version : 2.1
2
+ orbs :
3
+ snyk : snyk/snyk@0.0.8
4
+
5
+ workflows : # creating a workflow to define the context - collection of different jobs
6
+ test-env-vars : # setting up a job to define the context which this project will use
7
+ jobs :
8
+ - build-test-monitor-app : # building the relevant context
9
+ context : Snyk # has an env var called Snyk-Token
10
+ - build-test-monitor-docker :
11
+ context : Snyk
12
+
13
+
14
+ jobs : # a collection of steps
15
+ build-test-monitor-app : # runs not using Workflows must have a `build` job as entry point #directory where steps will run
16
+ working_directory : ~/goof
17
+ docker :
18
+ - image : circleci/node:4.8.2
19
+ steps :
20
+ - checkout
21
+ - run :
22
+ name : echo "install and build npm project"
23
+ command : ' sudo npm install -q'
24
+ - run :
25
+ name : echo "build project"
26
+ command : ' npm run build'
27
+ # - run:
28
+ # name: echo "build Docker image"
29
+ # command: 'docker build -t my-new-container-goof-image .'
30
+ - snyk/scan :
31
+ fail-on-issues : false
32
+ monitor-on-build : true
33
+ token-variable : SNYKTOKEN
34
+ organization : panda-not-omar
35
+ project : circleCi-goof
36
+ severity-threshold : high
37
+
38
+
39
+ build-test-monitor-docker : # runs not using Workflows must have a `build` job as entry point #directory where steps will run
40
+ # working_directory: ~/goof
41
+ docker :
42
+ - image : circleci/buildpack-deps:stretch
43
+ environment :
44
+ IMAGE_NAME : akanchhaS/goof
45
+ steps :
46
+ - checkout
47
+ - setup_remote_docker
48
+ - run :
49
+ name : echo "Build Docker image"
50
+ command : ' docker build -t my-new-container-circleci-goof-image .'
51
+ - snyk/scan :
52
+ fail-on-issues : false
53
+ monitor-on-build : true
54
+ token-variable : SNYKTOKEN
55
+ organization : panda-not-omar
56
+ project : circleCi-goof-container
57
+ severity-threshold : low
58
+ target-file : Dockerfile
59
+ docker-image-name : my-new-container-circleci-goof-image
60
+
61
+ # workflows:
62
+ # node-tests:
63
+ # jobs:
64
+ # - node/test
65
+ # - snyk/scan:
66
+ # fail-on-issues: false
67
+ # monitor-on-build: true
68
+ # token-variable: SNYKTOKEN
69
+ # organization: panda-not-omar
70
+ # project: circleCi-dotnet-goof
0 commit comments