diff --git a/.travis.yml b/.travis.yml index 19f2e208..f7a8f346 100644 --- a/.travis.yml +++ b/.travis.yml @@ -52,6 +52,9 @@ jobs: on: tags: true branch: master + after_deploy: + - chmod +x ./scripts/after_deploy.sh + - ./scripts/after_deploy.sh "youbora" "$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\)/ @@ -66,6 +69,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 "youbora" "$currentVersion" "$JENKINS_CANARY_TOKEN" # Required tests - stage: Tests if: (branch = master) OR (tag IS present) OR (type = pull_request) diff --git a/scripts/after_deploy.sh b/scripts/after_deploy.sh new file mode 100644 index 00000000..7fd0b86c --- /dev/null +++ b/scripts/after_deploy.sh @@ -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