Update CI
Some checks failed
ci/woodpecker/push/z.cron-ntfy Pipeline was successful
ci/woodpecker/push/z.failed-cron-ntfy Pipeline was successful
ci/woodpecker/push/lint Pipeline failed
ci/woodpecker/push/test unknown status

This commit is contained in:
2023-10-16 21:42:53 +13:00
parent 83e5a49a28
commit 70c581f82e
5 changed files with 85 additions and 13 deletions

29
.woodpecker/cron.yml Normal file
View File

@@ -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 ]

View File

@@ -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 ]

View File

@@ -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

View File

@@ -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 ]

View File

@@ -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 ]