diff --git a/.woodpecker/cron.yml b/.woodpecker/cron.yml new file mode 100644 index 0000000..31a3932 --- /dev/null +++ b/.woodpecker/cron.yml @@ -0,0 +1,29 @@ +matrix: + include: + - MOLECULE_DISTRO: centos7 + - MOLECULE_DISTRO: almalinux8 + +clone: + git: + image: woodpeckerci/plugin-git + settings: + recursive: true + submodule_update_remote: true +when: + event: [ cron ] + +steps: + test: + name: Test on ${MOLECULE_DISTRO} + image: guisea/ansible-molecule + pull: true + environment: + PY_COLORS: '1' + ANSIBLE_FORCE_COLOR: '1' + volumes: + - /var/run/docker.sock:/var/run/docker.sock + commands: + - molecule test --scenario-name ${MOLECULE_SCENARIO:-default} + secrets: [ ] + when: + event: [ cron ] diff --git a/.woodpecker/lint.yml b/.woodpecker/lint.yml index 232d7c9..fd4efb2 100644 --- a/.woodpecker/lint.yml +++ b/.woodpecker/lint.yml @@ -7,9 +7,9 @@ steps: PY_COLORS: '1' ANSIBLE_FORCE_COLOR: '1' commands: - - ansible-lint --format pep8 -c ".ansible-lint" + - ansible-lint -c ".ansible-lint" when: - event: push + event: [ push, manual ] yamllint: group: test name: "Lint: Yamllint" @@ -17,4 +17,4 @@ steps: commands: - yamllint -f colored . when: - event: push + event: [ push, manual ] diff --git a/.woodpecker/test.yml b/.woodpecker/test.yml index e1a0c0d..041ff26 100644 --- a/.woodpecker/test.yml +++ b/.woodpecker/test.yml @@ -1,7 +1,16 @@ matrix: - MOLECULE_DISTRO: - - centos7 - - almalinux8 + include: + - MOLECULE_DISTRO: centos7 + - MOLECULE_DISTRO: almalinux8 + +clone: + git: + image: woodpeckerci/plugin-git + settings: + recursive: true + submodule_update_remote: true +when: + event: [ push, manual ] steps: test: @@ -9,15 +18,16 @@ steps: image: guisea/ansible-molecule pull: true environment: - ANSIBLE_CALLBACK_WHITELIST: profile_tasks - EPEL_MIRROR_URL: https://mirrors.guise.net.nz/epel - PY_COLORS: '1' - ANSIBLE_FORCE_COLOR: '1' + PY_COLORS: '1' + ANSIBLE_FORCE_COLOR: '1' volumes: - - /var/run/docker.sock:/var/run/docker.sock + - /var/run/docker.sock:/var/run/docker.sock commands: - - molecule test --all + - molecule test --scenario-name ${MOLECULE_SCENARIO:-default} + secrets: [] when: - event: push + event: + - push + - manual depends_on: - lint diff --git a/.woodpecker/z.cron-ntfy.yml b/.woodpecker/z.cron-ntfy.yml new file mode 100644 index 0000000..9e382d2 --- /dev/null +++ b/.woodpecker/z.cron-ntfy.yml @@ -0,0 +1,17 @@ +skip_clone: true + +steps: + ntfy-success: + image: codeberg.org/l-x/woodpecker-ntfy + settings: + url: https://ntfy.cybercinch.nz/ci-status + title: Build succeeded on ${CI_REPO_NAME} + priority: urgent + icon: https://woodpecker-ci.org/img/logo.svg + tags: robot,white_check_mark,${CI_BUILD_EVENT},${CI_REPO_NAME} + message: > + 📝 Commit by ${CI_COMMIT_AUTHOR} on ${CI_COMMIT_BRANCH}: + + ${CI_COMMIT_MESSAGE} +runs_on: [ success ] + diff --git a/.woodpecker/z.failed-cron-ntfy.yml b/.woodpecker/z.failed-cron-ntfy.yml new file mode 100644 index 0000000..4c0faaf --- /dev/null +++ b/.woodpecker/z.failed-cron-ntfy.yml @@ -0,0 +1,16 @@ +skip_clone: true + +steps: + ntfy-failed: + image: codeberg.org/l-x/woodpecker-ntfy + settings: + url: https://ntfy.cybercinch.nz/ci-status + title: Build failed on ${CI_REPO_NAME} + priority: urgent + icon: https://woodpecker-ci.org/img/logo.svg + tags: robot,rotating_light,no_entry,${CI_BUILD_EVENT},${CI_REPO_NAME} + message: > + 📝 Commit by ${CI_COMMIT_AUTHOR} on ${CI_COMMIT_BRANCH}: + + ${CI_COMMIT_MESSAGE} +runs_on: [ failure ] \ No newline at end of file