# GitLab CI для DevOpsLab # Автор: Сергей Антропов # Сайт: https://devops.org.ru stages: - test - deploy variables: DOCKER_IMAGE: "quay.io/ansible/creator-ee:latest" DOCKER_TLS_CERTDIR: "" ANSIBLE_FORCE_COLOR: "true" before_script: - echo "Установка зависимостей..." - pip install molecule[docker] ansible-lint - ansible-galaxy collection install -r requirements.yml # Тестирование с Molecule test: stage: test image: $DOCKER_IMAGE services: - docker:dind variables: DOCKER_TLS_CERTDIR: "" script: - echo "Запуск тестов Molecule..." - cd molecule/universal - molecule test -s universal artifacts: reports: junit: molecule/universal/.molecule/reports/junit.xml paths: - molecule/universal/.molecule/ expire_in: 1 week only: - merge_requests - main - develop # Деплой (если нужен) deploy: stage: deploy image: $DOCKER_IMAGE script: - echo "Деплой не настроен" - echo "Добавьте логику деплоя в этот job" when: manual only: - main