Skip to content

Commit

Permalink
Add the u20->u22 openstack workflow
Browse files Browse the repository at this point in the history
Case RE-1027: Add the u20->u22 openstack workflow

Changelog:
  • Loading branch information
davelcpanelnet committed Dec 8, 2024
1 parent d2c0421 commit 7e952d2
Show file tree
Hide file tree
Showing 9 changed files with 875 additions and 38 deletions.
36 changes: 18 additions & 18 deletions .github/workflows/openstack-centos-7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
- name: Upload Terraform State File as Artifact
uses: actions/upload-artifact@v4.4.3
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 +83,7 @@ jobs:
- name: Upload VM Output
uses: actions/upload-artifact@v4.4.3
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 +96,7 @@ jobs:
- name: Download VM IP
uses: actions/download-artifact@v4.1.8
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 +149,7 @@ jobs:
- name: Download VM IP
uses: actions/download-artifact@v4.1.8
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 +184,7 @@ jobs:
- name: Download VM IP
uses: actions/download-artifact@v4.1.8
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 +226,7 @@ jobs:
- name: Download VM IP
uses: actions/download-artifact@v4.1.8
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 +253,7 @@ jobs:
- name: Download VM IP
uses: actions/download-artifact@v4.1.8
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 +291,7 @@ jobs:
- name: Download VM IP
uses: actions/download-artifact@v4.1.8
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 +318,7 @@ jobs:
- name: Download VM IP
uses: actions/download-artifact@v4.1.8
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 +356,7 @@ jobs:
- name: Download VM IP
uses: actions/download-artifact@v4.1.8
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 +383,7 @@ jobs:
- name: Download VM IP
uses: actions/download-artifact@v4.1.8
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 +420,7 @@ jobs:
- name: Download VM IP
uses: actions/download-artifact@v4.1.8
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 +447,7 @@ jobs:
- name: Download VM IP
uses: actions/download-artifact@v4.1.8
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 +484,7 @@ jobs:
- name: Download VM IP
uses: actions/download-artifact@v4.1.8
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 +511,7 @@ jobs:
- name: Download VM IP
uses: actions/download-artifact@v4.1.8
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 +548,7 @@ jobs:
- name: Download VM IP
uses: actions/download-artifact@v4.1.8
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 +575,7 @@ jobs:
- name: Download VM IP
uses: actions/download-artifact@v4.1.8
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 +612,7 @@ jobs:
- name: Download Terraform State
uses: actions/download-artifact@v4.1.8
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
80 changes: 61 additions & 19 deletions .github/workflows/openstack-cloudlinux-7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
- name: Upload Terraform State File as Artifact
uses: actions/upload-artifact@v4.4.3
with:
name: ${{ github.run_id }}-terraform.tfstate
name: ${{ github.run_id }}-cloudlinux7-terraform.tfstate
path: "${{ github.workspace }}/.github/workflows/openstack/cloudlinux-7"

- name: Terraform Output File Create
Expand All @@ -83,7 +83,7 @@ jobs:
- name: Upload VM Output
uses: actions/upload-artifact@v4.4.3
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-cloudlinux7-vm_ip
path: ${{ github.workspace }}/${{ github.run_id }}-vm_ip
overwrite: true

Expand All @@ -96,7 +96,7 @@ jobs:
- name: Download VM IP
uses: actions/download-artifact@v4.1.8
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-cloudlinux7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand Down Expand Up @@ -149,7 +149,7 @@ jobs:
- name: Download VM IP
uses: actions/download-artifact@v4.1.8
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-cloudlinux7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand All @@ -175,7 +175,7 @@ jobs:
chmod -v +x /opt/${REPODIR}/t/integration/setup
/opt/${REPODIR}/t/integration/setup
start_elevate:
prep_elevate:
runs-on: self-hosted
needs: setup_integration_checks
outputs:
Expand All @@ -184,7 +184,49 @@ jobs:
- name: Download VM IP
uses: actions/download-artifact@v4.1.8
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-cloudlinux7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
id: VM_IP
run: |
echo "VM_IP=$(cat ${{ github.run_id }}-vm_ip)" >> "$GITHUB_OUTPUT"
cat ${{ github.run_id }}-vm_ip > VM_IP
- name: Export VM_IP to env
env:
VM_IP: ${{ steps.VM_IP.outputs.VM_IP }}
run: echo "VM_IP is ${{ steps.VM_IP.outputs.VM_IP }}"

