Добавил возможность релизов в реджистри и файл дCI для GitLab

This commit is contained in:
Сергей Антропов
2025-03-14 16:50:45 +03:00
parent 2cb442bd73
commit 04ebb9d1ed
2 changed files with 41 additions and 0 deletions

31
gitlab-ci.yml Normal file
View File

@@ -0,0 +1,31 @@
stages:
- lint
- test
- deploy
variables:
DOCKER_IMAGE: "ansible:latest"
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
- docker pull $DOCKER_IMAGE
lint:
stage: lint
script:
- docker run --rm -v $(pwd):/ansible $DOCKER_IMAGE make role lint
allow_failure: false
test:
stage: test
script:
- docker run --rm -v $(pwd):/ansible $DOCKER_IMAGE make role test
allow_failure: false
deploy:
stage: deploy
script:
- docker run --rm -v $(pwd):/ansible $DOCKER_IMAGE make role deploy
only:
- master
- /^cluster-.*$/