From 4a249e5b1d30566b45bfffaf9e5bf3e31ef89e1c Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Fri, 26 Jan 2024 19:13:30 +0100 Subject: [PATCH] collection/workflow: Fix workflow issues Solves issue #621 The workflows are now also watching a branch named "github-workflow-test". If such a branch exists, a workflow will be triggered if there is a change to a file of the role in this branch. Can be useful for testing. Signed-off-by: Bernd Finger --- .../ansible-lint-sap_general_preconfigure.yml | 20 +++++++++++------- .../ansible-lint-sap_ha_install_hana_hsr.yml | 20 +++++++++++------- .../ansible-lint-sap_ha_pacemaker_cluster.yml | 21 ++++++++++++------- .../ansible-lint-sap_hana_install.yml | 20 +++++++++++------- .../ansible-lint-sap_hana_preconfigure.yml | 19 +++++++++++------ ...-lint-sap_hypervisor_node_preconfigure.yml | 20 +++++++++++------- .../ansible-lint-sap_install_media_detect.yml | 19 +++++++++++------ .../ansible-lint-sap_maintain_etc_hosts.yml | 19 +++++++++++------ ...nsible-lint-sap_netweaver_preconfigure.yml | 20 +++++++++++------- .../ansible-lint-sap_storage_setup.yml | 20 +++++++++++------- .github/workflows/ansible-lint-sap_swpm.yml | 20 +++++++++++------- .../ansible-lint-sap_vm_preconfigure.yml | 20 +++++++++++------- 12 files changed, 156 insertions(+), 82 deletions(-) diff --git a/.github/workflows/ansible-lint-sap_general_preconfigure.yml b/.github/workflows/ansible-lint-sap_general_preconfigure.yml index ce57ff97e..b382e2a3b 100644 --- a/.github/workflows/ansible-lint-sap_general_preconfigure.yml +++ b/.github/workflows/ansible-lint-sap_general_preconfigure.yml @@ -1,6 +1,6 @@ --- -# Workflow for ansible-lint of a role +# Workflow for ansible-lint of a role, using reusable workflow name: ansible-lint of the role sap_general_preconfigure @@ -9,6 +9,7 @@ on: branches: - main - dev + - github-workflow-test paths: - 'roles/sap_general_preconfigure/**' pull_request: @@ -17,11 +18,16 @@ on: - dev paths: - 'roles/sap_general_preconfigure/**' + workflow_dispatch: + branches: + - main + - dev + - github-workflow-test + paths: + - 'roles/sap_general_preconfigure/**' jobs: - ansible-lint: - call-ansible-lint-with-role: - uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main - with: - role: sap_general_preconfigure - + ansible-lint-exec: + uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main + with: + role: sap_general_preconfigure diff --git a/.github/workflows/ansible-lint-sap_ha_install_hana_hsr.yml b/.github/workflows/ansible-lint-sap_ha_install_hana_hsr.yml index ffcd67e70..9186fb714 100644 --- a/.github/workflows/ansible-lint-sap_ha_install_hana_hsr.yml +++ b/.github/workflows/ansible-lint-sap_ha_install_hana_hsr.yml @@ -1,6 +1,6 @@ --- -# Workflow for ansible-lint of a role +# Workflow for ansible-lint of a role, using reusable workflow name: ansible-lint of the role sap_ha_install_hana_hsr @@ -9,6 +9,7 @@ on: branches: - main - dev + - github-workflow-test paths: - 'roles/sap_ha_install_hana_hsr/**' pull_request: @@ -17,11 +18,16 @@ on: - dev paths: - 'roles/sap_ha_install_hana_hsr/**' + workflow_dispatch: + branches: + - main + - dev + - github-workflow-test + paths: + - 'roles/sap_ha_install_hana_hsr/**' jobs: - ansible-lint: - call-ansible-lint-with-role: - uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main - with: - role: sap_ha_install_hana_hsr - + ansible-lint-exec: + uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main + with: + role: sap_ha_install_hana_hsr diff --git a/.github/workflows/ansible-lint-sap_ha_pacemaker_cluster.yml b/.github/workflows/ansible-lint-sap_ha_pacemaker_cluster.yml index 9b6b26386..0b25e1ee8 100644 --- a/.github/workflows/ansible-lint-sap_ha_pacemaker_cluster.yml +++ b/.github/workflows/ansible-lint-sap_ha_pacemaker_cluster.yml @@ -1,6 +1,6 @@ --- -# Workflow for ansible-lint of a role +# Workflow for ansible-lint of a role, using reusable workflow name: ansible-lint of the role sap_ha_pacemaker_cluster @@ -9,6 +9,7 @@ on: branches: - main - dev + - github-workflow-test paths: - 'roles/sap_ha_pacemaker_cluster/**' pull_request: @@ -17,12 +18,16 @@ on: - dev paths: - 'roles/sap_ha_pacemaker_cluster/**' + workflow_dispatch: + branches: + - main + - dev + - github-workflow-test + paths: + - 'roles/sap_ha_pacemaker_cluster/**' jobs: - ansible-lint: - call-ansible-lint-with-role: - uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main - with: - role: sap_ha_pacemaker_cluster - - + ansible-lint-exec: + uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main + with: + role: sap_ha_pacemaker_cluster diff --git a/.github/workflows/ansible-lint-sap_hana_install.yml b/.github/workflows/ansible-lint-sap_hana_install.yml index d883099f2..0a72e1f80 100644 --- a/.github/workflows/ansible-lint-sap_hana_install.yml +++ b/.github/workflows/ansible-lint-sap_hana_install.yml @@ -1,6 +1,6 @@ --- -# Workflow for ansible-lint of a role +# Workflow for ansible-lint of a role, using reusable workflow name: ansible-lint of the role sap_hana_install @@ -9,6 +9,7 @@ on: branches: - main - dev + - github-workflow-test paths: - 'roles/sap_hana_install/**' pull_request: @@ -17,11 +18,16 @@ on: - dev paths: - 'roles/sap_hana_install/**' + workflow_dispatch: + branches: + - main + - dev + - github-workflow-test + paths: + - 'roles/sap_hana_install/**' jobs: - ansible-lint: - call-ansible-lint-with-role: - uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main - with: - role: sap_hana_install - + ansible-lint-exec: + uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main + with: + role: sap_hana_install diff --git a/.github/workflows/ansible-lint-sap_hana_preconfigure.yml b/.github/workflows/ansible-lint-sap_hana_preconfigure.yml index a3935b807..bb72ca5ed 100644 --- a/.github/workflows/ansible-lint-sap_hana_preconfigure.yml +++ b/.github/workflows/ansible-lint-sap_hana_preconfigure.yml @@ -1,6 +1,6 @@ --- -# Workflow for ansible-lint of a role +# Workflow for ansible-lint of a role, using reusable workflow name: ansible-lint of the role sap_hana_preconfigure @@ -9,6 +9,7 @@ on: branches: - main - dev + - github-workflow-test paths: - 'roles/sap_hana_preconfigure/**' pull_request: @@ -17,10 +18,16 @@ on: - dev paths: - 'roles/sap_hana_preconfigure/**' + workflow_dispatch: + branches: + - main + - dev + - github-workflow-test + paths: + - 'roles/sap_hana_preconfigure/**' jobs: - ansible-lint: - call-ansible-lint-with-role: - uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main - with: - role: sap_hana_preconfigure + ansible-lint-exec: + uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main + with: + role: sap_hana_preconfigure diff --git a/.github/workflows/ansible-lint-sap_hypervisor_node_preconfigure.yml b/.github/workflows/ansible-lint-sap_hypervisor_node_preconfigure.yml index 5c2639d04..219a9fcf1 100644 --- a/.github/workflows/ansible-lint-sap_hypervisor_node_preconfigure.yml +++ b/.github/workflows/ansible-lint-sap_hypervisor_node_preconfigure.yml @@ -1,6 +1,6 @@ --- -# Workflow for ansible-lint of a role +# Workflow for ansible-lint of a role, using reusable workflow name: ansible-lint of the role sap_hypervisor_node_preconfigure @@ -9,6 +9,7 @@ on: branches: - main - dev + - github-workflow-test paths: - 'roles/sap_hypervisor_node_preconfigure/**' pull_request: @@ -17,11 +18,16 @@ on: - dev paths: - 'roles/sap_hypervisor_node_preconfigure/**' + workflow_dispatch: + branches: + - main + - dev + - github-workflow-test + paths: + - 'roles/sap_hypervisor_node_preconfigure/**' jobs: - ansible-lint: - call-ansible-lint-with-role: - uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main - with: - role: sap_hypervisor_node_preconfigure - + ansible-lint-exec: + uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main + with: + role: sap_hypervisor_node_preconfigure diff --git a/.github/workflows/ansible-lint-sap_install_media_detect.yml b/.github/workflows/ansible-lint-sap_install_media_detect.yml index 81d7304da..867b710bb 100644 --- a/.github/workflows/ansible-lint-sap_install_media_detect.yml +++ b/.github/workflows/ansible-lint-sap_install_media_detect.yml @@ -1,6 +1,6 @@ --- -# Workflow for ansible-lint of a role +# Workflow for ansible-lint of a role, using reusable workflow name: ansible-lint of the role sap_install_media_detect @@ -9,6 +9,7 @@ on: branches: - main - dev + - github-workflow-test paths: - 'roles/sap_install_media_detect/**' pull_request: @@ -17,10 +18,16 @@ on: - dev paths: - 'roles/sap_install_media_detect/**' + workflow_dispatch: + branches: + - main + - dev + - github-workflow-test + paths: + - 'roles/sap_install_media_detect/**' jobs: - ansible-lint: - call-ansible-lint-with-role: - uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main - with: - role: sap_install_media_detect + ansible-lint-exec: + uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main + with: + role: sap_install_media_detect diff --git a/.github/workflows/ansible-lint-sap_maintain_etc_hosts.yml b/.github/workflows/ansible-lint-sap_maintain_etc_hosts.yml index feb71f1c6..89e8d4824 100644 --- a/.github/workflows/ansible-lint-sap_maintain_etc_hosts.yml +++ b/.github/workflows/ansible-lint-sap_maintain_etc_hosts.yml @@ -1,6 +1,6 @@ --- -# Workflow for ansible-lint of a role +# Workflow for ansible-lint of a role, using reusable workflow name: ansible-lint of the role sap_maintain_etc_hosts @@ -9,6 +9,7 @@ on: branches: - main - dev + - github-workflow-test paths: - 'roles/sap_maintain_etc_hosts/**' pull_request: @@ -17,10 +18,16 @@ on: - dev paths: - 'roles/sap_maintain_etc_hosts/**' + workflow_dispatch: + branches: + - main + - dev + - github-workflow-test + paths: + - 'roles/sap_maintain_etc_hosts/**' jobs: - ansible-lint: - call-ansible-lint-with-role: - uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main - with: - role: sap_maintain_etc_hosts + ansible-lint-exec: + uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main + with: + role: sap_maintain_etc_hosts diff --git a/.github/workflows/ansible-lint-sap_netweaver_preconfigure.yml b/.github/workflows/ansible-lint-sap_netweaver_preconfigure.yml index 7926ffde4..751cf6402 100644 --- a/.github/workflows/ansible-lint-sap_netweaver_preconfigure.yml +++ b/.github/workflows/ansible-lint-sap_netweaver_preconfigure.yml @@ -1,6 +1,6 @@ --- -# Workflow for ansible-lint of a role +# Workflow for ansible-lint of a role, using reusable workflow name: ansible-lint of the role sap_netweaver_preconfigure @@ -9,6 +9,7 @@ on: branches: - main - dev + - github-workflow-test paths: - 'roles/sap_netweaver_preconfigure/**' pull_request: @@ -17,11 +18,16 @@ on: - dev paths: - 'roles/sap_netweaver_preconfigure/**' + workflow_dispatch: + branches: + - main + - dev + - github-workflow-test + paths: + - 'roles/sap_netweaver_preconfigure/**' jobs: - ansible-lint: - call-ansible-lint-with-role: - uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main - with: - role: sap_netweaver_preconfigure - + ansible-lint-exec: + uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main + with: + role: sap_netweaver_preconfigure diff --git a/.github/workflows/ansible-lint-sap_storage_setup.yml b/.github/workflows/ansible-lint-sap_storage_setup.yml index 8c68c3b35..c5ee19db5 100644 --- a/.github/workflows/ansible-lint-sap_storage_setup.yml +++ b/.github/workflows/ansible-lint-sap_storage_setup.yml @@ -1,6 +1,6 @@ --- -# Workflow for ansible-lint of a role +# Workflow for ansible-lint of a role, using reusable workflow name: ansible-lint of the role sap_storage_setup @@ -9,6 +9,7 @@ on: branches: - main - dev + - github-workflow-test paths: - 'roles/sap_storage_setup/**' pull_request: @@ -17,11 +18,16 @@ on: - dev paths: - 'roles/sap_storage_setup/**' + workflow_dispatch: + branches: + - main + - dev + - github-workflow-test + paths: + - 'roles/sap_storage_setup/**' jobs: - ansible-lint: - call-ansible-lint-with-role: - uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main - with: - role: sap_storage_setup - + ansible-lint-exec: + uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main + with: + role: sap_storage_setup diff --git a/.github/workflows/ansible-lint-sap_swpm.yml b/.github/workflows/ansible-lint-sap_swpm.yml index 50280cf29..98378c6a9 100644 --- a/.github/workflows/ansible-lint-sap_swpm.yml +++ b/.github/workflows/ansible-lint-sap_swpm.yml @@ -1,6 +1,6 @@ --- -# Workflow for ansible-lint of a role +# Workflow for ansible-lint of a role, using reusable workflow name: ansible-lint of the role sap_swpm @@ -9,6 +9,7 @@ on: branches: - main - dev + - github-workflow-test paths: - 'roles/sap_swpm/**' pull_request: @@ -17,11 +18,16 @@ on: - dev paths: - 'roles/sap_swpm/**' + workflow_dispatch: + branches: + - main + - dev + - github-workflow-test + paths: + - 'roles/sap_swpm/**' jobs: - ansible-lint: - call-ansible-lint-with-role: - uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main - with: - role: sap_swpm - + ansible-lint-exec: + uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main + with: + role: sap_swpm diff --git a/.github/workflows/ansible-lint-sap_vm_preconfigure.yml b/.github/workflows/ansible-lint-sap_vm_preconfigure.yml index 217cf6b9f..346012e2d 100644 --- a/.github/workflows/ansible-lint-sap_vm_preconfigure.yml +++ b/.github/workflows/ansible-lint-sap_vm_preconfigure.yml @@ -1,6 +1,6 @@ --- -# Workflow for ansible-lint of a role +# Workflow for ansible-lint of a role, using reusable workflow name: ansible-lint of the role sap_vm_preconfigure @@ -9,6 +9,7 @@ on: branches: - main - dev + - github-workflow-test paths: - 'roles/sap_vm_preconfigure/**' pull_request: @@ -17,11 +18,16 @@ on: - dev paths: - 'roles/sap_vm_preconfigure/**' + workflow_dispatch: + branches: + - main + - dev + - github-workflow-test + paths: + - 'roles/sap_vm_preconfigure/**' jobs: - ansible-lint: - call-ansible-lint-with-role: - uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main - with: - role: sap_vm_preconfigure - + ansible-lint-exec: + uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main + with: + role: sap_vm_preconfigure