- name: Prepare Ubuntu VM for ELevate Run
uses: appleboy/ssh-action@v1.1.0
with:
host: ${{ steps.VM_IP.outputs.VM_IP }}
username: 'root'
key: ${{ secrets.SSH_PRIVATE_KEY }}
port: '22'
timeout: 30m
command_timeout: 30m
script: |
REPODIR=$(echo ${{ github.repository }} | cut -d / -f2)
cp -pv /opt/${REPODIR}/elevate-cpanel /scripts/elevate-cpanel
cp -pv /opt/${REPODIR}/.github/workflows/openstack/status_marker /scripts/status_marker
cp -pv /opt/${REPODIR}/.github/workflows/openstack/reboot_watch /scripts/reboot_watch
/usr/local/cpanel/scripts/post_snapshot --yes
while pgrep -x post_snapshot > /dev/null; do echo "Sleeping until post_snapshot is no longer running as it may be locking apt."; sleep 1; done
/scripts/restartsrv_mysql
chmod -v +x /scripts/elevate-cpanel
start_elevate:
runs-on: self-hosted
needs: prep_elevate
outputs:
VM_IP: ${{ steps.VM_IP.outputs.VM_IP }}
steps:
- name: Download VM IP
uses: actions/download-artifact@v4.1.8
with:
name: ${{ github.run_id }}-cloudlinux7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand Down Expand Up @@ -251,7 +293,7 @@ jobs:
- name: Download VM IP
uses: actions/download-artifact@v4.1.8
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-cloudlinux7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand All @@ -278,7 +320,7 @@ jobs:
- name: Download VM IP
uses: actions/download-artifact@v4.1.8
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-cloudlinux7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand Down Expand Up @@ -316,7 +358,7 @@ jobs:
- name: Download VM IP
uses: actions/download-artifact@v4.1.8
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-cloudlinux7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand All @@ -343,7 +385,7 @@ jobs:
- name: Download VM IP
uses: actions/download-artifact@v4.1.8
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-cloudlinux7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand Down Expand Up @@ -381,7 +423,7 @@ jobs:
- name: Download VM IP
uses: actions/download-artifact@v4.1.8
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-cloudlinux7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand All @@ -408,7 +450,7 @@ jobs:
- name: Download VM IP
uses: actions/download-artifact@v4.1.8
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-cloudlinux7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand Down Expand Up @@ -445,7 +487,7 @@ jobs:
- name: Download VM IP
uses: actions/download-artifact@v4.1.8
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-cloudlinux7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand All @@ -472,7 +514,7 @@ jobs:
- name: Download VM IP
uses: actions/download-artifact@v4.1.8
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-cloudlinux7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand Down Expand Up @@ -509,7 +551,7 @@ jobs:
- name: Download VM IP
uses: actions/download-artifact@v4.1.8
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-cloudlinux7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand All @@ -536,7 +578,7 @@ jobs:
- name: Download VM IP
uses: actions/download-artifact@v4.1.8
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-cloudlinux7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand Down Expand Up @@ -573,7 +615,7 @@ jobs:
- name: Download VM IP
uses: actions/download-artifact@v4.1.8
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-cloudlinux7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand All @@ -600,7 +642,7 @@ jobs:
- name: Download VM IP
uses: actions/download-artifact@v4.1.8
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-cloudlinux7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand Down Expand Up @@ -637,7 +679,7 @@ jobs:
- name: Download Terraform State
uses: actions/download-artifact@v4.1.8
with:
name: ${{ github.run_id }}-terraform.tfstate
name: ${{ github.run_id }}-cloudlinux7-terraform.tfstate
path: "${{ github.workspace }}/.github/workflows/openstack/cloudlinux-7/terraform"

- name: Stage Files & Show Artifact Paths
Expand Down
Loading

0 comments on commit 7e952d2

Please sign in to comment.