From db70ae436a186f9c555f2d7ed633d1a06d5a00fc Mon Sep 17 00:00:00 2001 From: Simon Cornet Date: Fri, 15 May 2026 14:31:01 +0200 Subject: [PATCH] ci: migrate from gitlab ci to woodpecker --- .ansible-lint | 1 + .gitlab-ci.yml | 13 ------------- .markdownlint-cli2.jsonc | 3 ++- .woodpecker/linting.yml | 41 ++++++++++++++++++++++++++++++++++++++++ readme.md | 28 +++++++++++++-------------- roles/requirements.yml | 2 +- 6 files changed, 59 insertions(+), 29 deletions(-) delete mode 100644 .gitlab-ci.yml create mode 100644 .woodpecker/linting.yml diff --git a/.ansible-lint b/.ansible-lint index 9b9b52a..2b580a2 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -3,6 +3,7 @@ exclude_paths: - ".gitlab/*" - ".gitlab-ci.yml" + - ".woodpecker/*" - "defaults/main.yaml" - "meta/main.yaml" - "vars/*" diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 7ec2c37..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,13 +0,0 @@ ---- - -# gitlab stages -stages: - - "gitleaks" - - "linting" - -# include components -include: - - component: "$CI_SERVER_FQDN/components/ansible/linting@v3.0.3" - - component: "$CI_SERVER_FQDN/components/gitleaks/gitleaks@v1.0.0" - - component: "$CI_SERVER_FQDN/components/markdownlint/markdownlint@1.0.0" - - component: "$CI_SERVER_FQDN/components/yamllint/yamllint@1.0.2" diff --git a/.markdownlint-cli2.jsonc b/.markdownlint-cli2.jsonc index 56cd87c..a4ea90f 100644 --- a/.markdownlint-cli2.jsonc +++ b/.markdownlint-cli2.jsonc @@ -6,7 +6,8 @@ // linting rules "config": { "MD013": { - "line_length": 120 + "line_length": 120, + "tables": false } } } diff --git a/.woodpecker/linting.yml b/.woodpecker/linting.yml new file mode 100644 index 0000000..02cf4c2 --- /dev/null +++ b/.woodpecker/linting.yml @@ -0,0 +1,41 @@ +--- +when: + - event: "push" + branch: "main" + - event: "manual" + +steps: + + # gitleaks + - name: "gitleaks" + # renovate: datasource=github-releases depName=gitleaks/gitleaks + image: "cr.simoncor.net/ghcr/gitleaks/gitleaks:v8.30.1" + commands: + - "gitleaks detect --source . --verbose --redact" + + # yamllint + - name: "yamllint" + # renovate: datasource=docker depName=cr.simoncor.net/yamllint + image: "cr.simoncor.net/yamllint:1.38.0" + depends_on: + - "gitleaks" + commands: + - "yamllint -c .yamllint ." + + # ansible-lint + - name: "ansible-lint" + # renovate: datasource=docker depName=docker.io/pipelinecomponents/ansible-lint + image: "cr.simoncor.net/dockerhub/pipelinecomponents/ansible-lint:0.79.11" + depends_on: + - "gitleaks" + commands: + - "ansible-lint -c .ansible-lint ." + + # markdownlint + - name: "markdownlint" + # renovate: datasource=docker depName=docker.io/davidanson/markdownlint-cli2 + image: "cr.simoncor.net/dockerhub/davidanson/markdownlint-cli2:v0.22.1" + depends_on: + - "gitleaks" + commands: + - "markdownlint-cli2 --config .markdownlint-cli2.jsonc" diff --git a/readme.md b/readme.md index 864d28d..35e2895 100644 --- a/readme.md +++ b/readme.md @@ -4,20 +4,20 @@ Install and configure [Keepalived](https://www.keepalived.org/) for VRRP high av ## Variables -| Variable | Required | Default | Description | -|----------|----------|---------|-------------| -| `keepalived_auth_pass` | Yes | `SuperSecurePassword` | VRRP authentication password | -| `keepalived_chk_service` | Yes | - | Service name to check for health | -| `keepalived_id` | Yes | - | Keepalived instance identifier | -| `keepalived_interface` | Yes | `eth0` | Network interface for VRRP | -| `keepalived_priority` | Yes | `101` | VRRP priority (higher = master) | -| `keepalived_state` | Yes | `MASTER` | Initial state (MASTER/BACKUP) | -| `keepalived_unicast_peer` | Yes | - | Peer IP address for unicast VRRP | -| `keepalived_unicast_src_ip` | Yes | - | Source IP address for unicast VRRP | -| `keepalived_virtual_ipaddress` | Yes | - | Virtual IP address to manage | -| `keepalived_virtual_ipaddress_interface` | Yes | `eth0` | Interface for virtual IP | -| `keepalived_vr_id` | Yes | `1` | VRRP virtual router ID | -| `keepalived_vrrp_instance` | Yes | `VI_01` | VRRP instance name | +| Variable | Required | Default | Description | +| ---------------------------------------- | -------- | --------------------- | ---------------------------------- | +| `keepalived_auth_pass` | Yes | `SuperSecurePassword` | VRRP authentication password | +| `keepalived_chk_service` | Yes | --------------------- | Service name to check for health | +| `keepalived_id` | Yes | --------------------- | Keepalived instance identifier | +| `keepalived_interface` | Yes | `eth0` | Network interface for VRRP | +| `keepalived_priority` | Yes | `101` | VRRP priority (higher = master) | +| `keepalived_state` | Yes | `MASTER` | Initial state (MASTER/BACKUP) | +| `keepalived_unicast_peer` | Yes | --------------------- | Peer IP address for unicast VRRP | +| `keepalived_unicast_src_ip` | Yes | --------------------- | Source IP address for unicast VRRP | +| `keepalived_virtual_ipaddress` | Yes | --------------------- | Virtual IP address to manage | +| `keepalived_virtual_ipaddress_interface` | Yes | `eth0` | Interface for virtual IP | +| `keepalived_vr_id` | Yes | `1` | VRRP virtual router ID | +| `keepalived_vrrp_instance` | Yes | `VI_01` | VRRP instance name | ## Example diff --git a/roles/requirements.yml b/roles/requirements.yml index cfc4bfc..2124a29 100644 --- a/roles/requirements.yml +++ b/roles/requirements.yml @@ -2,5 +2,5 @@ roles: - name: "keepalived" - src: "https://gitlab.simoncor.net/ansible/ans-keepalived.git" + src: "https://git.simoncor.net/ansible/keepalived.git" scm: "git"