This repository has been archived by the owner on Jun 13, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.no.travis.yml
40 lines (40 loc) · 1.58 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
sudo: required
language: node_js
node_js:
- "14"
services:
- docker
branches:
only:
- master
before_install:
- docker run -d -p 9000:9000 --name minio1 -e "MINIO_ACCESS_KEY=AKIAIOSFODNN7EXAMPLE" -e "MINIO_SECRET_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" minio/minio server /data
install:
- npm install
- npm install -g snyk
- snyk test || true
script:
- NODE_ENV=test npm run-script test-travis
after_script: "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js"
after_success:
- |
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}
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"