-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.no.travis.yml
45 lines (45 loc) · 1.71 KB
/
.no.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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
sudo: required
language: node_js
node_js:
- "14"
branches:
only:
- master
install:
- npm ci
cache:
directories:
- node_modules
services:
- docker
- redis
before_install:
- docker run -d --name etcd -p 2380:2380 -p 4001:4001 quay.io/coreos/etcd:latest /usr/local/bin/etcd
--data-dir=data.etcd --name "my-etcd" --cors='*' --initial-advertise-peer-urls http://0.0.0.0:2380
--listen-peer-urls http://0.0.0.0:2380 --advertise-client-urls http://0.0.0.0:4001
--listen-client-urls http://0.0.0.0:4001 --initial-cluster-state new
script:
- npm run lint && npm run test:cov
after_script: "npm run coverage"
after_success:
- |
if ([ "$TRAVIS_BRANCH" == "master" ] || [ ! -z "$TRAVIS_TAG" ]) && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
git config --global user.email "travis@travis-ci.org"
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}
else
echo "version skiped!"
fi
deploy:
skip_cleanup: true
provider: script
script: PRIVATE_REGISTRY=docker.io/hkube npm run build
on:
branch: master
after_deploy:
- 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.com/repo/kube-HPC%2Frelease-manager/requests"