ci(build): build job must occur on dev and master branch for test results

!55
This commit is contained in:
2024-03-30 05:20:55 +09:30
parent 98a9e6dcdf
commit 0ccb121955
2 changed files with 47 additions and 12 deletions

View File

@ -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 <helpdesk@nofusscomputing.com>'"
# 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

View File

@ -129,24 +129,25 @@
allow_failure: true
when: on_success
- if: "$CI_COMMIT_AUTHOR =='nfc_bot <helpdesk@nofusscomputing.com>'"
when: never
# Needs to run, even by bot as the test results need to be available
# - if: "$CI_COMMIT_AUTHOR =='nfc_bot <helpdesk@nofusscomputing.com>'"
# 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