Commit 92797ed6 authored by Simon Cornet's avatar Simon Cornet
Browse files

feat(ci): added yamllint

parent 208852fc
Loading
Loading
Loading
Loading
Loading
+11 −8
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@ deployment:

  # prepare ssh
  before_script:

    # prepare ssh
    - |
        # prepare ssh
@@ -24,6 +25,8 @@ deployment:

  # deployment commands
  script:

    - |
        # install ansible roles dependancies
      ssh $SSH_DEPLOYMENT_USER@$ANSIBLE_SERVER "sudo /usr/local/bin/ansible-galaxy install -r /etc/ansible/roles/requirements.yaml --force"
        ssh $SSH_DEPLOYMENT_USER@$ANSIBLE_SERVER \
        "sudo /usr/local/bin/ansible-galaxy install -r /etc/ansible/roles/requirements.yaml --force"
+17 −3
Original line number Diff line number Diff line
---

# linting
linting:
ansible-lint:
  stage: "linting"
  image:
    name: "docker.io/pipelinecomponents/ansible-lint:0.79.0"
  image: "docker.io/pipelinecomponents/ansible-lint:0.79.0"
  rules:

    # run only on push to default branch
@@ -14,3 +13,18 @@ linting:
  # start linting
  script:
    - "ansible-lint -c .ansible-lint ."

# yamllint
yamllint:
  stage: "linting"
  image: "registry.gitlab.com/pipeline-components/yamllint:0.35.0"
  rules:

    # run only on push to default branch
    - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
    - when: "never"

  script:

    # run yamllint
    - "yamllint ."