-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
106 lines (86 loc) · 3.11 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
## Note, "[ci skio]" or "[skip ci]" within a commit message _should_
## cause Travis Continuous Integration to skip the following
## Clone settings for repository
git:
depth: 10
quite: true
submodules: true
## Note 'trusty' (default as of 2019) results in...
# ERROR: Error installing jekyll:
# public_suffix requires Ruby version >= 2.1
## Operating System to test on
# dist: xenial
# os:
# - linux
## Attempt to limit environment to only what is required
language: bash
matrix:
fast_finish: true
## Thanks be to, https://docs.travis-ci.com/user/multi-os/
include:
# - name: 'Linux Trusty'
# os: linux
# dist: trusty
## Suggested in Travis CI blog and
## contains sufficent Ruby version
- name: 'Linux Xenial'
os: linux
dist: xenial
branches:
only:
- master
## Allow building of 'test-' previxed branches
- /^(?i:test)-.*$/
except:
- gh-pages
## Note, caching may make following builds a little faster
## To-do, test 'make update' through the use of caching
# cache:
# directories:
# - /home/travis/.ssh
#
# Do the things
#
## Install and setup servers this project makes use of
before_install:
- sudo apt-get install -yqq unbound nginx
- mkdir -vp "/home/travis/.ssh"
- ssh-keygen -q -t ecdsa -f "/home/travis/.ssh/bill" -C '' -N ''
- printf 'Host bill\n IdentityFile ~/.ssh/bill\n HostName localhost\n User Bill\n' >> "/home/travis/.ssh/config"
install:
- chmod +x Makefile
- sudo make install-dependencies
- sudo make install
before_script:
- if ! [ -L "$(which jekyll_usermod.sh)" ]; then echo 'BUG usermod' && false; fi
- if ! [ -L "$(which jekyll_dnsconf.sh)" ]; then echo 'BUG dnsconf' && false; fi
- if ! [ -L "$(which jekyll_wwwconf.sh)" ]; then echo 'BUG wwcwonf' && false; fi
script:
- sudo jekyll_usermod.sh --user "Bill" --group "devs" --ssh-pub-key "/home/travis/.ssh/bill.pub"
- sudo jekyll_wwwconf.sh --user "Bill" --domain "devs" --tld "lan" --repo 'Bill' --clobber 'force'
## To-do, sort out why Unbound is not happy with Travis CI
- sudo jekyll_dnsconf.sh --domain "devs" --tld "lan"
## Note Travis does not take kindly to StrictHostKeyChecking=accept-new
- ssh bill -o 'StrictHostKeyChecking no' list --license
- ssh bill list .
- ssh bill jekyll-init Song_Ideas
- ssh bill list git/Song_Ideas
- sudo cat "/srv/bill/git/Song_Ideas/_config.yml" || printf 'Huh? Exited with %s\n' "${?}"
- ssh bill list git
- ssh bill bundle-install Song_Ideas
- ssh bill jekyll-build Song_Ideas
- ssh bill jekyll-build Bill
- ssh bill list www
- sudo jekyll_wwwconf.sh --user "Bill" --domain "devs" --tld "lan" --repo "Song_Ideas" --clobber 'append'
- cat "/etc/nginx/sites-available/bill.devs.lan"
after_failure:
- printf 'after_failure asks - Where did %s go wrong?\n' "${USER}"
after_success:
- sudo ls -hal "/etc/nginx/sites-enabled/"
- ssh bill list git/Song_Ideas
- ssh bill list www/Song_Ideas
- cat "/etc/unbound/unbound.conf.d/devs.lan.conf"
- cat "/etc/nginx/sites-enabled/bill.devs.lan"
- echo 'after_success states - No errors, this time...'
after_script:
- echo 'after_script is all good!'