Skip to content

Commit

Permalink
Merge pull request #491 from snyk/chore/NA-fix-pipeline
Browse files Browse the repository at this point in the history
fix pipeline
  • Loading branch information
novalex authored Jul 23, 2024
2 parents 02ce4be + a07d927 commit b6f5aaa
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 3 deletions.
65 changes: 63 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
version: 2.1
orbs:
prodsec: snyk/[email protected]
slack: circleci/[email protected]

features_only: &features_only
filters:
Expand All @@ -17,6 +18,61 @@ defaults: &defaults
docker:
- image: cimg/node:20.11.1

commands:
notify_slack_on_failure:
steps:
- slack/notify:
branch_pattern: main
channel: import-alerts
event: fail
mentions: '@team-import'
custom: |
{
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": "CICD pipeline failed :circleci-fail:",
"emoji": true
}
},
{
"type": "divider"
},
{
"type": "section",
"fields": [
{
"type": "mrkdwn",
"text": "*Project*: ${CIRCLE_PROJECT_REPONAME}"
},
{
"type": "mrkdwn",
"text": "*Job*: ${CIRCLE_JOB}"
},
{
"type": "mrkdwn",
"text": "*Branch*: ${CIRCLE_BRANCH}"
},
{
"type": "mrkdwn",
"text": "*Author*: ${CIRCLE_USERNAME}"
}
],
"accessory": {
"type": "button",
"text": {
"type": "plain_text",
"emoji": true,
"text": "View Job"
},
"value": "${CIRCLE_BUILD_URL}"
}
}
]
}
jobs:
security-scans:
<<: *defaults
Expand All @@ -36,6 +92,7 @@ jobs:
- run: npm install
- run: npm test
- run: npx semantic-release
- notify_slack_on_failure

build-test:
<<: *defaults
Expand Down Expand Up @@ -74,12 +131,16 @@ workflows:
<<: *main_only
jobs:
- build-test-monitor:
context: snyk-api-import
context:
- snyk-api-import
- snyk-bot-slack

build-test-monitor:
jobs:
- build-test-monitor:
context: snyk-api-import
context:
- snyk-api-import
- snyk-bot-slack
<<: *main_only

build-test:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"@types/bunyan": "1.8.6",
"@types/debug": "4.1.5",
"@types/jest": "^29.5.12",
"@types/lodash": "^4.14.149",
"@types/lodash": "4.17.5",
"@types/micromatch": "4.0.6",
"@types/needle": "2.0.4",
"@types/node": "^20.11.1",
Expand Down

0 comments on commit b6f5aaa

Please sign in to comment.