forked from project-flogo/flogo-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
72 lines (71 loc) · 2.61 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
sudo: required
language: node_js
node_js:
- "10"
cache:
bundler: false
yarn: true
directories:
- .build-cache
git:
submodules: false
install: true
jobs:
include:
- stage: test
name: "Unit tests and code checks"
install: yarn install --frozen-lockfile --non-interactive --audit --silent
script:
- yarn format:check
- yarn lint
- yarn test
- stage: build
language: bash
name: "Build the docker image"
node_js:
services:
- docker
before_install:
- "echo -e \"machine github.com\n login ${GITHUB_USER_TOKEN}\" >> ~/.netrc"
- docker login -u="${DOCKER_USERNAME}" -p="${DOCKER_PASSWORD}" ;
install: skip
script: docker build -f tools/docker/dev.Dockerfile -t flogo/flogo-web:master .
after_script:
- "[ -f \"${HOME}/.netrc\" ] && rm -f ${HOME}/.netrc"
after_success:
- "if [ \"${TRAVIS_BRANCH}\" == \"master\" ]; then
docker push flogo/flogo-web:master ;
fi"
# - stage: build
# language: bash
# if: branch != nx
# node_js:
# services:
# - docker
# before_install:
# - "echo -e \"machine github.com\n login ${GITHUB_USER_TOKEN}\" >> ~/.netrc"
# - docker login -u="${DOCKER_USERNAME}" -p="${DOCKER_PASSWORD}" ;
# install: skip
# script:
# - touch flogo-web.tgz
# - tar cvfz flogo-web.tgz --exclude=flogo-web.tgz . >/dev/null
# - find . -not -name "flogo-web.tgz" -not -name "\." -not -name "\.\." -print0 | xargs -0 rm -rf --
# - "git ls-remote --exit-code https://github.com/TIBCOSoftware/flogo-cicd.git ${TRAVIS_BRANCH} ;
# if [ $? -eq 0 ]; then
# echo \"Branch ${TRAVIS_BRANCH} found on flogo-cicd\" ;
# git clone https://github.com/TIBCOSoftware/flogo-cicd.git --branch ${TRAVIS_BRANCH} --single-branch flogo-cicd ;
# else
# echo \"Branch ${TRAVIS_BRANCH} not found on flogo-cicd using master\" ;
# git clone https://github.com/TIBCOSoftware/flogo-cicd.git flogo-cicd ;
# fi"
# - pushd flogo-cicd/docker/flogo-web
# - ./build-flogo-web.sh
# - popd
# after_script:
# - "[ -f \"${HOME}/.netrc\" ] && rm -f ${HOME}/.netrc"
# after_success:
# - "if [ \"${TRAVIS_BRANCH}\" == \"master\" -o \"${TRAVIS_BRANCH}\" == \"v0.5.3\" ]; then
# docker login -u=\"${DOCKER_USERNAME}\" -p=\"${DOCKER_PASSWORD}\" ;
# source ${TRAVIS_BUILD_DIR}/flogo-cicd/scripts/init.sh ;
# flogo::module::postbuild flogo-web flogo-web;
# fi"