From 6af454be4d2b658e0c362392ff502b3fb3da2cbf Mon Sep 17 00:00:00 2001 From: Jon Date: Thu, 8 Jun 2023 13:13:50 +0930 Subject: [PATCH] fix(ci): remove spaces from regex exists and changes !56 --- docker/build.gitlab-ci.yaml | 10 +++++----- docker/publish.gitlab-ci.yaml | 8 ++++---- lint/ansible.gitlab-ci.yaml | 10 +++++----- lint/markdown.gitlab-ci.yaml | 2 +- lint/yaml.gitlab-ci.yaml | 16 ++++++++-------- template/docker-image.gitlab-ci.yaml | 8 ++++---- 6 files changed, 27 insertions(+), 27 deletions(-) diff --git a/docker/build.gitlab-ci.yaml b/docker/build.gitlab-ci.yaml index 8072441..a85ea59 100644 --- a/docker/build.gitlab-ci.yaml +++ b/docker/build.gitlab-ci.yaml @@ -102,17 +102,17 @@ variables: $CI_COMMIT_BRANCH == "master" && $CI_PIPELINE_SOURCE == "push" exists: - - '{dockerfile, dockerfile.j2}' + - '{dockerfile,dockerfile.j2}' when: always - if: # condition_dev_branch_push $CI_COMMIT_BRANCH == "development" && $CI_PIPELINE_SOURCE == "push" exists: - - '{dockerfile, dockerfile.j2}' + - '{dockerfile,dockerfile.j2}' changes: paths: - - '{dockerfile, dockerfile.j2, includes/**}' + - '{dockerfile,dockerfile.j2,includes/**}' compare_to: 'master' when: always @@ -121,10 +121,10 @@ variables: $CI_COMMIT_BRANCH != "development" && $CI_PIPELINE_SOURCE == "push" exists: - - '{dockerfile, dockerfile.j2}' + - '{dockerfile,dockerfile.j2}' changes: paths: - - '{dockerfile, dockerfile.j2, includes/**}' + - '{dockerfile,dockerfile.j2,includes/**}' compare_to: 'development' when: always diff --git a/docker/publish.gitlab-ci.yaml b/docker/publish.gitlab-ci.yaml index ba6481b..e09426f 100644 --- a/docker/publish.gitlab-ci.yaml +++ b/docker/publish.gitlab-ci.yaml @@ -99,24 +99,24 @@ $CI_COMMIT_TAG != null && $CI_COMMIT_BRANCH == null exists: - - '{dockerfile, dockerfile.j2}' + - '{dockerfile,dockerfile.j2}' when: on_success - if: # condition_master_branch_push $CI_COMMIT_BRANCH == "master" && $CI_PIPELINE_SOURCE == "push" exists: - - '{dockerfile, dockerfile.j2}' + - '{dockerfile,dockerfile.j2}' when: on_success - if: # condition_dev_branch_push $CI_COMMIT_BRANCH == "development" && $CI_PIPELINE_SOURCE == "push" exists: - - '{dockerfile, dockerfile.j2}' + - '{dockerfile,dockerfile.j2}' changes: paths: - - '{dockerfile, dockerfile.j2, includes/**}' + - '{dockerfile,dockerfile.j2,includes/**}' compare_to: 'master' allow_failure: true when: on_success diff --git a/lint/ansible.gitlab-ci.yaml b/lint/ansible.gitlab-ci.yaml index 1f0681c..9c7720a 100644 --- a/lint/ansible.gitlab-ci.yaml +++ b/lint/ansible.gitlab-ci.yaml @@ -41,17 +41,17 @@ $CI_COMMIT_BRANCH == "master" && $CI_PIPELINE_SOURCE == "push" exists: - - '{defaults, handlers, inventory, meta, playbooks. tasks, defaults/**, handlers/**, inventory/**, meta/**, playbooks/**. tasks/**}/*.{yaml,yml}' + - "{defaults/**,handlers/**,inventory/**,meta/**,playbooks/**,tasks/**}/*.{yaml,yml}" when: always - if: # condition_dev_branch_push $CI_COMMIT_BRANCH == "development" && $CI_PIPELINE_SOURCE == "push" exists: - - '{defaults, handlers, inventory, meta, playbooks. tasks, defaults/**, handlers/**, inventory/**, meta/**, playbooks/**. tasks/**}/*.{yaml,yml}' + - "{defaults/**,handlers/**,inventory/**,meta/**,playbooks/**,tasks/**}/*.{yaml,yml}" changes: paths: - - '{defaults, handlers, inventory, meta, playbooks. tasks, defaults/**, handlers/**, inventory/**, meta/**, playbooks/**. tasks/**}/*.{yaml,yml}' + - "{defaults/**,handlers/**,inventory/**,meta/**,playbooks/**,tasks/**}/*.{yaml,yml}" compare_to: 'master' when: always @@ -60,10 +60,10 @@ $CI_COMMIT_BRANCH != "development" && $CI_PIPELINE_SOURCE == "push" exists: - - '{defaults, handlers, inventory, meta, playbooks. tasks, defaults/**, handlers/**, inventory/**, meta/**, playbooks/**. tasks/**}/*.{yaml,yml}' + - "{defaults/**,handlers/**,inventory/**,meta/**,playbooks/**,tasks/**}/*.{yaml,yml}" changes: paths: - - '{defaults, handlers, inventory, meta, playbooks. tasks, defaults/**, handlers/**, inventory/**, meta/**, playbooks/**. tasks/**}/*.{yaml,yml}' + - "{defaults/**,handlers/**,inventory/**,meta/**,playbooks/**,tasks/**}/*.{yaml,yml}" compare_to: 'development' when: always diff --git a/lint/markdown.gitlab-ci.yaml b/lint/markdown.gitlab-ci.yaml index 0837eb0..dc2cc79 100644 --- a/lint/markdown.gitlab-ci.yaml +++ b/lint/markdown.gitlab-ci.yaml @@ -39,7 +39,7 @@ exists: # - "**.md" # - "**/**.md" - - '{!docs/**,!pages/**,!gitlab-ci/**, !website-template/**, **}/*.md' + - '{!docs/**,!pages/**,!gitlab-ci/**,!website-template/**,**}/*.md' when: always - when: never diff --git a/lint/yaml.gitlab-ci.yaml b/lint/yaml.gitlab-ci.yaml index 26b9479..1f493cc 100644 --- a/lint/yaml.gitlab-ci.yaml +++ b/lint/yaml.gitlab-ci.yaml @@ -44,12 +44,12 @@ - if: '$CI_COMMIT_BRANCH && ( $CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "pipeline")' exists: - - '{!gitlab-ci/**/*, !website-template/**/*, !.gitlab-ci, !*gitlab-ci*, **/*, **}.{yml, yaml}' + - '{!gitlab-ci/**/*,!website-template/**/*,!.gitlab-ci,!*gitlab-ci*,**/*,**}.{yml,yaml}' # - ".gitlab-ci*" # - "**/*gitlab-ci*" changes: paths: - - '{!gitlab-ci/**/*, !website-template/**/*, !.gitlab-ci, !*gitlab-ci*, **/*, **}.{yml, yaml}' + - '{!gitlab-ci/**/*,!website-template/**/*,!.gitlab-ci,!*gitlab-ci*,**/*,**}.{yml,yaml}' compare_to: 'master' when: always @@ -59,7 +59,7 @@ .Gitlab_CI.Lint.YAML: variables: YAML_LINT_PATH: ".gitlab-ci* ./**/*gitlab-ci*" - YAML_LINT_EXTRA_ARGS: "{ extends: lint/.yamllint.yaml, ignore: [gitlab-ci/*, website-template/*] }" + YAML_LINT_EXTRA_ARGS: "{ extends: lint/.yamllint.yaml,ignore: [gitlab-ci/*,website-template/*] }" extends: - .yaml_lint_defaults rules: @@ -68,17 +68,17 @@ $CI_COMMIT_BRANCH == "master" && $CI_PIPELINE_SOURCE == "push" exists: - - '{*, **/**, **}/*gitlab-ci*' + - '{*,**/**,**}/*gitlab-ci*' when: always - if: # condition_dev_branch_push $CI_COMMIT_BRANCH == "development" && $CI_PIPELINE_SOURCE == "push" exists: - - '{*, **/**, **}/*gitlab-ci*' + - '{*,**/**,**}/*gitlab-ci*' changes: paths: - - '{*, **/**, **}/*gitlab-ci*' + - '{*,**/**,**}/*gitlab-ci*' compare_to: 'master' when: always @@ -87,10 +87,10 @@ $CI_COMMIT_BRANCH != "development" && $CI_PIPELINE_SOURCE == "push" exists: - - '{*, **/**, **}/*gitlab-ci*' + - '{*,**/**,**}/*gitlab-ci*' changes: paths: - - '{*, **/**, **}/*gitlab-ci*' + - '{*,**/**,**}/*gitlab-ci*' compare_to: 'development' when: always diff --git a/template/docker-image.gitlab-ci.yaml b/template/docker-image.gitlab-ci.yaml index 1c5f986..1452037 100644 --- a/template/docker-image.gitlab-ci.yaml +++ b/template/docker-image.gitlab-ci.yaml @@ -41,17 +41,17 @@ Docker.Hub.Branch.Publish: $CI_COMMIT_BRANCH == "master" && $CI_PIPELINE_SOURCE == "push" exists: - - '{dockerfile, dockerfile.j2}' + - '{dockerfile,dockerfile.j2}' when: always - if: # condition_dev_branch_push $CI_COMMIT_BRANCH == "development" && $CI_PIPELINE_SOURCE == "push" exists: - - '{dockerfile, dockerfile.j2}' + - '{dockerfile,dockerfile.j2}' changes: paths: - - '{dockerfile, dockerfile.j2, includes**/**}' + - '{dockerfile,dockerfile.j2,includes**/**}' compare_to: 'master' allow_failure: true when: manual @@ -68,7 +68,7 @@ Docker.Hub.Tag.Publish: $CI_COMMIT_TAG != null && $CI_COMMIT_BRANCH == null exists: - - '{dockerfile, dockerfile.j2}' + - '{dockerfile,dockerfile.j2}' when: always - when: never