Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
Commit 7e09707a authored by Christophe Chaudier's avatar Christophe Chaudier :rocket:
Browse files

Merge branch '73-fix-job-yaml-lint' into 'master'

Resolve "fix: job yaml-lint"

Closes #64 and #73

See merge request lydra/gitlab-ci-templates!55
parents 241beebc caa44d49
No related branches found
No related tags found
No related merge requests found
Pipeline #13188 failed
Showing
with 36 additions and 7 deletions
...@@ -21,7 +21,7 @@ include: ...@@ -21,7 +21,7 @@ include:
- '/templates/job/bash/test.yml' - '/templates/job/bash/test.yml'
- '/templates/job/yaml/lint.yml' - '/templates/job/yaml/lint.yml'
- '/templates/job/terraform/lint.yml' - '/templates/job/terraform/lint.yml'
# Deprecated templates # Deprecated templates
- '/gci-templates/job/info.yml' - '/gci-templates/job/info.yml'
- '/gci-templates/job/.base.yml' - '/gci-templates/job/.base.yml'
......
---
extends: default
rules:
colons:
max-spaces-after: -1
line-length:
max: 128
---
include:
image: docker:19.03.0 image: docker:19.03.0
variables: variables:
DOCKER_DRIVER: overlay2 DOCKER_DRIVER: overlay2
......
---
variables: variables:
tpl_directory_old: gci-template tpl_directory_old: gci-template
tpl_baseurl: https://gitlab.com/lydra/gitlab-ci-templates/-/raw/${CI_COMMIT_BRANCH} tpl_baseurl: https://gitlab.com/lydra/gitlab-ci-templates/-/raw/${CI_COMMIT_BRANCH}
...@@ -5,17 +6,19 @@ variables: ...@@ -5,17 +6,19 @@ variables:
.deprecated_tpl: .deprecated_tpl:
after_script: after_script:
- echo -e '\033[0;31m' # RED - echo -e '\033[0;31m' # RED
- echo "⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨" - echo "⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨"
- echo "⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨 DEPRECATED TEMPLATE DIR ⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨" - echo "⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨 DEPRECATED TEMPLATE DIR ⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨"
- echo "In release 1.0.0 the template directory ${tpl_directory_old} will be remove !" - echo "In release 1.0.0 the template directory ${tpl_directory_old} will be remove !"
- echo "Use the new template directory ${tpl_directory}" - echo "Use the new template directory ${tpl_directory}"
- echo "⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨" - echo "⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨⚠️🚨"
- echo -e '\033[0m' # No Color - echo -e '\033[0m' # No Color
- exit 1 - exit 1
allow_failure: true allow_failure: true
warning move templates dir: warning move templates dir:
extends: .warning extends: .warning
variables: variables:
message: "In release 1.0.0 the template directory ${tpl_directory_old} will be remove ! Use the new template directory ${tpl_directory}" message: >
In release 1.0.0 the template directory ${tpl_directory_old} will be remove !
Use the new template directory ${tpl_directory}"
---
.base_tpl: .base_tpl:
variables: variables:
working_directory: "$CI_PROJECT_DIR" working_directory: "$CI_PROJECT_DIR"
......
---
ansible-lint: ansible-lint:
extends: .base_ansible extends: .base_ansible
image: yokogawa/ansible-lint:v4.2.0 image: yokogawa/ansible-lint:v4.2.0
......
---
ansible-syntax-check: ansible-syntax-check:
extends: .base_ansible extends: .base_ansible
image: williamyeh/ansible:alpine3 image: williamyeh/ansible:alpine3
......
---
ansible-lint: ansible-lint:
extends: .base_ansible extends: .base_ansible
image: yokogawa/ansible-lint:v4.2.0 image: yokogawa/ansible-lint:v4.2.0
...@@ -10,7 +11,7 @@ ansible-lint: ...@@ -10,7 +11,7 @@ ansible-lint:
ansible-lint --force-color ${file} ansible-lint --force-color ${file}
echo -e "\e[32m -> Ansible: lint OK\e[0m" echo -e "\e[32m -> Ansible: lint OK\e[0m"
done done
ansible-syntax-check: ansible-syntax-check:
extends: .base_ansible extends: .base_ansible
image: williamyeh/ansible:alpine3 image: williamyeh/ansible:alpine3
......
---
molecule: molecule:
extends: .base_ansible extends: .base_ansible
stage: test stage: test
......
---
bash-lint: bash-lint:
extends: .base_tpl extends: .base_tpl
stage: lint stage: lint
......
---
bash-lint: bash-lint:
extends: .base_tpl extends: .base_tpl
stage: lint stage: lint
...@@ -16,4 +17,4 @@ bash-lint: ...@@ -16,4 +17,4 @@ bash-lint:
done done
for script in $files_to_lint; do for script in $files_to_lint; do
_shellcheck $script _shellcheck $script
done done
\ No newline at end of file
---
bats: bats:
extends: .base_tpl extends: .base_tpl
stage: test stage: test
......
---
bats: bats:
extends: .base_tpl extends: .base_tpl
stage: test stage: test
...@@ -15,5 +16,5 @@ bats: ...@@ -15,5 +16,5 @@ bats:
-v "$(pwd):/code/" \ -v "$(pwd):/code/" \
-v "/tmp:/tmp_ro":ro \ -v "/tmp:/tmp_ro":ro \
bats/bats:latest /code/test bats/bats:latest /code/test
false false
---
# docs: # docs:
# - https://docs.gitlab.com/ee/ci/docker/using_kaniko.html # - https://docs.gitlab.com/ee/ci/docker/using_kaniko.html
# - https://cloud.google.com/build/docs/kaniko-cache # - https://cloud.google.com/build/docs/kaniko-cache
......
---
# docs: # docs:
# - https://docs.gitlab.com/ee/ci/docker/using_kaniko.html # - https://docs.gitlab.com/ee/ci/docker/using_kaniko.html
# - https://cloud.google.com/build/docs/kaniko-cache # - https://cloud.google.com/build/docs/kaniko-cache
......
---
# doc: https://github.com/hadolint/hadolint # doc: https://github.com/hadolint/hadolint
container::lint: container::lint:
extends: .base_tpl extends: .base_tpl
......
---
docker-lint: docker-lint:
extends: .base_tpl extends: .base_tpl
stage: lint stage: lint
......
---
.info: .info:
stage: info stage: info
variables: variables:
......
---
molecule: molecule:
extends: .base_ansible extends: .base_ansible
stage: test stage: test
......
---
node::build: node::build:
extends: extends:
- .base_node - .base_node
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment