Skip to content

Commit

Permalink
build: trigger jenkins with correct canary version
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuvalke committed Jun 6, 2021
1 parent f0d5a2d commit 8da55b0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
5 changes: 0 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,6 @@ jobs:
if: (branch = master) AND (type != pull_request) AND commit_message !~ /^chore\(release\)/ AND commit_message !~ /^(chore).*(update dist)$/
name: 'Release canary'
env: TRAVIS_MODE=releaseCanary
deploy:
- provider: script
on:
all_branches: true
script: bash ./scripts/after_deploy.sh "$JENKINS_CANARY_TOKEN"
# Required tests
- stage: Tests
if: (branch = master) OR (tag IS present) OR (type = pull_request)
Expand Down
3 changes: 2 additions & 1 deletion scripts/travis.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash
# https://docs.travis-ci.com/user/customizing-the-build/#Implementing-Complex-Build-Steps
set -ev
git checkout master

if [[ "$TRAVIS_BRANCH" = "master" ]] && [[ "$TRAVIS_EVENT_TYPE" != "pull_request" ]] && [[ ! "$TRAVIS_COMMIT_MESSAGE" =~ ^(chore).*(update dist)$ ]] && [[ ! "$TRAVIS_COMMIT_MESSAGE" =~ ^chore\(release\) ]]; then
echo "Prepare Canary"
Expand All @@ -21,7 +22,6 @@ elif [ "${TRAVIS_MODE}" = "unitTests" ]; then
yarn run test
elif [ "${TRAVIS_MODE}" = "release" ] || [ "${TRAVIS_MODE}" = "releaseCanary" ]; then
if [ "${TRAVIS_MODE}" = "releaseCanary" ]; then
git checkout master
echo "Run standard-version"
yarn run release --prerelease canary --skip.commit=true --skip.tag=true
sha=$(git rev-parse --verify --short HEAD)
Expand All @@ -41,6 +41,7 @@ elif [ "${TRAVIS_MODE}" = "release" ] || [ "${TRAVIS_MODE}" = "releaseCanary" ];
echo "Finish building"
git push https://$GH_TOKEN@github.com/kaltura/kaltura-player-js "master" > /dev/null 2>&1
echo "Push Build to origin"
bash ./after_deploy.sh "$JENKINS_CANARY_TOKEN"
else
echo "Run conventional-github-releaser"
#ignore error to make sure release won't get stuck
Expand Down

0 comments on commit 8da55b0

Please sign in to comment.