Skip to content

Commit

Permalink
Reorganize workflows so that they are all dependent on the same tests…
Browse files Browse the repository at this point in the history
…uite passing

Case RE-1026: Testsuit.yml as parent to OpenStack workflows.

Changelog:
  • Loading branch information
davelcpanelnet authored and Travis Holloway committed Dec 11, 2024
1 parent c23818c commit c9c15d7
Show file tree
Hide file tree
Showing 15 changed files with 73 additions and 838 deletions.
22 changes: 12 additions & 10 deletions .github/workflows/openstack-centos-7.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
name: "Test Run: centos-7"

on:
push:
branches:
- "main"
- '!docs'
tags-ignore:
- "*"
pull_request:
workflow_dispatch:
inputs:
message:
description: 'Build description CentOS 7'

workflow_run:
workflows: ["TestSuite"]
types:
- completed

workflow_call:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-openstack-centos-7
Expand All @@ -17,6 +20,8 @@ concurrency:
env:
TF_VAR_application_credential_id: ${{ secrets.OS_APPLICATION_CREDENTIAL_ID }}
TF_VAR_application_credential_secret: ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }}
TF_VAR_github_repository: ${{ github.repository }}
TF_VAR_github_run_id: ${{ github.run_id }}
TF_VAR_ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}
TF_VAR_ssh_public_key: ${{ secrets.SSH_PUBLIC_KEY }}
TF_VAR_os_auth_region: ${{ secrets.OS_AUTH_REGION }}
Expand All @@ -32,10 +37,7 @@ env:
tf_working_directory: "${{ github.workspace }}/.github/workflows/openstack/centos-7"

jobs:
testsuite:
uses: ./.github/workflows/testsuite.yml
terraform_openstack_create:
needs: [testsuite]
runs-on: self-hosted
defaults:
run:
Expand Down
23 changes: 13 additions & 10 deletions .github/workflows/openstack-cloudlinux-7.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
name: "Test Run: cloudlinux-7"

on:
push:
branches:
- "main"
- '!docs'
tags-ignore:
- "*"
pull_request:
workflow_dispatch:
inputs:
message:
description: 'Build description CloudLinux 7'

workflow_run:
workflows: ["TestSuite"]
types:
- completed

workflow_call:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-openstack-cloudlinux-7
Expand All @@ -17,6 +20,8 @@ concurrency:
env:
TF_VAR_application_credential_id: ${{ secrets.OS_APPLICATION_CREDENTIAL_ID }}
TF_VAR_application_credential_secret: ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }}
TF_VAR_github_repository: ${{ github.repository }}
TF_VAR_github_run_id: ${{ github.run_id }}
TF_VAR_ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}
TF_VAR_ssh_public_key: ${{ secrets.SSH_PUBLIC_KEY }}
TF_VAR_os_auth_region: ${{ secrets.OS_AUTH_REGION }}
Expand All @@ -32,10 +37,7 @@ env:
tf_working_directory: "${{ github.workspace }}/.github/workflows/openstack/cloudlinux-7"

jobs:
testsuite:
uses: ./.github/workflows/testsuite.yml
terraform_openstack_create:
needs: [testsuite]
runs-on: self-hosted
defaults:
run:
Expand All @@ -56,6 +58,7 @@ jobs:
- name: Terraform Plan
id: plan
run: |
env
terraform plan -no-color
- name: Terraform Apply
Expand Down
Loading

0 comments on commit c9c15d7

Please sign in to comment.