From 1f771d4dd2fe23d94751ac4770d65b60f5abe31d Mon Sep 17 00:00:00 2001 From: Bertrand Lanson Date: Thu, 29 Jun 2023 20:49:04 +0200 Subject: [PATCH] move to gitea and other fixes --- .gitea/workflows/test.yml | 56 ++++++++++++++++++++++++++ .gitlab-ci.yml | 82 --------------------------------------- LICENSE | 2 +- README.md | 6 +-- meta/main.yml | 1 + 5 files changed, 61 insertions(+), 86 deletions(-) create mode 100644 .gitea/workflows/test.yml delete mode 100644 .gitlab-ci.yml diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml new file mode 100644 index 0000000..5d43b41 --- /dev/null +++ b/.gitea/workflows/test.yml @@ -0,0 +1,56 @@ +--- +name: test +on: [push] + +jobs: + lint: + name: Linting + runs-on: ubuntu-latest + container: + image: git.ednz.fr/container-factory/ansible-runner:act-latest + credentials: + username: ${{ secrets.ACTIONS_USER }} + password: ${{ secrets.ACTIONS_TOKEN }} + env: + ANSIBLE_HOST_KEY_CHECKING: 'false' + ANSIBLE_FORCE_COLOR: 'true' + ANSIBLE_PYTHON_INTERPRETER: /usr/bin/python3 + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: "Ansible lint" + run: ansible-lint + working-directory: ${{ gitea.workspace }} + + - name: "YAML lint" + run: yamllint . -f colored -c .yamllint + working-directory: ${{ gitea.workspace }} + + molecule-test: + name: Molecule tests + runs-on: ubuntu-latest + needs: lint + container: + image: git.ednz.fr/container-factory/ansible-runner:act-latest + credentials: + username: ${{ secrets.ACTIONS_USER }} + password: ${{ secrets.ACTIONS_TOKEN }} + strategy: + matrix: + test_os: [debian11, debian12, ubuntu2004, ubuntu2204] + scenario: [default, with_acl_enabled] + env: + ANSIBLE_HOST_KEY_CHECKING: 'false' + ANSIBLE_FORCE_COLOR: 'true' + ANSIBLE_PYTHON_INTERPRETER: /usr/bin/python3 + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: "Molecule test" + run: molecule test -s ${{ matrix.scenario }} + shell: bash + working-directory: ${{ gitea.workspace }} + env: + MOLECULE_TEST_OS: ${{ matrix.test_os }} diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index cf22915..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,82 +0,0 @@ ---- -stages: - - verify - - test-default - - test-with-extra-sidecars - -image: - name: registry.ednz.fr/forge/ansible-runner - -variables: - ANSIBLE_HOST_KEY_CHECKING: 'false' - ANSIBLE_FORCE_COLOR: 'true' - ANSIBLE_PYTHON_INTERPRETER: /usr/bin/python3 - DOCKER_AUTH_CONFIG: $CI_DOCKER_AUTH_CONFIG - -.stage-test-default: - stage: test-default - -.stage-test-with-extra-sidecars: - stage: test-with-extra-sidecars - -.variables-ubuntu-2004: - variables: - MOLECULE_TEST_OS: "ubuntu2004" - -.variables-ubuntu-2204: - variables: - MOLECULE_TEST_OS: "ubuntu2204" - -.variables-debian-11: - variables: - MOLECULE_TEST_OS: "debian11" - -.script-molecule-test-default: - script: - - molecule test - -.script-molecule-test-with-extra-sidecars: - script: - - molecule test -s with_extra_sidecars - -ansible-verify: - stage: verify - script: - - yamllint . -c .yamllint - - ansible-lint - -ansible-test-ubuntu-2004-default: - extends: - - .stage-test-default - - .variables-ubuntu-2004 - - .script-molecule-test-default - -ansible-test-ubuntu-2204-default: - extends: - - .stage-test-default - - .variables-ubuntu-2204 - - .script-molecule-test-default - -ansible-test-debian-11-default: - extends: - - .stage-test-default - - .variables-debian-11 - - .script-molecule-test-default - -ansible-test-ubuntu-2004-with-extra-sidecars: - extends: - - .stage-test-with-extra-sidecars - - .variables-ubuntu-2004 - - .script-molecule-test-with-extra-sidecars - -ansible-test-ubuntu-2204-with-extra-sidecars: - extends: - - .stage-test-with-extra-sidecars - - .variables-ubuntu-2204 - - .script-molecule-test-with-extra-sidecars - -ansible-test-debian-11-with-extra-sidecars: - extends: - - .stage-test-with-extra-sidecars - - .variables-debian-11 - - .script-molecule-test-with-extra-sidecars diff --git a/LICENSE b/LICENSE index 9ef042d..c9a37e5 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2017 Jeff Geerling +Copyright (c) 2017 Bertrand Lanson Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/README.md b/README.md index 0c9a19c..a2e0159 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -Deploy AdGuard +deploy_adguard ========= -> This repository is only a mirror. Development and testing is done on a private gitlab server. +> This repository is only a mirror. Development and testing is done on a private gitea server. This role install and configure adguard, with optionally virtual IP, metrics, and consul integration on **debian-based** distributions. @@ -123,4 +123,4 @@ MIT / BSD Author Information ------------------ -This role was created by Bertrand Lanson in 2023. \ No newline at end of file +This role was created by Bertrand Lanson in 2023. diff --git a/meta/main.yml b/meta/main.yml index 1090a71..59044b4 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -15,6 +15,7 @@ galaxy_info: - name: Debian versions: - bullseye + - bookworm galaxy_tags: - 'ubuntu' - 'debian'