Skip to content
Snippets Groups Projects
Select Git revision
  • 0cec7930715fefe58b3b925e268303374cde8131
  • master default protected
  • extended_maintenance
3 results

.gitlab-ci.yml

Blame
  • .gitlab-ci.yml 1.46 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_INSTALL_COMMON}" > ../lza_install_common.pass
        - echo "${VAULT_ROSETTA_APP}" > ../lza_rosetta_app.pass
        - export ANSIBLE_VAULT_IDENTITY_LIST="../lza_install_common.pass, ../lza_rosetta_app.pass"
        - rm -rf ../ansible_vaults/
        - rm -rf ../ansible_lza_install_common/
        - git clone https://gitlab+deploy-token-25:${VAULT_ACCESS_TOKEN}@git.slub-dresden.de/slub-referat-2-3/ansible_vaults.git ../ansible_vaults/;
        - git clone https://git.slub-dresden.de/digital-preservation/ansible_lza_install_common.git ../ansible_lza_install_common/;
        # run Molecule tests
        - molecule syntax --scenario-name default
        - molecule lint --scenario-name default
        - 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