diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2c56afc9d511dc88082bf63f3a8c80437d9c8be9..b553163f18e4eade0bfe0efe4379c37c0e3e73a9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,7 +21,7 @@ include: - '/templates/job/bash/test.yml' - '/templates/job/yaml/lint.yml' - '/templates/job/terraform/lint.yml' -# Deprecated templates + # Deprecated templates - '/gci-templates/job/info.yml' - '/gci-templates/job/.base.yml' diff --git a/.yamllint b/.yamllint new file mode 100644 index 0000000000000000000000000000000000000000..6081d2e3cf6e2bdaceaadbb32135e8e7b358de83 --- /dev/null +++ b/.yamllint @@ -0,0 +1,8 @@ +--- +extends: default + +rules: + colons: + max-spaces-after: -1 + line-length: + max: 128 diff --git a/gci-templates/activate-dind.yml b/gci-templates/activate-dind.yml index 27b050133b3d9ea25d09e3a5294e198914b251cd..8db505a04aec2894d9a8d2e36cc74758684be407 100644 --- a/gci-templates/activate-dind.yml +++ b/gci-templates/activate-dind.yml @@ -1,3 +1,5 @@ +--- +include: image: docker:19.03.0 variables: DOCKER_DRIVER: overlay2 diff --git a/gci-templates/deprecated.yml b/gci-templates/deprecated.yml index 3d02b342c269e642da0c3bd228c918e357d08d4d..c876ab97f18daa3ae2944893b61bd593658b00e0 100644 --- a/gci-templates/deprecated.yml +++ b/gci-templates/deprecated.yml @@ -1,3 +1,4 @@ +--- variables: tpl_directory_old: gci-template tpl_baseurl: https://gitlab.com/lydra/gitlab-ci-templates/-/raw/${CI_COMMIT_BRANCH} @@ -5,17 +6,19 @@ variables: .deprecated_tpl: after_script: - - echo -e '\033[0;31m' # RED + - echo -e '\033[0;31m' # RED - echo "âš ï¸ðŸš¨âš ï¸ðŸš¨âš ï¸ðŸš¨âš ï¸ðŸš¨âš ï¸ðŸš¨âš ï¸ðŸš¨âš ï¸ðŸš¨âš ï¸ðŸš¨âš ï¸ðŸš¨âš ï¸ðŸš¨âš ï¸ðŸš¨âš ï¸ðŸš¨âš ï¸ðŸš¨âš ï¸ðŸš¨âš ï¸ðŸš¨âš ï¸ðŸš¨âš ï¸ðŸš¨âš ï¸ðŸš¨âš ï¸ðŸš¨âš ï¸ðŸš¨âš ï¸ðŸš¨âš ï¸ðŸš¨âš ï¸ðŸš¨âš ï¸ðŸš¨" - echo "âš ï¸ðŸš¨âš ï¸ðŸš¨âš ï¸ðŸš¨âš ï¸ðŸš¨âš ï¸ðŸš¨âš ï¸ðŸš¨âš ï¸ðŸš¨ DEPRECATED TEMPLATE DIR âš ï¸ðŸš¨âš ï¸ðŸš¨âš ï¸ðŸš¨âš ï¸ðŸš¨âš âš ï¸ðŸš¨âš ï¸ðŸš¨âš ï¸ðŸš¨âš ï¸ðŸš¨âš ï¸ðŸš¨" - echo "In release 1.0.0 the template directory ${tpl_directory_old} will be remove !" - echo "Use the new template directory ${tpl_directory}" - echo "âš ï¸ðŸš¨âš ï¸ðŸš¨âš ï¸ðŸš¨âš ï¸ðŸš¨âš ï¸ðŸš¨âš ï¸ðŸš¨âš ï¸ðŸš¨âš ï¸ðŸš¨âš ï¸ðŸš¨âš ï¸ðŸš¨âš ï¸ðŸš¨âš ï¸ðŸš¨âš ï¸ðŸš¨âš ï¸ðŸš¨âš ï¸ðŸš¨âš ï¸ðŸš¨âš ï¸ðŸš¨âš ï¸ðŸš¨âš ï¸ðŸš¨âš ï¸ðŸš¨âš ï¸ðŸš¨âš ï¸ðŸš¨âš ï¸ðŸš¨âš ï¸ðŸš¨" - - echo -e '\033[0m' # No Color + - echo -e '\033[0m' # No Color - exit 1 allow_failure: true warning move templates dir: extends: .warning 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}" diff --git a/gci-templates/job/.base.yml b/gci-templates/job/.base.yml index 238cdd4715b9381727ac1ee6b027121fbe44e054..e84a684f5d4a8d95d895f42dd4ee206e01aaf65a 100644 --- a/gci-templates/job/.base.yml +++ b/gci-templates/job/.base.yml @@ -1,3 +1,4 @@ +--- .base_tpl: variables: working_directory: "$CI_PROJECT_DIR" diff --git a/gci-templates/job/ansible-lint.yml b/gci-templates/job/ansible-lint.yml index 1ccfe7e1da4d8e078a67b71a3a0808358c07c481..d5d24b456b6bfe3f88620ee3457078da1dfd59a9 100644 --- a/gci-templates/job/ansible-lint.yml +++ b/gci-templates/job/ansible-lint.yml @@ -1,3 +1,4 @@ +--- ansible-lint: extends: .base_ansible image: yokogawa/ansible-lint:v4.2.0 diff --git a/gci-templates/job/ansible-syntax-check.yml b/gci-templates/job/ansible-syntax-check.yml index f457b7e98dfddfe48e98cf65efb9328e34478a99..4e97ecbcfefaa48d4bae1225bc7eabfb2a896f54 100644 --- a/gci-templates/job/ansible-syntax-check.yml +++ b/gci-templates/job/ansible-syntax-check.yml @@ -1,3 +1,4 @@ +--- ansible-syntax-check: extends: .base_ansible image: williamyeh/ansible:alpine3 diff --git a/gci-templates/job/ansible/lint.yml b/gci-templates/job/ansible/lint.yml index 40404039258488a31c5c333520545c0857809f2a..a1fb19b89c69e6d8043606d16de73150f508736f 100644 --- a/gci-templates/job/ansible/lint.yml +++ b/gci-templates/job/ansible/lint.yml @@ -1,3 +1,4 @@ +--- ansible-lint: extends: .base_ansible image: yokogawa/ansible-lint:v4.2.0 @@ -10,7 +11,7 @@ ansible-lint: ansible-lint --force-color ${file} echo -e "\e[32m -> Ansible: lint OK\e[0m" done - + ansible-syntax-check: extends: .base_ansible image: williamyeh/ansible:alpine3 diff --git a/gci-templates/job/ansible/role-test.yml b/gci-templates/job/ansible/role-test.yml index 45788bddd4c551e39a0e8757e124883bc3a4c1d8..ecd71784eeb289ce0631cdc09cc7d244b2590cd8 100644 --- a/gci-templates/job/ansible/role-test.yml +++ b/gci-templates/job/ansible/role-test.yml @@ -1,3 +1,4 @@ +--- molecule: extends: .base_ansible stage: test diff --git a/gci-templates/job/bash-lint.yml b/gci-templates/job/bash-lint.yml index 6c1ef58ff94e2d0ea535cd1c4a277f621f35283f..0ac3df7ccb8292317ce20811ae830ebcafdde902 100644 --- a/gci-templates/job/bash-lint.yml +++ b/gci-templates/job/bash-lint.yml @@ -1,3 +1,4 @@ +--- bash-lint: extends: .base_tpl stage: lint diff --git a/gci-templates/job/bash/lint.yml b/gci-templates/job/bash/lint.yml index 084cf352e4e7e494048e9c7c5c007716e066e68e..367b165f941e4d2f314af24e78011dd2ef382eb7 100644 --- a/gci-templates/job/bash/lint.yml +++ b/gci-templates/job/bash/lint.yml @@ -1,3 +1,4 @@ +--- bash-lint: extends: .base_tpl stage: lint @@ -16,4 +17,4 @@ bash-lint: done for script in $files_to_lint; do _shellcheck $script - done \ No newline at end of file + done diff --git a/gci-templates/job/bash/test.yml b/gci-templates/job/bash/test.yml index dcd81414fb64fcdd1a6b10973fe51b8676ee764f..279cb0208bf40ead062ab69348d338fa02510325 100644 --- a/gci-templates/job/bash/test.yml +++ b/gci-templates/job/bash/test.yml @@ -1,3 +1,4 @@ +--- bats: extends: .base_tpl stage: test diff --git a/gci-templates/job/bats.yml b/gci-templates/job/bats.yml index 1040f359cb813b8da60f1b51a0b17427dd325fc5..f34251b43b7455c155c82fee0b92523b28039665 100644 --- a/gci-templates/job/bats.yml +++ b/gci-templates/job/bats.yml @@ -1,3 +1,4 @@ +--- bats: extends: .base_tpl stage: test @@ -15,5 +16,5 @@ bats: -v "$(pwd):/code/" \ -v "/tmp:/tmp_ro":ro \ bats/bats:latest /code/test - + false diff --git a/gci-templates/job/container/build.yml b/gci-templates/job/container/build.yml index d998198c4e6efb098d367844d6227290d023f3f1..53f7626917bac12711d655e41b0f45ab38428aa8 100644 --- a/gci-templates/job/container/build.yml +++ b/gci-templates/job/container/build.yml @@ -1,3 +1,4 @@ +--- # docs: # - https://docs.gitlab.com/ee/ci/docker/using_kaniko.html # - https://cloud.google.com/build/docs/kaniko-cache diff --git a/gci-templates/job/container/delivery.yml b/gci-templates/job/container/delivery.yml index e1c62661aa70591cee8605cd34c7dc6291e2118b..b6ee32668f41e5ed6af34cc1d479b4a16efec9ab 100644 --- a/gci-templates/job/container/delivery.yml +++ b/gci-templates/job/container/delivery.yml @@ -1,3 +1,4 @@ +--- # docs: # - https://docs.gitlab.com/ee/ci/docker/using_kaniko.html # - https://cloud.google.com/build/docs/kaniko-cache diff --git a/gci-templates/job/container/lint.yml b/gci-templates/job/container/lint.yml index 52245ce6decda38ef6f7def5055404b07d21f6c4..63027128a4fe90300f4c2e058cf752ab4a8545b5 100644 --- a/gci-templates/job/container/lint.yml +++ b/gci-templates/job/container/lint.yml @@ -1,3 +1,4 @@ +--- # doc: https://github.com/hadolint/hadolint container::lint: extends: .base_tpl diff --git a/gci-templates/job/docker-lint.yml b/gci-templates/job/docker-lint.yml index 890adf20cde4396d6529fb55366b36050679ee0a..82267c9bc9b2f5c8477fbe2e9084fe2b0ae5eb19 100644 --- a/gci-templates/job/docker-lint.yml +++ b/gci-templates/job/docker-lint.yml @@ -1,3 +1,4 @@ +--- docker-lint: extends: .base_tpl stage: lint diff --git a/gci-templates/job/info.yml b/gci-templates/job/info.yml index 04cd2c715831c904f9f1168c3e76a4fd8289de19..03c43ced88f96b7250974f63acaa9ca9e0c3413c 100644 --- a/gci-templates/job/info.yml +++ b/gci-templates/job/info.yml @@ -1,3 +1,4 @@ +--- .info: stage: info variables: diff --git a/gci-templates/job/molecule.yml b/gci-templates/job/molecule.yml index ed5d4098db74e180b03a153c9ba7c5ddb5576b56..929834f5d5a95901027cd06b9309d139d2b5745b 100644 --- a/gci-templates/job/molecule.yml +++ b/gci-templates/job/molecule.yml @@ -1,3 +1,4 @@ +--- molecule: extends: .base_ansible stage: test diff --git a/gci-templates/job/node/build.yml b/gci-templates/job/node/build.yml index 1e2dd50ff81b008f711f9e1cc59eca24a8c165f7..e90502ea881e73b72e51825c883cd87f8bd21190 100644 --- a/gci-templates/job/node/build.yml +++ b/gci-templates/job/node/build.yml @@ -1,3 +1,4 @@ +--- node::build: extends: - .base_node diff --git a/gci-templates/job/node/lint.yml b/gci-templates/job/node/lint.yml index 874f77c0cca0c668559f25e2673063d72550d0ed..d1a46c777ebb8145c05b3ab24feed5a10c3e36fa 100644 --- a/gci-templates/job/node/lint.yml +++ b/gci-templates/job/node/lint.yml @@ -1,3 +1,4 @@ +--- node::lint: extends: .base_node stage: lint diff --git a/gci-templates/job/node/test.yml b/gci-templates/job/node/test.yml index 802ae5927fc3f6c279bd520729c9141b5e9d2dfc..883f9f2080e4e9fa8721e311bf838a680960a6b6 100644 --- a/gci-templates/job/node/test.yml +++ b/gci-templates/job/node/test.yml @@ -1,3 +1,4 @@ +--- node::test: extends: .base_node stage: test diff --git a/gci-templates/job/terraform/lint.yml b/gci-templates/job/terraform/lint.yml index 76bf1c277c9426ef5f10e966264a58dd3b238179..d24dbf3b9a46be67d79ef98ee9b94e732b7fa0c7 100644 --- a/gci-templates/job/terraform/lint.yml +++ b/gci-templates/job/terraform/lint.yml @@ -1,5 +1,4 @@ --- -# -*- coding: utf-8 -*- terraform-syntax-check: extends: .base_tpl diff --git a/gci-templates/job/yaml-lint.yml b/gci-templates/job/yaml-lint.yml index 187d489e8ceab6758f6b778b2ddce06e152ab588..e80cb06bd566c49a5cd79ce4f5d1bf33b64fc7b1 100644 --- a/gci-templates/job/yaml-lint.yml +++ b/gci-templates/job/yaml-lint.yml @@ -1,3 +1,4 @@ +--- yaml-lint: extends: .base_tpl image: vpgrp/linter:yaml diff --git a/gci-templates/job/yaml/lint.yml b/gci-templates/job/yaml/lint.yml index b1fc8702659c587631a541723d35de842c708d99..dc85be68359e00a0c3b0c6687d8f06a1ce4ddd4a 100644 --- a/gci-templates/job/yaml/lint.yml +++ b/gci-templates/job/yaml/lint.yml @@ -1,3 +1,5 @@ +--- +# -*- coding: utf-8 -*- yaml-lint: extends: .base_tpl image: vpgrp/linter:yaml diff --git a/gci-templates/stages.yml b/gci-templates/stages.yml index 4982edb236af07121ffd1fc68a5b93f52b6a41cd..2ae636e1f649224cb11a076f452790d3c69f7db1 100644 --- a/gci-templates/stages.yml +++ b/gci-templates/stages.yml @@ -1,5 +1,6 @@ +--- include: - - 'https://gitlab.com/lydra/gitlab-ci-templates/-/raw/master/gci-templates/deprecated.yml' + - 'gci-templates/deprecated.yml' stages: - info @@ -61,7 +62,7 @@ variables: extends: - .base_tpl - .node-cache-pull - image: node:14.15.4-slim + image: node:14.15.4-slim .info: stage: info diff --git a/templates/activate-dind.yml b/templates/activate-dind.yml index 27b050133b3d9ea25d09e3a5294e198914b251cd..e3a30f73f707b0f587e087c939eb95a4e42f22c9 100644 --- a/templates/activate-dind.yml +++ b/templates/activate-dind.yml @@ -1,3 +1,4 @@ +--- image: docker:19.03.0 variables: DOCKER_DRIVER: overlay2 diff --git a/templates/job/.base.yml b/templates/job/.base.yml index 238cdd4715b9381727ac1ee6b027121fbe44e054..e84a684f5d4a8d95d895f42dd4ee206e01aaf65a 100644 --- a/templates/job/.base.yml +++ b/templates/job/.base.yml @@ -1,3 +1,4 @@ +--- .base_tpl: variables: working_directory: "$CI_PROJECT_DIR" diff --git a/templates/job/ansible/lint.yml b/templates/job/ansible/lint.yml index 40404039258488a31c5c333520545c0857809f2a..a1fb19b89c69e6d8043606d16de73150f508736f 100644 --- a/templates/job/ansible/lint.yml +++ b/templates/job/ansible/lint.yml @@ -1,3 +1,4 @@ +--- ansible-lint: extends: .base_ansible image: yokogawa/ansible-lint:v4.2.0 @@ -10,7 +11,7 @@ ansible-lint: ansible-lint --force-color ${file} echo -e "\e[32m -> Ansible: lint OK\e[0m" done - + ansible-syntax-check: extends: .base_ansible image: williamyeh/ansible:alpine3 diff --git a/templates/job/ansible/role-test.yml b/templates/job/ansible/role-test.yml index 45788bddd4c551e39a0e8757e124883bc3a4c1d8..ecd71784eeb289ce0631cdc09cc7d244b2590cd8 100644 --- a/templates/job/ansible/role-test.yml +++ b/templates/job/ansible/role-test.yml @@ -1,3 +1,4 @@ +--- molecule: extends: .base_ansible stage: test diff --git a/templates/job/bash/lint.yml b/templates/job/bash/lint.yml index 084cf352e4e7e494048e9c7c5c007716e066e68e..367b165f941e4d2f314af24e78011dd2ef382eb7 100644 --- a/templates/job/bash/lint.yml +++ b/templates/job/bash/lint.yml @@ -1,3 +1,4 @@ +--- bash-lint: extends: .base_tpl stage: lint @@ -16,4 +17,4 @@ bash-lint: done for script in $files_to_lint; do _shellcheck $script - done \ No newline at end of file + done diff --git a/templates/job/bash/test.yml b/templates/job/bash/test.yml index dcd81414fb64fcdd1a6b10973fe51b8676ee764f..279cb0208bf40ead062ab69348d338fa02510325 100644 --- a/templates/job/bash/test.yml +++ b/templates/job/bash/test.yml @@ -1,3 +1,4 @@ +--- bats: extends: .base_tpl stage: test diff --git a/templates/job/ci/images_list.yml b/templates/job/ci/images_list.yml index 5a545d2629a7e1036e75424768e652883d0a38b4..39cdbedc0755444771a83edd31bdb97c59a3c57f 100644 --- a/templates/job/ci/images_list.yml +++ b/templates/job/ci/images_list.yml @@ -1,3 +1,4 @@ +--- # List all images used in the CI templates # This job use yq : a portable command-line YAML processor # doc: https://mikefarah.gitbook.io/yq/ @@ -13,7 +14,7 @@ ci:images-list: for file in $(find . -type f -name '*.yml' | grep -v "/test/"); do # images in 'image' field cat ${file} | tr -d ' ' | { grep '^image:' || true; } | sed 's/:/@/' | cut -d '@' -f 2 >> ${IMAGES_LIST_FILE} - + # images in 'image.name' field yq e '.[].image.name as $image | $image' ${file} | { grep -v null || true; } >> ${IMAGES_LIST_FILE} done diff --git a/templates/job/container/build.yml b/templates/job/container/build.yml index 90f7aa689f0caa55e227cc05338eb8f6873977ab..d763d3cecc0f0bbefa599e73faa47c52b5a283ae 100644 --- a/templates/job/container/build.yml +++ b/templates/job/container/build.yml @@ -1,3 +1,4 @@ +--- # docs: # - https://docs.gitlab.com/ee/ci/docker/using_kaniko.html # - https://cloud.google.com/build/docs/kaniko-cache @@ -20,7 +21,7 @@ container:build: stage: package # Purge of tempory images -# docs : +# docs : # - https://docs.gitlab.com/ee/user/packages/container_registry/#delete-images # - https://docs.gitlab.com/ee/user/packages/container_registry/#delete-images-using-gitlab-cicd # - https://github.com/genuinetools/reg @@ -41,7 +42,10 @@ container:purge: REG_VERSION: 0.16.1 REG_OPTS: "--insecure --auth-url ${CI_REGISTRY} -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD}" before_script: - - curl --fail --show-error --location "https://github.com/genuinetools/reg/releases/download/v$REG_VERSION/reg-linux-amd64" --output /usr/local/bin/reg + - > + curl --fail --show-error + --location "https://github.com/genuinetools/reg/releases/download/v$REG_VERSION/reg-linux-amd64" + --output /usr/local/bin/reg - echo "$REG_SHA256 /usr/local/bin/reg" | sha256sum -c - - chmod a+x /usr/local/bin/reg - cd ${working_directory} diff --git a/templates/job/container/delivery.yml b/templates/job/container/delivery.yml index cb34f9e0115e4fc63d59dfe58ab59ead45c4f8fd..b125f28094b40d26a9beaa00df44d5ebc64afa1b 100644 --- a/templates/job/container/delivery.yml +++ b/templates/job/container/delivery.yml @@ -1,11 +1,12 @@ +--- # docs: # - https://docs.gitlab.com/ee/ci/docker/using_kaniko.html # - https://cloud.google.com/build/docs/kaniko-cache # # This job use kaniko with cache -# The image will always be tagged with the git and latest tag +# The image will always be tagged with the git and latest tag # in the destination registry(s). -# The image is delivered in the project container registry +# The image is delivered in the project container registry # but may additionally be delivered in a delivery registry # # variables: diff --git a/templates/job/container/lint.yml b/templates/job/container/lint.yml index 4074e0becac84efaa088ccccce9c11952582cc82..1ef423ce13847536560ca27b65b2d6ed9ef711a9 100644 --- a/templates/job/container/lint.yml +++ b/templates/job/container/lint.yml @@ -1,3 +1,4 @@ +--- # doc: https://github.com/hadolint/hadolint container:lint: extends: .base_tpl diff --git a/templates/job/container/security.yml b/templates/job/container/security.yml index 7e703443758ce82b69661f3841af120286853c5f..231deceb4ef832b53b9fa5e8fc83c5c46b538039 100644 --- a/templates/job/container/security.yml +++ b/templates/job/container/security.yml @@ -1,4 +1,5 @@ -# doc : +--- +# doc : # - https://github.com/aquasecurity/trivy#readme # - https://aquasecurity.github.io/trivy/v0.17.2/integrations/gitlab-ci/ # @@ -19,7 +20,7 @@ container:security: extends: .base_tpl stage: test - image: + image: name: aquasec/trivy:${TRIVY_VERSION} entrypoint: [""] variables: @@ -48,7 +49,7 @@ container:security: if [[ -n "${IMAGE_NAME}" ]]; then container_image_name="/${IMAGE_NAME}" else - container_image_name="" + container_image_name="" fi - |- # Tags container_tag="tmp-branch-${CI_COMMIT_REF_NAME//\//_}-$(echo ${CI_COMMIT_SHA} | cut -c1-8)" diff --git a/templates/job/info.yml b/templates/job/info.yml index 04cd2c715831c904f9f1168c3e76a4fd8289de19..03c43ced88f96b7250974f63acaa9ca9e0c3413c 100644 --- a/templates/job/info.yml +++ b/templates/job/info.yml @@ -1,3 +1,4 @@ +--- .info: stage: info variables: diff --git a/templates/job/java/build.yml b/templates/job/java/build.yml index d7ee6a85f7b9ea3051fbfa2c38ac1725a4f3f477..da6d1d586df70929aa9377804f1199a35bce7517 100644 --- a/templates/job/java/build.yml +++ b/templates/job/java/build.yml @@ -1,10 +1,11 @@ +--- # Build JAVA applications using Apache Maven (http://maven.apache.org) # For docker image tags see https://hub.docker.com/_/maven/ # For general lifecycle information see https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html # L'application java est construite et tout les fichier target/*.jar sont mis dans le cache pour les jobs suivants java:build: - extends: + extends: - .java - .java-cache-push stage: build diff --git a/templates/job/java/lint.yml b/templates/job/java/lint.yml index 7580d757028f73d4d66da55f286bd25e919ac71d..7a92281e33631afd32b8874391d381005ecf8c87 100644 --- a/templates/job/java/lint.yml +++ b/templates/job/java/lint.yml @@ -1,3 +1,4 @@ +--- # Build JAVA applications using Apache Maven (http://maven.apache.org) # For docker image tags see https://hub.docker.com/_/maven/ # diff --git a/templates/job/node/build.yml b/templates/job/node/build.yml index 01f83555224471137009b62b585de2f3785b592b..6e5e51a45eb422985fb595628103960a593ebfd5 100644 --- a/templates/job/node/build.yml +++ b/templates/job/node/build.yml @@ -1,3 +1,4 @@ +--- node:build: extends: - .base_node diff --git a/templates/job/node/lint.yml b/templates/job/node/lint.yml index cfe89e81981bad5e37f995e77bf77cf62ebe896d..c5802fae875bdaac8b3ef714f619239543bf5ea4 100644 --- a/templates/job/node/lint.yml +++ b/templates/job/node/lint.yml @@ -1,3 +1,4 @@ +--- node:lint: extends: .base_node stage: test diff --git a/templates/job/node/test.yml b/templates/job/node/test.yml index 03da2ffcac0258441f1835fb15d62000e37d486f..332a04d9f2d6fed947edc81bcd5aca28e4573a5d 100644 --- a/templates/job/node/test.yml +++ b/templates/job/node/test.yml @@ -1,3 +1,4 @@ +--- node:test: extends: .base_node stage: test diff --git a/templates/job/yaml/lint.yml b/templates/job/yaml/lint.yml index b1fc8702659c587631a541723d35de842c708d99..175759c4f580804d180ee09c05d903ccc472b916 100644 --- a/templates/job/yaml/lint.yml +++ b/templates/job/yaml/lint.yml @@ -1,9 +1,13 @@ -yaml-lint: +--- +include: + - '/templates/job/.base.yml' + +yamllint: extends: .base_tpl - image: vpgrp/linter:yaml + image: registry.gitlab.com/pipeline-components/yamllint:latest stage: lint script: | - find . -name "*.yml" | xargs -r yaml-lint + find . -type f \( -name "*.yml" -and ! -name "*vault*" \) | xargs -r yamllint for file in $files_to_lint; do - yaml-lint $file + yamllint $file done diff --git a/templates/stages.yml b/templates/stages.yml index 08681d38ec8d28d132c48d339918dff3de723056..755f84e3650e03b6cd5e32ccbdb768d9b13f9de7 100644 --- a/templates/stages.yml +++ b/templates/stages.yml @@ -1,3 +1,4 @@ +--- stages: - info - lint @@ -22,8 +23,6 @@ variables: CI_DEBUG_TRACE: "false" # true for activate CI debug tracing - - # /!\ removed soon /!\ .base_tpl: variables: @@ -71,7 +70,7 @@ variables: extends: - .base_tpl - .node-cache-pull - image: node:14.15.4-slim + image: node:14.15.4-slim # --------[ Java ]-------- .java-cache-push: @@ -151,7 +150,9 @@ variables: - |- # Proxy configuration if [[ "x${http_proxy}" != "x" -o "x${https_proxy}" != "x" ]]; then KANIKOCFG="${KANIKOCFG}, ${KANIKOPROXYCFG}" - KANIKOPROXYBUILDARGS="--build-arg http_proxy=${http_proxy} --build-arg https_proxy=${https_proxy} --build-arg no_proxy=${no_proxy}" + KANIKOPROXYBUILDARGS="--build-arg http_proxy=${http_proxy} \ + --build-arg https_proxy=${https_proxy} \ + --build-arg no_proxy=${no_proxy}" fi KANIKOCFG="{ ${KANIKOCFG} }" echo "${KANIKOCFG}" > /kaniko/.docker/config.json @@ -165,7 +166,7 @@ variables: if [[ -n "${IMAGE_NAME}" ]]; then container_image_name="/${IMAGE_NAME}" else - container_image_name="" + container_image_name="" fi - |- # Tags container_default_tag="tmp-branch-${CI_COMMIT_REF_NAME//\//_}-$(echo ${CI_COMMIT_SHA} | cut -c1-8)"