Skip to content

Commit

Permalink
Use previously CI environment
Browse files Browse the repository at this point in the history
  • Loading branch information
anadahz committed Dec 23, 2020
1 parent 1635331 commit d9d7210
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 54 deletions.
41 changes: 33 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
---

os: linux
dist: bionic
language: python
python: "3.8"
python:
- "3.7"

jobs:
include:
Expand All @@ -18,12 +20,35 @@ cache:
- /home/travis/.vagrant.d/boxes
- /home/travis/.cache/pipenv

install:
- cd ci && ./install.sh
before_install:
# Install libvirt, travis and KVM
# https://github.com/alvistack/ansible-role-virtualbox/blob/master/.travis.yml
- |
curl -Os https://releases.hashicorp.com/vagrant/2.2.7/vagrant_2.2.7_x86_64.deb
curl -Os https://releases.hashicorp.com/vagrant/2.2.7/vagrant_2.2.7_SHA256SUMS
curl -Os https://releases.hashicorp.com/vagrant/2.2.7/vagrant_2.2.7_SHA256SUMS.sig
gpg --receive-key 51852D87348FFC4C
gpg --verify vagrant_2.2.7_SHA256SUMS.sig vagrant_2.2.7_SHA256SUMS
sha256sum -c vagrant_2.2.7_SHA256SUMS 2>&1 | grep OK
sudo apt-get -qq update
sudo apt-get -qq install bridge-utils dnsmasq-base ebtables libvirt-bin \
libvirt-dev qemu-kvm qemu-utils ruby-dev
sudo dpkg -i vagrant_2.2.7_x86_64.deb
sudo vagrant plugin install vagrant-libvirt
sudo vagrant plugin list
rm -rf vagrant_2.2.7_*
# pipenv installation
# https://github.com/jonashackt/molecule-ansible-docker-aws/blob/master/.travis.yml
- |
sudo apt-get -qq install python3.7
curl -skL https://bootstrap.pypa.io/get-pip.py | sudo -H python3.7
sudo -H pip3 install pipenv
sudo -H pipenv install
script:
- cd ${TRAVIS_BUILD_DIR}/ansible/roles/$TEST_ROLE
- sudo -E pipenv run molecule lint
- sudo -E pipenv run molecule syntax
- travis_wait 30 sudo -E pipenv run molecule converge
- travis_wait 30 sudo -E pipenv run molecule idempotence
- |
cd ansible/roles/$TEST_ROLE
sudo -E pipenv run molecule lint
sudo -E pipenv run molecule syntax
travis_wait 30 sudo -E pipenv run molecule converge
travis_wait 30 sudo -E pipenv run molecule idempotence
15 changes: 15 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[packages]
# https://pypi.org/project/ansible/
ansible = "==2.10.0"
molecule = "==3.0.2"
molecule-vagrant = "==0.2"
python-vagrant = "==0.5.15"
testinfra = "==5.0.0"

[requires]
python_version = "3.7"
19 changes: 0 additions & 19 deletions ci/Pipfile

This file was deleted.

27 changes: 0 additions & 27 deletions ci/install.sh

This file was deleted.

0 comments on commit d9d7210

Please sign in to comment.