Skip to content

Commit

Permalink
build(FEC-9495): update after deploy stage to ping Jenkins (#29)
Browse files Browse the repository at this point in the history
add after deploy stage to give a ping to Jenkins
  • Loading branch information
Yuvalke authored Apr 14, 2020
1 parent be4e689 commit ae025c5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ jobs:
on:
tags: true
branch: master
after_deploy:
- chmod +x ./scripts/after_deploy.sh
- ./scripts/after_deploy.sh "google-analytics" "$TRAVIS_TAG" "$JENKINS_TAG_TOKEN"
# publish canary package if on master
- stage: Release canary
if: (branch = master) AND (type != pull_request) AND commit_message !~ /^chore\(release\)/
Expand All @@ -64,6 +67,11 @@ jobs:
on:
tags: false
branch: master
after_deploy:
- currentVersion=$(npx -c 'echo "$npm_package_version"')
- echo $currentVersion
- chmod +x ./scripts/after_deploy.sh
- ./scripts/after_deploy.sh "google-analytics" "$currentVersion" "$JENKINS_CANARY_TOKEN"
# Required tests
- stage: Tests
if: (branch = master) OR (tag IS present) OR (type = pull_request)
Expand Down
2 changes: 2 additions & 0 deletions scripts/after_deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
curl -k -d "{'name':$1, 'version':$2, 'source':'npm'}" -H "Content-Type: application/json" -X POST https://jenkins.ovp.kaltura.com/generic-webhook-trigger/invoke?token=$3

0 comments on commit ae025c5

Please sign in to comment.