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

Merge branch 'zimniy-master-patch-62523' into 'master'

Update gitlab-ci.yml, README.md

See merge request tools/continuous-integration/ansible/playbooks!8
parents 7ad31bcb 38934db3
Loading
Loading
Loading
Loading

.gitignore

deleted100644 → 0
+0 −1
Original line number Diff line number Diff line
/.idea/
+1 −2
Original line number Diff line number Diff line
# System Configurations
# Playbooks
+13 −28
Original line number Diff line number Diff line
# VARIABLES
variables:
  DOCKER_BUILDKIT: 0
  DOCKER_DRIVER: overlay2
  DOCKER_HOST: tcp://localhost:2375
  DOCKER_TLS_CERTDIR: ""
  GIT_DEPTH: 1

##########################################################################################################

## PIPELINE DEFINITION
stages:
  - shellcheck
  - ansible-lint
  - check

##########################################################################################################

### COMMON SECTION
.common:
  image: $ANSIBLE_IMAGE
  variables:
    GIT_SUBMODULE_STRATEGY: recursive
  except:
    - /^master$/
    GIT_DEPTH: 1
    ANSIBLE_FORCE_COLOR: "False"
  before_script:
    - chmod -R o-w ../

##########################################################################################################

### TEST SECTION

shellcheck:
  extends: .common
  stage: shellcheck
  image: $SHELLCHECK_IMAGE
  script:
    - test -s run.sh && shellcheck ${SHELLCHECK_PARAMETERS} run.sh || true

### CHECK SECTION
ansible-lint:
  extends: .common
  stage: ansible-lint
  image: $ANSIBLE_IMAGE
  variables:
    ANSIBLE_FORCE_COLOR: "True"
  stage: check
  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:
    - test -s requirements.yml && ansible-galaxy install -r requirements.yml || true
    - test -s setup.yml && ansible-lint setup.yml || true