Commit c401a374 authored by Дмитрий Сафронов's avatar Дмитрий Сафронов
Browse files

Update gitlab-ci.yml

parent 07745f60
Loading
Loading
Loading
Loading
+12 −4
Original line number Diff line number Diff line
@@ -39,9 +39,13 @@ stages:
check:
  extends: .common
  stage: check
  except:
    refs:
      - master
  interruptible: true
  rules:
    - if: '$CUSTOM_SKIP_CHECK'
      when: never
    - if: '$CI_PIPELINE_SOURCE == "schedule" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
    - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH )'
    - when: never
  script:
    - echo "Checking inventory"
    - ansible-inventory -i inventory.yml --graph
@@ -55,9 +59,13 @@ deploy:
  stage: deploy
  only:
    refs:
      - master
      - $CI_DEFAULT_BRANCH
    variables:
      - $REPOSITORY =~ /^\S+$/
  interruptible: false
  rules:
    - if: '$CI_PIPELINE_SOURCE == "web" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $REPOSITORY =~ /^\S+$/'
    - when: never
  script:
    - echo -e "Deploying...\n\tRepository - [${REPOSITORY}]\n\tPlaybook - [${PLAYBOOK:-run.yml}]\n\tParameters - [${PARAMETERS}]\n\tAnsible image - [${ANSIBLE_IMAGE}]"
    - export INVENTORY_DIRECTORY="`pwd`"