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 committed Dec 11, 2024
1 parent 4e1502f commit a936ed7
Show file tree
Hide file tree
Showing 16 changed files with 110 additions and 875 deletions.
58 changes: 30 additions & 28 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 Expand Up @@ -68,7 +70,7 @@ jobs:
- name: Upload Terraform State File as Artifact
uses: actions/[email protected]
with:
name: ${{ github.run_id }}-terraform.tfstate
name: ${{ github.run_id }}-centos7-terraform.tfstate
path: "${{ github.workspace }}/.github/workflows/openstack/centos-7"

- name: Terraform Output File Create
Expand All @@ -83,7 +85,7 @@ jobs:
- name: Upload VM Output
uses: actions/[email protected]
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-centos7-vm_ip
path: ${{ github.workspace }}/${{ github.run_id }}-vm_ip
overwrite: true

Expand All @@ -96,7 +98,7 @@ jobs:
- name: Download VM IP
uses: actions/[email protected]
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-centos7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand Down Expand Up @@ -149,7 +151,7 @@ jobs:
- name: Download VM IP
uses: actions/[email protected]
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-centos7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand Down Expand Up @@ -184,7 +186,7 @@ jobs:
- name: Download VM IP
uses: actions/[email protected]
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-centos7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand Down Expand Up @@ -226,7 +228,7 @@ jobs:
- name: Download VM IP
uses: actions/[email protected]
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-centos7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand All @@ -253,7 +255,7 @@ jobs:
- name: Download VM IP
uses: actions/[email protected]
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-centos7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand Down Expand Up @@ -291,7 +293,7 @@ jobs:
- name: Download VM IP
uses: actions/[email protected]
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-centos7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand All @@ -318,7 +320,7 @@ jobs:
- name: Download VM IP
uses: actions/[email protected]
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-centos7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand Down Expand Up @@ -356,7 +358,7 @@ jobs:
- name: Download VM IP
uses: actions/[email protected]
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-centos7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand All @@ -383,7 +385,7 @@ jobs:
- name: Download VM IP
uses: actions/[email protected]
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-centos7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand Down Expand Up @@ -420,7 +422,7 @@ jobs:
- name: Download VM IP
uses: actions/[email protected]
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-centos7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand All @@ -447,7 +449,7 @@ jobs:
- name: Download VM IP
uses: actions/[email protected]
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-centos7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand Down Expand Up @@ -484,7 +486,7 @@ jobs:
- name: Download VM IP
uses: actions/[email protected]
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-centos7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand All @@ -511,7 +513,7 @@ jobs:
- name: Download VM IP
uses: actions/[email protected]
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-centos7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand Down Expand Up @@ -548,7 +550,7 @@ jobs:
- name: Download VM IP
uses: actions/[email protected]
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-centos7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand All @@ -575,7 +577,7 @@ jobs:
- name: Download VM IP
uses: actions/[email protected]
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-centos7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand Down Expand Up @@ -612,7 +614,7 @@ jobs:
- name: Download Terraform State
uses: actions/[email protected]
with:
name: ${{ github.run_id }}-terraform.tfstate
name: ${{ github.run_id }}-centos7-terraform.tfstate
path: "${{ github.workspace }}/.github/workflows/openstack/centos-7/terraform"


Expand Down
Loading

0 comments on commit a936ed7

Please sign in to comment.