-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
58 lines (52 loc) · 2.16 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
services:
- docker
env:
- BUILD_CFG=arch
- BUILD_CFG=ubuntu
- BUILD_CFG=fedora
script:
- |
if [ "$BUILD_CFG" == "ubuntu" ]; then
docker run \
--rm \
--privileged \
-v $PWD:/tmp/ansible-workstation \
ubuntu:latest \
bash -c "apt update && \
apt -y install \
sudo \
make && \
cd /tmp/ansible-workstation && \
sudo apt-get update && \
sudo apt-get -y install gnupg software-properties-common && \
sudo apt-add-repository -y ppa:ansible/ansible && \
sudo apt-get update && \
sudo apt-get install -y ansible && \
make test"
elif [ "$BUILD_CFG" == "fedora" ]; then
docker run \
--rm \
--privileged \
-v $PWD:/tmp/ansible-workstation \
fedora:latest \
bash -c "echo "y" | dnf upgrade && \
sudo dnf install -y make gnupg ansible && \
cd /tmp/ansible-workstation && \
make test"
elif [ "$BUILD_CFG" == "arch" ]; then
docker run \
--rm \
--privileged \
-v $PWD:/tmp/ansible-workstation \
alekzonder/archlinux-yaourt:latest \
bash -c "echo "Y" | sudo pacman -Sy archlinux-keyring && \
sudo pacman --noconfirm -Syyu which gawk python make && \
cd /tmp/ansible-workstation && \
sudo -u yaourt bash -c 'cd /tmp/ansible-workstation && \
sudo pacman --noconfirm -S ansible && \
make test'"
fi
after_success:
- curl -iX GET "https://api.telegram.org/bot$TOKEN/sendMessage?chat_id=$CHATID&text=ansible-workstation \[BUILD_CFG=$BUILD_CFG\] OK" 2>&1 >/dev/null
after_failure:
- curl -iX GET "https://api.telegram.org/bot$TOKEN/sendMessage?chat_id=$CHATID&text=ansible-workstation \[BUILD_CFG=$BUILD_CFG\] failed!" 2>&1 >/dev/null