-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
52 lines (45 loc) · 1.56 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
---
os: linux
dist: focal
language: python
python:
- "3.8"
env:
global:
- ROLE_NAME: node_exporter
- VAGRANT_VERSION: 2.2.9
jobs:
- DISTRO: centos7
- DISTRO: ubuntu2004
- DISTRO: ubuntu1804
- DISTRO: ubuntu1604
- DISTRO: debian10
- DISTRO: debian9
addons:
sonarcloud:
organization: "tech-overlord-github"
before_install:
- sudo apt-get update
# - sudo apt-get upgrade -y
- sudo apt-get install wget unzip software-properties-common linux-headers-$(uname -r) -y
install:
- echo -e "deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib" | sudo tee -a /etc/apt/sources.list.d/virtualbox.list
- wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
- sudo apt-get update
- sudo apt-get install virtualbox-6.1 -y
- sudo /sbin/vboxconfig
- pip3 install molecule==3.0.8 ansible-lint flake8 testinfra molecule-vagrant python-vagrant
before_script:
# Rename project directory to actual Ansible Galaxy role name and switch to it.
- cd ../
- mv ansible-role-$ROLE_NAME darkwizard242.$ROLE_NAME
- cd darkwizard242.$ROLE_NAME
script:
- sudo wget -v -O vagrant.zip https://releases.hashicorp.com/vagrant/2.2.9/vagrant_${VAGRANT_VERSION}_linux_amd64.zip &> /dev/null
- sudo unzip vagrant.zip -d /usr/local/bin/ &> /dev/null
- sudo rm -rv vagrant.zip
- vagrant --version
- sonar-scanner -Dsonar.projectVersion=$TRAVIS_BRANCH\_$TRAVIS_JOB_NUMBER
- molecule test
notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/?branch=master