Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use travis to release, supports fedora up to 38 #70

Open
wants to merge 43 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
003b0a7
resync
Tcharl Jan 3, 2021
0fa616e
resync
Tcharl Jan 3, 2021
cfd869a
update gitignore
Tcharl Jan 10, 2021
235311e
resync with upstreamoss
Tcharl Apr 24, 2021
d9066be
add zone
Tcharl May 2, 2021
9c87165
update tests
Tcharl May 2, 2021
8259ff4
update tests
Tcharl May 2, 2021
f193f93
removed one test
Tcharl May 2, 2021
762bfa1
[skip travis] resync with upstream
Tcharl May 4, 2021
27c917f
[skip travis] resync with upstream
Tcharl May 4, 2021
e0b5824
[travis skip] idempotence
Tcharl May 6, 2021
9ca9afd
[travis skip] idempotence
Tcharl May 6, 2021
b8c8e17
update gitignore
Tcharl Aug 29, 2021
d8a50af
[skip ci] cleanup role
Tcharl Oct 11, 2021
939ccc3
[skip ci] cleanup role
Tcharl Oct 11, 2021
7cb1666
[skip ci] cleanup role
Tcharl Oct 11, 2021
8c03fe2
update namespace
Tcharl Oct 11, 2021
36d3ba4
[skip travis] update to the last fedora version
Tcharl Nov 10, 2021
65a0ca9
[travis skip] rebase with oss upstream
Tcharl Nov 10, 2021
978b3ad
improve lint
Tcharl Nov 21, 2021
ea4779d
set FQCN on all calls
Tcharl May 19, 2022
f29191b
use fcqn following the ansible lint guidelines
Tcharl May 19, 2022
78b266c
rebase from oss upstream
Tcharl May 19, 2022
453578b
remove ansible lint error
Tcharl May 20, 2022
bafbc21
exclude some files from lint
Tcharl May 21, 2022
7e4ffad
[travis-skip] support fedora 36
Tcharl Aug 8, 2022
1177120
update molecule fedora box
Tcharl Aug 8, 2022
d898e1b
deploys to galaxy automagically
Tcharl Apr 30, 2023
cdb84e7
fix github actions requiremements steps
Tcharl Apr 30, 2023
bb52cbb
linting
Tcharl Apr 30, 2023
5e0fcbd
Merge pull request #6 from OsgiliathEnterprise/topr
Tcharl Apr 30, 2023
f129bb5
libvirt tests
Tcharl Apr 30, 2023
7c4d2d8
add community general to collection dependency
Tcharl Apr 30, 2023
0f7bd15
add posargs to tox
Tcharl Apr 30, 2023
646c897
rename role while executin gci
Tcharl Apr 30, 2023
410c8d6
simplify configuration
Tcharl Apr 30, 2023
1f911bd
create path if not exists
Tcharl Apr 30, 2023
09e8eeb
hack idempotence
Tcharl Apr 30, 2023
8068a8d
[ci skip] hack idempotence
Tcharl Apr 30, 2023
fccd72f
ready to release
Tcharl Apr 30, 2023
8ff136b
ready to release
Tcharl Apr 30, 2023
500f887
[ci skip] hack idempotence
Tcharl Apr 30, 2023
9417b03
pull
Tcharl May 1, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
exclude_paths:
- .cache/
- .tox/
- meta/
- tests/
- molecule/
warn_list:
- schema
- jinja[spacing]
- name[missing]
- name[casing]
- galaxy[no-changelog]
- galaxy[no-runtime]
- galaxy[version-incorrect]
- no-changed-when
- args[module]
skip_list:
- '106' # Role name {} does not match ``^[a-z][a-z0-9_]+$`` pattern
32 changes: 32 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name-template: "v$RESOLVED_VERSION 🌈"
tag-template: "v$RESOLVED_VERSION"
categories:
- title: "🚀 Features"
labels:
- "feature"
- "enhancement"
- title: "🐛 Bug Fixes"
labels:
- "fix"
- "bugfix"
- "bug"
- title: "🧰 Maintenance"
label: "chore"
- title: "🧺 Miscellaneous" #Everything except ABAP
label: "misc"
change-template: "- $TITLE @$AUTHOR (#$NUMBER)"
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
version-resolver:
major:
labels:
- "major"
minor:
labels:
- "minor"
patch:
labels:
- "patch"
default: patch
template: |
## Changes
$CHANGES
91 changes: 91 additions & 0 deletions .github/workflows/molecule.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
---
# This is a basic workflow to help you get started with Actions
name: Molecule

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
pull_request:
branches:
- master
- tags/*

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
requirements:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: install prereq
run: |
ansible-galaxy role install -r requirements-standalone.yml
ansible-galaxy collection install -r requirements-collections.yml
lint:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: update apt
run: |
sudo apt update
- name: install tox apt prerequisite
run: |
sudo apt -y install sudo python3 python3-pip
- name: pip install packages
run: |
pip3 install wheel setuptools tox
# - name: Test KVM conditions fails
# run: |
# sudo kvm-ok
- name: tox lint
run: |
tox -e lint
test:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: add vagrant apt key
run: |
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -
- name: add vagrant apt repository
run: |
sudo apt-add-repository -y "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
- name: update apt
run: |
sudo apt update
# - name: apt upgrade
# run: |
# sudo apt upgrade
- name: install libvirt apt prerequisite
run: |
sudo apt -y install bridge-utils dnsmasq-base ebtables libvirt-dev qemu-kvm libvirt-daemon-system libvirt-daemon libvirt-clients qemu-utils ruby-dev ca-certificates curl gcc iproute2 sudo vagrant python3 python3-pip cpu-checker
- name: start libvirtd
run: |
sudo systemctl restart libvirtd
- name: chmod libvirt socket
run: |
sudo chmod o+rwx /var/run/libvirt/libvirt-sock
- name: vagrant install packages
run: |
vagrant plugin install vagrant-libvirt
./configure
- name: pip install packages
run: |
pip3 install wheel setuptools tox
# - name: Test KVM conditions fails
# run: |
# sudo kvm-ok
# - name: tox test
# run: |
# tox -e test-exec
17 changes: 17 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Release Drafter

on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- main
- master

jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34 changes: 34 additions & 0 deletions .github/workflows/release-galaxy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: Ansible Galaxy
on:
push:
branches:
- main
- master
release:
types:
- published

jobs:
galaxy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements*.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Trigger a new import on Galaxy.
run: ansible-galaxy role import --api-key ${{ secrets.GALAXY_API_KEY }} $(echo ${{ github.repository }} | cut -d/ -f1) $(echo ${{ github.repository }} | cut -d/ -f2)
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.idea
.cache
__pychache__
36 changes: 36 additions & 0 deletions .tox/converge/.tox-info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"ToxEnv": {
"name": "converge",
"type": "VirtualEnvRunner"
},
"Python": {
"version_info": [
3,
11,
3,
"final",
0
],
"executable": "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/bin/python3.11",
"virtualenv version": "20.23.0"
},
"PythonRun": {
"deps": {
"options": [],
"requirements": [
"ansible-lint",
"flake8",
"jmespath",
"molecule-plugins[vagrant]",
"pytest-testinfra",
"python-vagrant",
"yamllint"
],
"constraints": [],
"constraint_options": {
"constrain_package_deps": false,
"use_frozen_constraints": false
}
}
}
}
58 changes: 33 additions & 25 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,43 @@
---
language: python
python: "2.7"

# Use the new container infrastructure
sudo: false
dist: focal

# Install ansible
language: python
python:
- "3.8"
addons:
apt:
sources:
- sourceline: 'deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main'
key_url: 'https://apt.releases.hashicorp.com/gpg'
update: true
packages:
- python-pip
- bridge-utils
- dnsmasq-base
- ebtables
- libvirt-bin
- libvirt-dev
- qemu-kvm
- qemu-utils
- ruby-dev
- ca-certificates
- curl
- gcc
- iproute2
- sudo
- vagrant

install:
# Install ansible
- pip install ansible ansible-lint

# Check ansible version
- ansible --version

# Create ansible.cfg with correct roles_path
- printf '[defaults]\nroles_path=../' >ansible.cfg

# Compensate for repo name being different to the role
- ln -s $(pwd) ../stackhpc.libvirt-host
# - wget https://releases.hashicorp.com/vagrant/$VAGRANT_VER/vagrant_"$VAGRANT_VER"_x86_64.deb
# - sudo apt -y install ./vagrant_"$VAGRANT_VER"_x86_64.deb
- vagrant plugin install vagrant-libvirt
- pip install wheel pyopenssl tox
- sudo chmod o+rwx /var/run/libvirt/libvirt-sock
- ./configure

script:
# Run Ansible lint against the role
- ansible-lint tasks/main.yml

# Basic role syntax check
- ansible-playbook tests/test.yml -i tests/inventory --syntax-check

notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/
- mv ../ansible-role-libvirt-host ../tcharl.ansible_role_libvirt_host
- travis_wait 30 tox -e test-exec -- --scenario-name kvm
branches:
only:
- master
35 changes: 35 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
# Based on ansible-lint config
extends: default
ignore: |
.cache
.tox
rules:
braces:
max-spaces-inside: 1
level: error
brackets:
max-spaces-inside: 1
level: error
colons:
max-spaces-after: -1
level: error
commas:
max-spaces-after: -1
level: error
comments: disable
comments-indentation: disable
document-start: disable
empty-lines:
max: 3
level: error
hyphens:
level: error
indentation: disable
key-duplicates: enable
line-length: disable
new-line-at-end-of-file: disable
new-lines:
type: unix
trailing-spaces: disable
truthy: disable
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
see release drafter results
Loading