-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from snyk-tech-services/feat/circle-setup
Feat/circle setup
- Loading branch information
Showing
6 changed files
with
97 additions
and
112 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,101 +1,73 @@ | ||
version: 2.1 | ||
orbs: | ||
snyk: snyk/[email protected] | ||
|
||
snyk: snyk/[email protected] | ||
jobs: | ||
build-test-monitor: | ||
docker: | ||
# specify the version | ||
- image: circleci/node:10.16.3 | ||
|
||
steps: | ||
- checkout | ||
- run: | ||
name: "Install deps" | ||
command: | | ||
npm install | ||
- run: | ||
name: "Run Tests" | ||
command: | | ||
npm test | ||
- snyk/scan: | ||
fail-on-issues: true | ||
monitor-on-build: true | ||
token-variable: SNYK_TOKEN | ||
- run: ./generate-binaries.sh | ||
- persist_to_workspace: | ||
root: . | ||
paths: | ||
- dist/* | ||
|
||
build-test: | ||
docker: | ||
# specify the version | ||
- image: circleci/node:10.16.3 | ||
|
||
steps: | ||
- checkout | ||
- run: | ||
name: "Install deps" | ||
command: | | ||
npm install | ||
- run: | ||
name: "Run Tests" | ||
command: | | ||
npm test | ||
- snyk/scan: | ||
fail-on-issues: true | ||
monitor-on-build: false | ||
token-variable: SNYK_TOKEN | ||
|
||
publish-github-release: | ||
docker: | ||
- image: gcr.io/snyk-technical-services/cicd-github | ||
auth: | ||
username: _json_key | ||
password: $GCLOUD_GCR_SNYK_TS_READER | ||
steps: | ||
- checkout | ||
- attach_workspace: | ||
at: . | ||
- run: | ||
name: "Publish Release on GitHub" | ||
command: | | ||
VERSIONJUMP=$(git log --oneline -1 --pretty=%B | cat | grep -E 'minor|major|patch' | awk -F ':' '{print $1}') | ||
VERSION=$(/workdir/nextver.sh "$VERSIONJUMP") | ||
ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} ${VERSION} dist/ | ||
build-test-monitor: | ||
docker: | ||
- image: circleci/node:latest | ||
steps: | ||
- checkout | ||
- run: npm install semantic-release @semantic-release/exec pkg --save-dev | ||
- run: npm install | ||
- run: npm test | ||
- snyk/scan: | ||
fail-on-issues: true | ||
monitor-on-build: true | ||
token-variable: SNYK_TOKEN | ||
- run: npx semantic-release | ||
build-test: | ||
docker: | ||
- image: circleci/node:latest | ||
steps: | ||
- checkout | ||
- run: npm install | ||
- run: npm test | ||
- snyk/scan: | ||
fail-on-issues: true | ||
monitor-on-build: false | ||
token-variable: SNYK_TOKEN | ||
- run: npx tsc | ||
build-test-from-fork: | ||
docker: | ||
- image: circleci/node:latest | ||
steps: | ||
- checkout | ||
- run: npm install | ||
- run: npm test | ||
- run: npx tsc | ||
workflows: | ||
version: 2.1 | ||
nightly: | ||
triggers: | ||
- schedule: | ||
cron: "0 0 * * *" | ||
filters: | ||
branches: | ||
only: | ||
- master | ||
jobs: | ||
- build-test-monitor | ||
build-test-monitor-publish: | ||
jobs: | ||
- build-test-monitor: | ||
filters: | ||
branches: | ||
only: | ||
- master | ||
- publish-github-release: | ||
requires: | ||
- build-test-monitor | ||
filters: | ||
branches: | ||
only: | ||
- master | ||
build-test: | ||
jobs: | ||
- build-test: | ||
filters: | ||
branches: | ||
ignore: | ||
- master | ||
version: 2 | ||
nightly: | ||
triggers: | ||
- schedule: | ||
cron: "0 0 * * *" | ||
filters: | ||
branches: | ||
only: | ||
- master | ||
jobs: | ||
- build-test-monitor: | ||
context: SNYK | ||
|
||
build-test-monitor: | ||
jobs: | ||
- build-test-monitor: | ||
context: SNYK | ||
filters: | ||
branches: | ||
only: | ||
- master | ||
build-test: | ||
jobs: | ||
- build-test: | ||
context: SNYK | ||
filters: | ||
branches: | ||
ignore: | ||
- master | ||
- /pull\/[0-9]+/ | ||
- build-test-from-fork: | ||
filters: | ||
branches: | ||
only: | ||
- /pull\/[0-9]+/ |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
12 |
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
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
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
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