From c60274d90861620c751050d599322ff8eb9e321f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Sachse?= <joerg.sachse@slub-dresden.de> Date: Mon, 9 Sep 2024 16:38:59 +0200 Subject: [PATCH] test: add CI routine for testing AlmaLinux 8 --- .gitlab-ci.yml | 41 ++++++++++++++++++++++++++++++++++------- 1 file changed, 34 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ccf8ebe..2cf0056 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -16,10 +16,12 @@ variables: ANSIBLE_FORCE_COLOR: 'true' PY_COLORS: '1' -test-job: +test-job-debian12: stage: test tags: - "shell" + vars: + SCENARIO: "virtualbox_debian12" script: # make sure that Ansible Vaults are present and can be decrypted - echo "${VAULT_INSTALL_COMMON}" > ../lza_install_common.pass @@ -27,14 +29,39 @@ test-job: - rm -rf ../ansible_vaults/ - git clone https://gitlab+deploy-token-25:${VAULT_ACCESS_TOKEN}@git.slub-dresden.de/slub-referat-2-3/ansible_vaults.git ../ansible_vaults/; \ # run Molecule tests - - molecule syntax --scenario-name default + - molecule syntax --scenario-name ${SCENARIO} # We cannot use `molecule lint` anymore because: # - https://github.com/ansible-community/molecule/pull/3802 "Remove lint command" # - https://github.com/ansible-community/molecule/discussions/3825#discussioncomment-4908366 - yamllint --strict --format colored ./ - ansible-lint --format full --profile production --strict --force-color ./ - - molecule create --scenario-name default - - molecule converge --scenario-name default - - molecule idempotence --scenario-name default - # - molecule verify --scenario-name default - - molecule destroy --scenario-name default + - molecule create --scenario-name ${SCENARIO} + - molecule converge --scenario-name ${SCENARIO} + - molecule idempotence --scenario-name ${SCENARIO} + # - molecule verify --scenario-name ${SCENARIO} + - molecule destroy --scenario-name ${SCENARIO} + +test-job-alma8: + stage: test + tags: + - "shell" + vars: + SCENARIO: "virtualbox_alma8" + script: + # make sure that Ansible Vaults are present and can be decrypted + - echo "${VAULT_INSTALL_COMMON}" > ../lza_install_common.pass + - export ANSIBLE_VAULT_PASSWORD_FILE=../lza_install_common.pass + - rm -rf ../ansible_vaults/ + - git clone https://gitlab+deploy-token-25:${VAULT_ACCESS_TOKEN}@git.slub-dresden.de/slub-referat-2-3/ansible_vaults.git ../ansible_vaults/; \ + # run Molecule tests + - molecule syntax --scenario-name ${SCENARIO} + # We cannot use `molecule lint` anymore because: + # - https://github.com/ansible-community/molecule/pull/3802 "Remove lint command" + # - https://github.com/ansible-community/molecule/discussions/3825#discussioncomment-4908366 + - yamllint --strict --format colored ./ + - ansible-lint --format full --profile production --strict --force-color ./ + - molecule create --scenario-name ${SCENARIO} + - molecule converge --scenario-name ${SCENARIO} + - molecule idempotence --scenario-name ${SCENARIO} + # - molecule verify --scenario-name ${SCENARIO} + - molecule destroy --scenario-name ${SCENARIO} -- GitLab