-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate standalone role to a collection
Signed-off-by: Norman Ziegner <[email protected]>
- Loading branch information
Norman Ziegner
committed
Mar 14, 2024
1 parent
6560514
commit 49e2046
Showing
31 changed files
with
681 additions
and
538 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
skip_list: | ||
- 'var-naming[no-role-prefix]' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
name: "Ansible Lint" | ||
on: | ||
pull_request: | ||
paths: | ||
- 'roles/**' | ||
push: | ||
branches: | ||
- "main" | ||
tags: | ||
- "v*.*.*" | ||
paths: | ||
- 'roles/**' | ||
|
||
env: | ||
PY_COLORS: 1 | ||
ANSIBLE_FORCE_COLOR: 1 | ||
|
||
jobs: | ||
|
||
ansible-lint: | ||
name: "Ansible Lint" | ||
runs-on: "ubuntu-22.04" | ||
steps: | ||
- name: "Check out the codebase." | ||
uses: "actions/checkout@v4" | ||
|
||
- name: "Lint code." | ||
uses: "ansible/[email protected]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,29 @@ | ||
--- | ||
name: "CI" | ||
name: "hifis.unattended_upgrades" | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- "main" | ||
tags: | ||
- "v*.*.*" | ||
paths: | ||
- '.github/workflows/unattended_upgrades.yml' | ||
- 'roles/unattended_upgrades/**' | ||
- 'molecule/unattended_upgrades/**' | ||
- 'Pipfile' | ||
- 'Pipfile.lock' | ||
schedule: | ||
- cron: '0 0 * * *' | ||
|
||
env: | ||
PY_COLORS: 1 | ||
ANSIBLE_FORCE_COLOR: 1 | ||
|
||
jobs: | ||
|
||
lint: | ||
name: "Lint" | ||
runs-on: "ubuntu-22.04" | ||
steps: | ||
- name: "Check out the codebase." | ||
uses: "actions/checkout@v4" | ||
|
||
- name: "Prepare the job environment." | ||
uses: "./.github/workflows/prepare-action" | ||
|
||
- name: "Lint code." | ||
run: | | ||
pipenv run yamllint --strict --format colored . | ||
pipenv run ansible-lint -v --force-color --offline | ||
test: | ||
name: "Run Molecule tests." | ||
runs-on: "ubuntu-22.04" | ||
env: | ||
PY_COLORS: 1 | ||
ANSIBLE_FORCE_COLOR: 1 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
|
@@ -47,9 +37,27 @@ jobs: | |
steps: | ||
- name: "Check out the codebase." | ||
uses: "actions/checkout@v4" | ||
with: | ||
path: "ansible_collections/hifis/software_services" | ||
|
||
# - name: "Prepare the job environment." | ||
# uses: "ansible_collections/hifis/software_services/.github/workflows/prepare-action" | ||
|
||
- name: "Install pipenv." | ||
run: "pipx install pipenv" | ||
shell: "bash" | ||
|
||
- name: "Set up Python 3." | ||
uses: "actions/setup-python@v4" | ||
id: "setup-python" | ||
with: | ||
python-version: "3.10" | ||
cache: "pipenv" | ||
|
||
- name: "Prepare the job environment." | ||
uses: "./.github/workflows/prepare-action" | ||
- name: "Install dependencies via pipenv." | ||
run: "pipenv install --dev" | ||
shell: "bash" | ||
working-directory: "ansible_collections/hifis/software_services" | ||
|
||
- name: "Install modern podman" | ||
run: | | ||
|
@@ -65,20 +73,21 @@ jobs: | |
sudo apt-get -qq -y install podman | ||
- name: "Run Molecule tests." | ||
run: "pipenv run molecule test" | ||
run: "pipenv run molecule test -s unattended_upgrades" | ||
env: | ||
MOLECULE_IMAGE: "${{ matrix.image }}" | ||
working-directory: "ansible_collections/hifis/software_services" | ||
|
||
release: | ||
name: "Release new version on Ansible Galaxy" | ||
runs-on: "ubuntu-22.04" | ||
if: "startsWith(github.ref, 'refs/tags/v')" | ||
needs: ["lint", "test"] | ||
steps: | ||
- name: "checkout" | ||
uses: "actions/checkout@v4" | ||
- name: "galaxy" | ||
uses: "robertdebock/[email protected]" | ||
with: | ||
galaxy_api_key: "${{ secrets.galaxy_api_key }}" | ||
git_branch: "main" | ||
# release: | ||
# name: "Release new version on Ansible Galaxy" | ||
# runs-on: "ubuntu-22.04" | ||
# if: "startsWith(github.ref, 'refs/tags/v')" | ||
# needs: ["lint", "test"] | ||
# steps: | ||
# - name: "checkout" | ||
# uses: "actions/checkout@v4" | ||
# - name: "galaxy" | ||
# uses: "robertdebock/[email protected]" | ||
# with: | ||
# galaxy_api_key: "${{ secrets.galaxy_api_key }}" | ||
# git_branch: "main" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
user=hifis-net | ||
project=ansible-role-unattended-upgrades | ||
since-tag=v1.12.2 | ||
since-tag=v3.3.0 |
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.