Files
DevOpsLab/cicd/.gitlab-ci.yml
Сергей Антропов d8e1052e7b refactor: переименование проекта AnsibleLab -> DevOpsLab
- Заменено название проекта во всех файлах проекта
- Обновлены:
  * README.md
  * Makefile
  * Все файлы документации (.md)
  * CI/CD конфигурации (Jenkins, GitLab, GitHub Actions, Azure DevOps)
  * Скрипты (setup-cicd.sh, test-custom-images.sh)
  * Файлы конфигурации Molecule
- Изменена переменная PROJECT_NAME в Makefile на devops-lab
- Docker образы inecs/ansible-lab:* оставлены без изменений
  (чтобы не затрагивать существующие образы в Docker Hub)
2025-10-26 12:28:05 +03:00

51 lines
1.1 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 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