Remove .travis.yml files from galaxy init skeletons (#75740)

* Remove .travis.yml files from galaxy init skeletons

These files have existed for many years but in light of the recent
circumstances around Travis, we should not include them by default in
the galaxy init skeletons.

* Add breaking_changes changelog fragment with recommendation to use a custom skeleton if the .travis.yml file is still needed.

Co-authored-by: s-hertel <19572925+s-hertel@users.noreply.github.com>
pull/74196/head
David Moreau Simard 2 years ago committed by GitHub
parent 46d86a882d
commit d81a519f25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,4 @@
breaking_changes:
- The default ansible-galaxy role skeletons no longer contain .travis.yml files.
You can configure ansible-galaxy to use a custom role skeleton that contains a .travis.yml file
to continue using Galaxy's integration with Travis CI.

@ -1,25 +0,0 @@
---
services: docker
sudo: required
language: python
python:
- '2.7'
env:
- OPENSHIFT_VERSION=v3.9.0
- KUBERNETES_VERSION=v1.9.0
script:
# Configure test values
- export apb_name=APB_NAME
# Download test shim.
- wget -O ${PWD}/apb-test.sh https://raw.githubusercontent.com/ansibleplaybookbundle/apb-test-shim/master/apb-test.sh
- chmod +x ${PWD}/apb-test.sh
# Run tests.
- ${PWD}/apb-test.sh
# Uncomment to allow travis to notify galaxy
# notifications:
# webhooks: https://galaxy.ansible.com/api/v1/notifications/

@ -1,45 +0,0 @@
language: python
dist: trusty
sudo: required
services:
- docker
before_install:
- sudo apt-add-repository 'deb http://archive.ubuntu.com/ubuntu trusty-backports universe'
- sudo apt-get update -qq
- sudo apt-get install -y -o Dpkg::Options::="--force-confold" --force-yes docker-engine
install:
# Install the latest Ansible Container and Ansible
- pip install git+https://github.com/ansible/ansible-container.git
- pip install ansible
script:
# Make sure docker is functioning
- docker version
- docker-compose version
- docker info
# Create an Ansible Container project
- mkdir -p tests
- cd tests
- ansible-container init
# Install the role into the project
- echo "Installing and testing git+https://github.com/${TRAVIS_REPO_SLUG},${TRAVIS_COMMIT}"
- ansible-container install git+https://github.com/${TRAVIS_REPO_SLUG},${TRAVIS_COMMIT}
# Build the service image
- ansible-container build
# Start the service
- ansible-container run -d
- docker ps
# Run tests
- ansible-playbook test.yml
notifications:
email: false
webhooks: https://galaxy.ansible.com/api/v1/notifications/

@ -1,29 +0,0 @@
---
language: python
python: "2.7"
# Use the new container infrastructure
sudo: false
# Install ansible
addons:
apt:
packages:
- python-pip
install:
# Install ansible
- pip install ansible
# Check ansible version
- ansible --version
# Create ansible.cfg with correct roles_path
- printf '[defaults]\nroles_path=../' >ansible.cfg
script:
# Basic role syntax check
- ansible-playbook tests/test.yml -i tests/inventory --syntax-check
notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/

@ -1,29 +0,0 @@
---
language: python
python: "2.7"
# Use the new container infrastructure
sudo: false
# Install ansible
addons:
apt:
packages:
- python-pip
install:
# Install ansible
- pip install ansible
# Check ansible version
- ansible --version
# Create ansible.cfg with correct roles_path
- printf '[defaults]\nroles_path=../' >ansible.cfg
script:
# Basic role syntax check
- ansible-playbook tests/test.yml -i tests/inventory --syntax-check
notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/

@ -1,29 +0,0 @@
---
language: python
python: "2.7"
# Use the new container infrastructure
sudo: false
# Install ansible
addons:
apt:
packages:
- python-pip
install:
# Install ansible
- pip install ansible
# Check ansible version
- ansible --version
# Create ansible.cfg with correct roles_path
- printf '[defaults]\nroles_path=../' >ansible.cfg
script:
# Basic role syntax check
- ansible-playbook tests/test.yml -i tests/inventory --syntax-check
notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/

@ -324,15 +324,6 @@ class ValidRoleTests(object):
for d in self.expected_role_dirs:
self.assertTrue(os.path.isdir(os.path.join(self.role_dir, d)), msg="Expected role subdirectory {0} doesn't exist".format(d))
def test_travis_yml(self):
with open(os.path.join(self.role_dir, '.travis.yml'), 'r') as f:
contents = f.read()
with open(os.path.join(self.role_skeleton_path, '.travis.yml'), 'r') as f:
expected_contents = f.read()
self.assertEqual(expected_contents, contents, msg='.travis.yml does not match expected')
def test_readme_contents(self):
with open(os.path.join(self.role_dir, 'README.md'), 'r') as readme:
contents = readme.read()

Loading…
Cancel
Save