forked from TIBCOSoftware/flogo-contrib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
46 lines (44 loc) · 1.64 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
language: go
go:
- 1.8.x
sudo: required
services:
- docker
cache:
bundler: false
directories:
- .build-cache # images.txt
# Handle git submodules yourself
git:
submodules: false
jobs:
include:
- stage: build
# Do a github login using token
before_install:
- "echo -e \"machine github.com\n login ${GITHUB_USER_TOKEN}\" >> ~/.netrc"
install:
- "echo \"Install process\""
script:
- touch flogo-contrib.tgz
- tar cvfz flogo-contrib.tgz --exclude=flogo-contrib.tgz .
- find . -not -name "flogo-contrib.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-contrib
- ./build-flogo-contrib.sh
- popd
after_script:
- "[ -f \"${HOME}/.netrc\" ] && rm -f ${HOME}/.netrc"
after_success:
- "if [ \"${TRAVIS_BRANCH}\" == \"master\" ]; then
docker login -u=\"${DOCKER_USERNAME}\" -p=\"${DOCKER_PASSWORD}\";
source ${TRAVIS_BUILD_DIR}/flogo-cicd/scripts/init.sh ;
flogo::module::postbuild flogo-contrib flogo-contrib;
fi"