Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
nervo committed Sep 17, 2024
1 parent 0524d94 commit 1df3c7c
Show file tree
Hide file tree
Showing 24 changed files with 327 additions and 290 deletions.
5 changes: 5 additions & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
---

profile: production

exclude_paths:
- .github
- .manala

skip_list:
- var-naming[no-role-prefix]
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Ansible Galaxy
ANSIBLE_GALAXY_TOKEN_PATH=galaxy_token
2 changes: 0 additions & 2 deletions .env.dist

This file was deleted.

7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2

updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
153 changes: 0 additions & 153 deletions .github/workflows/collection-release.yaml

This file was deleted.

8 changes: 2 additions & 6 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,11 @@ on:
jobs:
lint:
name: Lint
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:

- name: Checkout
uses: actions/checkout@v3

- name: Env
run: |
cp .env.dist .env
uses: actions/checkout@v4

- name: Set up system
uses: ./.manala/github/system/setup
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/molecule.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Env
run: |
cp .env.dist .env
- name: Set up system
uses: ./.manala/github/system/setup

Expand Down
76 changes: 76 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Release

on:
push:
branches:
- main

jobs:
release:
name: Release
runs-on: ubuntu-24.04
if: github.event.head_commit.message == 'Release'
steps:

- name: Checkout
uses: actions/checkout@v4

- name: Set ansible galaxy token
run: |
cat << EOF > galaxy_token
token: ${{ secrets.ANSIBLE_GALAXY_TOKEN }}
EOF
- name: Set up system
uses: ./.manala/github/system/setup

- name: Get version
id: version
run: |
cat << EOF > $GITHUB_OUTPUT
version=$(make version)
EOF
- name: Build
id: build
run: |
make build VERBOSE=1
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
path: build/manala-roles-${{ steps.version.outputs.version }}.tar.gz
name: manala-roles-${{ steps.version.outputs.version }}.tar.gz

- name: Publish
id: publish
run: |
make publish VERBOSE=1
- name: Get Changelog entry
id: changelog
uses: mindsers/changelog-reader-action@v2
with:
path: CHANGELOG.md
version: ${{ steps.version.outputs.version }}

- name: Create GitHub Release
id: release
uses: ncipollo/release-action@v1
with:
name: ${{ steps.version.outputs.version }}
tag: ${{ steps.version.outputs.version }}
body: ${{ steps.changelog.outputs.changes }}
artifacts: build/manala-roles-${{ steps.version.outputs.version }}.tar.gz
token: ${{ secrets.GITHUB_TOKEN }}
skipIfReleaseExists: true

- name: Notify Slack - Status
uses: act10ns/slack@v2
with:
status: ${{ job.status }}
steps: ${{ toJson(steps) }}
channel: '#collection_release'
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: always()
23 changes: 7 additions & 16 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,11 @@ on:
jobs:
test:
name: Test
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:

- name: Checkout
uses: actions/checkout@v3

- name: Env
run: |
cp .env.dist .env
uses: actions/checkout@v4

- name: Set up system
uses: ./.manala/github/system/setup
Expand All @@ -26,17 +22,12 @@ jobs:
- name: Units
run: |
make test.units VERBOSE=1 COVERAGE=1
make test.units VERBOSE=1
- name: Integration
run: |
make test.integration VERBOSE=1 COVERAGE=1
- name: Coverage
run: |
make test.coverage VERBOSE=1
make test.integration VERBOSE=1
- name: Codecov
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: false
# - name: Doc
# run: |
# make test.doc VERBOSE=1
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.env
manala-roles-*
build/
.env.local
galaxy_token
17 changes: 11 additions & 6 deletions .manala.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,29 @@ project:
##########

system:
dir: /srv/ansible_collections/manala/roles
dir: /usr/share/ansible/collections/ansible_collections/manala/roles
env_file:
- .env.dist
- .env
- path: .env.local
required: false
docker: true
git:
config: |
# Silence false positive dubious ownership errors
[safe]
directory = *
ansible:
version: 2.15.8
version: 2.15.12
config: |
[defaults]
force_color = True
retry_files_enabled = False
dependencies:
# Collection community.docker
- docker==7.0.0
- docker==7.1.0
ansible-lint:
version: 6.14.6
version: 24.7.0
molecule:
version: 6.0.3
version: 24.7.0
dependencies:
- molecule-plugins[docker]==23.5.3
4 changes: 2 additions & 2 deletions .manala/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ include $(MANALA_DIR)/.manala/docker/docker.mk
##########

MANALA_DOCKER_COMPOSE_ENV += \
MANALA_DIR=/srv/ansible_collections/manala/roles \
MANALA_CACHE_DIR=/srv/ansible_collections/manala/roles/$(shell dir=$(MANALA_DIR)/$(MANALA_CACHE_DIR) ; mkdir -p $${dir} ; echo $(MANALA_CACHE_DIR))
MANALA_DIR=/usr/share/ansible/collections/ansible_collections/manala/roles \
MANALA_CACHE_DIR=/usr/share/ansible/collections/ansible_collections/manala/roles/$(shell dir=$(MANALA_DIR)/$(MANALA_CACHE_DIR) ; mkdir -p $${dir} ; echo $(MANALA_CACHE_DIR))

# Command
MANALA_DOCKER_COMMAND = run --rm
Expand Down
Loading

0 comments on commit 1df3c7c

Please sign in to comment.