forked from OpenLiberty/openliberty.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
70 lines (63 loc) · 1.88 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
language: ruby
rvm:
- 2.4.1
before_install:
- sudo apt-get install python3-bs4 -y
# Trigger a build for each environment
jobs:
include:
- env: ROUTE=$SITE_QA_DOMAIN GUIDE_CLONE_BRANCH=$GUIDE_QA_BRANCH JEKYLL_ENV=production
if: branch = master
- env: ROUTE=$SITE_DRAFT_DOMAIN GUIDE_CLONE_BRANCH=$GUIDE_DEV_BRANCH JEKYLL_DRAFT_GUIDES=true JEKYLL_DRAFT_BLOGS=true
if: branch = master
- env: ROUTE=$SITE_DEV_DOMAIN GUIDE_CLONE_BRANCH=$GUIDE_DEV_BRANCH JEKYLL_DRAFT_GUIDES=true JEKYLL_DRAFT_BLOGS=true
if: branch = development
- env: ROUTE=$SITE_DEMO1_DOMAIN
if: branch = demo1
- env: ROUTE=$SITE_HOTSPOT_DOMAIN GUIDE_CLONE_BRANCH=$GUIDE_HOTSPOT_BRANCH JEKYLL_DRAFT_GUIDES=true
if: branch = hotspots
script: >
if [ $JEKYLL_ENV == "production" ]; then
cp robots.txt src/main/content/robots.txt
./scripts/build_jekyll_maven.sh
else
./scripts/build_jekyll_maven.sh
fi
# branch whitelist
branches:
only:
- master
- development
- demo1
- hotspots
sudo: false # route your build to the container-based infrastructure for a faster build
# deploy only the specified build to each route
deploy:
- provider: script
skip_cleanup: true
on:
branch: master
condition: $ROUTE = $SITE_QA_DOMAIN
script: ./.travis/cf-push.sh
- provider: script
skip_cleanup: true
on:
branch: master
condition: $ROUTE = $SITE_DRAFT_DOMAIN
script: ./.travis/cf-push.sh
- provider: script
skip_cleanup: true
on:
branch: development
condition: $ROUTE = $SITE_DEV_DOMAIN
script: env ROUTE=$SITE_DEV_DOMAIN ./.travis/cf-push.sh
- provider: script
skip_cleanup: true
on:
branch: demo1
script: ./.travis/cf-push.sh
- provider: script
skip_cleanup: true
on:
branch: hotspots
script: env ROUTE=$SITE_HOTSPOT_DOMAIN ./.travis/cf-push.sh