-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
27 lines (27 loc) · 1.08 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
sudo: required
language: node_js
node_js:
- '10'
services:
- docker
branches:
only:
- master
install:
- npm install
script:
- |
if ([ "$TRAVIS_BRANCH" == "master" ] || [ ! -z "$TRAVIS_TAG" ]) && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
git config --global user.email "[email protected]"
git config --global user.name "Travis CI"
git remote set-url --push origin "https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git"
git remote -v
git checkout -f -b version-branch
npm version patch -m "$(git log -1 --pretty=%B) .... bump version [skip ci]"
git push origin version-branch:master --follow-tags
docker login --username yehiyam --password ${DOCKER_HUB_PASS}
PRIVATE_REGISTRY=docker.io/hkube npm run build
curl -X POST -H 'accept:application/json' -H "authorization:token ${TRAVIS_API_TOKEN}" -H 'content-type:application/json' -H 'travis-api-version:3' -d "{\"request\":{\"branch\":\"master\",\"message\":\"triggered by ${TRAVIS_REPO_SLUG}\"}}" "https://api.travis-ci.org/repo/kube-HPC%2Frelease-manager/requests"
else
echo "version skiped!"
fi