gns3-web-ui/.travis.yml

83 lines
2.2 KiB
YAML
Raw Normal View History

2017-10-18 16:08:32 +02:00
language: node_js
2017-10-19 11:55:06 +02:00
2017-10-18 16:08:32 +02:00
node_js:
2019-07-25 03:16:35 -07:00
- '11' # use node for latest
2017-10-18 16:08:32 +02:00
# Issue with Travis: https://github.com/travis-ci/travis-ci/issues/8836#issuecomment-356362524
sudo: required
cache:
yarn: true
directories:
- node_modules
2019-01-28 12:55:20 +01:00
dist: xenial
2017-10-18 16:08:32 +02:00
addons:
apt:
sources:
- google-chrome
- ubuntu-toolchain-r-test
2017-10-18 16:08:32 +02:00
packages:
2019-01-28 14:00:22 +01:00
- google_chrome
- g++-4.8
2017-10-18 16:08:32 +02:00
2019-01-28 13:54:33 +01:00
services:
- xvfb
2017-10-18 16:08:32 +02:00
before_install:
# greenkeeper-lockfile support
- yarn global add greenkeeper-lockfile@1
- |
2019-01-28 13:05:10 +01:00
python3 -V
2019-01-28 13:20:55 +01:00
wget -qO- https://bootstrap.pypa.io/get-pip.py | sudo python3
2019-01-28 13:05:10 +01:00
python3 -m pip -V
2017-10-18 16:08:32 +02:00
before_script:
# greenkeeper-lockfile support
- greenkeeper-lockfile-update
2021-04-16 12:10:33 +02:00
# - npm install -g codecov
2017-10-18 16:08:32 +02:00
2018-11-26 16:45:13 +01:00
script: yarn coverage
2018-03-12 13:43:03 +01:00
after_success:
2021-04-16 12:10:33 +02:00
# - codecov
2017-10-19 12:16:59 +02:00
after_script:
# greenkeeper-lockfile support
- greenkeeper-lockfile-upload
# publish on gns3.github.io
- yarn buildforgithub --base-href /${TRAVIS_BRANCH}/
- export GIT_LAST_LOG="$(git log -1 --pretty=%B)"
- git clone https://${GITHUB_CREDENTIALS}@github.com/GNS3/gns3.github.io.git github-pages
- mkdir -p github-pages/${TRAVIS_BRANCH}
- rsync -r --delete dist/ github-pages/${TRAVIS_BRANCH}
- cd github-pages/${TRAVIS_BRANCH}
- git config user.email "developers@gns3.net"
- git config user.name "GNS3 Build"
- git add -A
- git commit -m "Deploy - $GIT_LAST_LOG"
- git push origin master
- cd $TRAVIS_BUILD_DIR
2017-10-19 11:55:06 +02:00
# publish
- yarn buildforelectron
- |
python3 -m pip install -r scripts/requirements.txt
python3 scripts/build.py download -a
python3 scripts/build.py build_exe -b dist/exe.gns3server -s
python3 scripts/build.py validate -b dist
- yarn electron-builder --linux --x64 --publish always
# build sourcemaps and upload to Sentry
# fix node issue with memory
2019-03-27 11:44:17 +01:00
- |
2019-04-29 12:22:55 +02:00
if [ -n "$TRAVIS_TAG" ]; then
2019-03-27 11:44:17 +01:00
export NODE_OPTIONS=--max_old_space_size=4096
export RELEASE_VERSION=$(node -e "const fs = require('fs'); let p = fs.readFileSync('package.json'); console.log(JSON.parse(p).version);")
yarn ng build --configuration=production --base-href /static/web-ui/
yarn sentry-cli releases new $RELEASE_VERSION
yarn sentry-cli releases files $RELEASE_VERSION upload-sourcemaps dist/
fi