-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add fix vulnerability & build app in circleci
- Loading branch information
Showing
1 changed file
with
26 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
# CircleCI workflow config file | ||
version: 2.1 | ||
|
||
orbs: | ||
node: circleci/[email protected] | ||
|
||
jobs: | ||
build_and_test: | ||
check-node-version: | ||
executor: node/default | ||
steps: | ||
- checkout | ||
|
@@ -13,9 +14,26 @@ jobs: | |
- run: | ||
command: node -v | ||
name: Check Node.js Version | ||
# - run: | ||
# command: yarn build | ||
# name: Build app | ||
|
||
check-vulnerabilities: | ||
executor: node/default | ||
steps: | ||
- checkout | ||
- node/install-packages: | ||
pkg-manager: npm | ||
- run: | ||
command: npm audit fix --force --json | ||
name: Fix Vulnerabilities | ||
|
||
build-app: | ||
executor: node/default | ||
steps: | ||
- checkout | ||
- node/install-packages: | ||
pkg-manager: npm | ||
- run: | ||
command: npm install | ||
name: Build app | ||
# - persist_to_workspace: | ||
# root: ~/project | ||
# paths: | ||
|
@@ -30,9 +48,11 @@ jobs: | |
# force: true # force push when pushing to the heroku remote, see: https://devcenter.heroku.com/articles/git | ||
|
||
workflows: | ||
test_my_app: | ||
check-fix-build-app: | ||
jobs: | ||
- build_and_test | ||
- check-node-version | ||
- check-vulnerabilities | ||
- build-app | ||
# - deploy: | ||
# requires: | ||
# - build_and_test # only deploy if the build_and_test job has completed | ||
|