From 0ccb1219558b348a4e092eb6b5f1a2f6c4189c4b Mon Sep 17 00:00:00 2001 From: Jon Date: Sat, 30 Mar 2024 05:20:55 +0930 Subject: [PATCH] ci(build): build job must occur on dev and master branch for test results !55 --- .gitlab-ci.yml | 34 ++++++++++++++++++++++++++ .gitlab/integration_test.gitlab-ci.yml | 25 ++++++++++--------- 2 files changed, 47 insertions(+), 12 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5f9ffb3..9e2084e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -22,6 +22,40 @@ include: - automation/.gitlab-ci-ansible.yaml +Build Collection: + extends: .ansible_collection_build + needs: + - job: Ansible Lint + optional: true + - job: Ansible Lint (galaxy.yml) + optional: true + + rules: + + - if: $CI_COMMIT_TAG + when: always + + # Needs to run, even by bot as the test results need to be available + # - if: "$CI_COMMIT_AUTHOR =='nfc_bot '" + # when: never + + - if: # Occur on merge + $CI_COMMIT_BRANCH + && + $CI_PIPELINE_SOURCE == "push" + when: always + + # - if: + # $CI_COMMIT_BRANCH != "development" + # && + # $CI_COMMIT_BRANCH != "master" + # && + # $CI_PIPELINE_SOURCE == "push" + # when: always + + - when: never + + Update Git Submodules: extends: .ansible_playbook_git_submodule diff --git a/.gitlab/integration_test.gitlab-ci.yml b/.gitlab/integration_test.gitlab-ci.yml index b3280df..3ed8634 100644 --- a/.gitlab/integration_test.gitlab-ci.yml +++ b/.gitlab/integration_test.gitlab-ci.yml @@ -129,24 +129,25 @@ allow_failure: true when: on_success - - if: "$CI_COMMIT_AUTHOR =='nfc_bot '" - when: never + # Needs to run, even by bot as the test results need to be available + # - if: "$CI_COMMIT_AUTHOR =='nfc_bot '" + # when: never - if: # Occur on merge - $CI_COMMIT_BRANCH == "development" + $CI_COMMIT_BRANCH && $CI_PIPELINE_SOURCE == "push" allow_failure: true - when: always + when: on_success - - if: - $CI_COMMIT_BRANCH != "development" - && - $CI_COMMIT_BRANCH != "master" - && - $CI_PIPELINE_SOURCE == "push" - allow_failure: true - when: always + # - if: + # $CI_COMMIT_BRANCH != "development" + # && + # $CI_COMMIT_BRANCH != "master" + # && + # $CI_PIPELINE_SOURCE == "push" + # allow_failure: true + # when: always - when: never