Select Git revision
.gitlab-ci.yml

Jörg Sachse authored
.gitlab-ci.yml 1.85 KiB
---
# A pipeline is composed of independent jobs that run scripts, grouped into stages.
# Stages run in sequential order, but jobs within stages run in parallel.
#
# For more information, see: https://docs.gitlab.com/ee/ci/yaml/index.html#stages
stages: # List of stages for jobs, and their order of execution
- test
default:
before_script:
- source /opt/molecule/bin/activate
- ansible --version
- molecule --version
test-job:
stage: test
tags:
- "shell"
script:
# make sure that Ansible Vaults are present and can be decrypted
- echo "${VAULT_LZA_BOOTSTRAP_RHEL_SERVER}" > ../lza_bootstrap_rhel_server.pass
- export ANSIBLE_VAULT_IDENTITY_LIST="../lza_bootstrap_rhel_server.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 against DEFAULT scenario (virtualbox_centos7)
- export SCENARIO="virtualbox_centos7"
- molecule syntax --scenario-name "${SCENARIO}"
- molecule lint --scenario-name "${SCENARIO}"
- 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}"
# run Molecule tests against Rocky Linux 8 scenario (virtualbox_rocky8)
- export SCENARIO="virtualbox_rocky8"
- molecule syntax --scenario-name "${SCENARIO}"
- molecule lint --scenario-name "${SCENARIO}"
- 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}"