From 61810c579a87ccc4c4f4f44c0b373abf7f820db7 Mon Sep 17 00:00:00 2001 From: Ahmed Messaoud Date: Fri, 22 Mar 2024 14:04:22 -0700 Subject: [PATCH] MC E2E Distro Expansion (#654) --- .github/workflows/ci-report.yml | 10 ----- .../workflows/universalnrp-test-report.yml | 2 +- .github/workflows/universalnrp-test-run.yml | 4 +- .github/workflows/universalnrp-test.yml | 17 ++++++++- devops/e2e/cloudtest/debian-10.json | 2 +- devops/e2e/cloudtest/debian-11.json | 2 +- devops/e2e/cloudtest/debian-12.json | 37 +++++++++++++++++++ devops/e2e/cloudtest/mariner-2.json | 16 ++++++++ devops/e2e/cloudtest/oraclelinux-8.json | 22 +++++++++++ devops/e2e/cloudtest/rhel-8.json | 10 +++++ devops/e2e/cloudtest/rhel-9.json | 10 +++++ devops/e2e/cloudtest/rockylinux-9.json | 22 +++++++++++ devops/e2e/cloudtest/sles-15.json | 14 ++++++- 13 files changed, 151 insertions(+), 17 deletions(-) create mode 100644 devops/e2e/cloudtest/debian-12.json create mode 100644 devops/e2e/cloudtest/mariner-2.json create mode 100644 devops/e2e/cloudtest/oraclelinux-8.json create mode 100644 devops/e2e/cloudtest/rhel-8.json create mode 100644 devops/e2e/cloudtest/rhel-9.json create mode 100644 devops/e2e/cloudtest/rockylinux-9.json diff --git a/.github/workflows/ci-report.yml b/.github/workflows/ci-report.yml index c28b0eb0..451b96e8 100644 --- a/.github/workflows/ci-report.yml +++ b/.github/workflows/ci-report.yml @@ -21,13 +21,3 @@ jobs: name: CI report path: '*.xml' reporter: java-junit - - nrp-e2e-report: - runs-on: ubuntu-latest - steps: - - uses: dorny/test-reporter@v1 - with: - artifact: universal-nrp-test - name: Universal NRP Test Report - path: '*.xml' - reporter: java-junit diff --git a/.github/workflows/universalnrp-test-report.yml b/.github/workflows/universalnrp-test-report.yml index 46509009..41cba94c 100644 --- a/.github/workflows/universalnrp-test-report.yml +++ b/.github/workflows/universalnrp-test-report.yml @@ -20,4 +20,4 @@ jobs: artifact: universal-nrp-test name: Universal NRP Test Report path: '*.xml' - reporter: dotnet-trx + reporter: java-junit \ No newline at end of file diff --git a/.github/workflows/universalnrp-test-run.yml b/.github/workflows/universalnrp-test-run.yml index 051a4ced..0a07c7b5 100644 --- a/.github/workflows/universalnrp-test-run.yml +++ b/.github/workflows/universalnrp-test-run.yml @@ -50,12 +50,12 @@ jobs: - name: Install OSConfig if: ${{ inputs.install-osconfig }} - working-directory: ${{ steps.download.outputs.download-path }}/build + working-directory: ${{ steps.download.outputs.download-path }} run: | if [ "${{ inputs.package-type }}" = "DEB" ]; then sudo dpkg -i $(ls *.deb) else - sudo yum install -y $(ls *.rpm) + sudo rpm -fi $(ls *.rpm) fi - name: Run Guest Configuration Test diff --git a/.github/workflows/universalnrp-test.yml b/.github/workflows/universalnrp-test.yml index 85df5bb7..1bbc009a 100644 --- a/.github/workflows/universalnrp-test.yml +++ b/.github/workflows/universalnrp-test.yml @@ -1,6 +1,9 @@ name: Universal NRP Test -on: [workflow_dispatch] +on: + workflow_dispatch: + schedule: + - cron: '0 20 * * *' # Every day at 12pm PST (UTC-8) jobs: test: @@ -11,11 +14,23 @@ jobs: matrix: target: [ + { os: centos, version: 8, package-type: RPM, tag: ''}, + { os: debian, version: 10, package-type: DEB, tag: ''}, + { os: debian, version: 11, package-type: DEB, tag: ''}, + { os: mariner, version: 2, package-type: RPM, tag: ''}, + { os: oraclelinux, version: 8, package-type: RPM, tag: ''}, + { os: rhel, version: 8, package-type: RPM, tag: ''}, + { os: rhel, version: 9, package-type: RPM, tag: ''}, + { os: rockylinux, version: 9, package-type: RPM, tag: ''}, + { os: sles, version: 15, package-type: RPM, tag: ''}, { os: ubuntu, version: 20.04, package-type: DEB, tag: ''}, + { os: ubuntu, version: 22.04, package-type: DEB, tag: ''}, ] arch: [amd64] + install-osconfig: [true, false] with: target: ${{ matrix.target.os }}-${{ matrix.target.version }} arch: ${{ matrix.arch }} package-type: ${{ matrix.target.package-type }} + install-osconfig: ${{ matrix.install-osconfig }} tag: ${{ matrix.target.tag }} \ No newline at end of file diff --git a/devops/e2e/cloudtest/debian-10.json b/devops/e2e/cloudtest/debian-10.json index 43f0371b..7b78a9fd 100644 --- a/devops/e2e/cloudtest/debian-10.json +++ b/devops/e2e/cloudtest/debian-10.json @@ -33,7 +33,7 @@ { "name": "linux-install-packages", "parameters": { - "packages": "dotnet-sdk-6.0 jq" + "packages": "dotnet-sdk-6.0 jq powershell omi" } }, { diff --git a/devops/e2e/cloudtest/debian-11.json b/devops/e2e/cloudtest/debian-11.json index 366ac178..80ef3251 100644 --- a/devops/e2e/cloudtest/debian-11.json +++ b/devops/e2e/cloudtest/debian-11.json @@ -33,7 +33,7 @@ { "name": "linux-install-packages", "parameters": { - "packages": "dotnet-sdk-6.0 jq" + "packages": "dotnet-sdk-6.0 jq powershell omi" } }, { diff --git a/devops/e2e/cloudtest/debian-12.json b/devops/e2e/cloudtest/debian-12.json new file mode 100644 index 00000000..54e65e9f --- /dev/null +++ b/devops/e2e/cloudtest/debian-12.json @@ -0,0 +1,37 @@ +{ + "artifacts": [ + { + "name": "linux-install-packages", + "parameters": { + "packages": "software-properties-common gnupg2" + } + }, + { + "name": "linux-add-key", + "parameters": { + "key": "https://packages.microsoft.com/keys/microsoft.asc" + } + }, + { + "name": "linux-add-repository", + "parameters": { + "repository": "https://packages.microsoft.com/debian/12/prod" + } + }, + { + "name": "linux-install-packages", + "parameters": { + "packages": "dotnet-sdk-6.0 jq omi" + } + }, + { + "name": "linux-azcli" + }, + { + "name": "linux-bash-command", + "parameters": { + "command": "wget https://github.com/PowerShell/PowerShell/releases/download/v7.4.1/powershell_7.4.1-1.deb_amd64.deb -O powershell.deb && sudo dpkg -i powershell.deb && sudo apt-get install -f" + } + } + ] +} \ No newline at end of file diff --git a/devops/e2e/cloudtest/mariner-2.json b/devops/e2e/cloudtest/mariner-2.json new file mode 100644 index 00000000..b1a69d6a --- /dev/null +++ b/devops/e2e/cloudtest/mariner-2.json @@ -0,0 +1,16 @@ +{ + "artifacts": [ + { + "name": "linux-bash-command", + "parameters": { + "command": "sudo tdnf -y install dotnet-sdk-8.0 powershell" + } + }, + { + "name": "linux-bash-command", + "parameters": { + "command": "wget https://github.com/microsoft/omi/releases/download/v1.8.1-0/omi-1.8.1-0.ssl_110.ulinux.s.x64.rpm -O omi.rpm && sudo tdnf install -y omi.rpm" + } + } + ] +} \ No newline at end of file diff --git a/devops/e2e/cloudtest/oraclelinux-8.json b/devops/e2e/cloudtest/oraclelinux-8.json new file mode 100644 index 00000000..fe3a21bb --- /dev/null +++ b/devops/e2e/cloudtest/oraclelinux-8.json @@ -0,0 +1,22 @@ +{ + "artifacts": [ + { + "name": "linux-bash-command", + "parameters": { + "command": "sudo yum install -y glibc* libicu wget which" + } + }, + { + "name": "linux-bash-command", + "parameters": { + "command": "wget https://github.com/microsoft/omi/releases/download/v1.8.1-0/omi-1.8.1-0.ssl_110.ulinux.s.x64.rpm -O omi.rpm && rpm -fi omi.rpm" + } + }, + { + "name": "linux-bash-command", + "parameters": { + "command": "wget https://github.com/PowerShell/PowerShell/releases/download/v7.4.1/powershell-7.4.1-1.rh.x86_64.rpm -O powershell.rpm && rpm -fi powershell.rpm --nodeps" + } + } + ] +} \ No newline at end of file diff --git a/devops/e2e/cloudtest/rhel-8.json b/devops/e2e/cloudtest/rhel-8.json new file mode 100644 index 00000000..d2757398 --- /dev/null +++ b/devops/e2e/cloudtest/rhel-8.json @@ -0,0 +1,10 @@ +{ + "artifacts": [ + { + "name": "linux-bash-command", + "parameters": { + "command": "sudo yum install -y yum-utils && yum-config-manager --add-repo https://packages.microsoft.com/yumrepos/microsoft-rhel8.0-prod/ && sudo yum install -y powershell omi" + } + } + ] +} \ No newline at end of file diff --git a/devops/e2e/cloudtest/rhel-9.json b/devops/e2e/cloudtest/rhel-9.json new file mode 100644 index 00000000..6e9b7705 --- /dev/null +++ b/devops/e2e/cloudtest/rhel-9.json @@ -0,0 +1,10 @@ +{ + "artifacts": [ + { + "name": "linux-bash-command", + "parameters": { + "command": "sudo yum install -y yum-utils && yum-config-manager --add-repo https://packages.microsoft.com/yumrepos/microsoft-rhel9.0-prod/ && sudo yum install -y powershell omi" + } + } + ] +} \ No newline at end of file diff --git a/devops/e2e/cloudtest/rockylinux-9.json b/devops/e2e/cloudtest/rockylinux-9.json new file mode 100644 index 00000000..d4389cfa --- /dev/null +++ b/devops/e2e/cloudtest/rockylinux-9.json @@ -0,0 +1,22 @@ +{ + "artifacts": [ + { + "name": "linux-bash-command", + "parameters": { + "command": "sudo yum install -y glibc* libicu wget which" + } + }, + { + "name": "linux-bash-command", + "parameters": { + "command": "wget https://github.com/microsoft/omi/releases/download/v1.8.1-0/omi-1.8.1-0.ssl_300.ulinux.s.x64.rpm -O omi.rpm && rpm -fi omi.rpm" + } + }, + { + "name": "linux-bash-command", + "parameters": { + "command": "wget https://github.com/PowerShell/PowerShell/releases/download/v7.4.1/powershell-7.4.1-1.rh.x86_64.rpm -O powershell.rpm && rpm -fi powershell.rpm --nodeps" + } + } + ] +} \ No newline at end of file diff --git a/devops/e2e/cloudtest/sles-15.json b/devops/e2e/cloudtest/sles-15.json index e70e6a31..4e28eabb 100644 --- a/devops/e2e/cloudtest/sles-15.json +++ b/devops/e2e/cloudtest/sles-15.json @@ -3,7 +3,19 @@ { "name": "linux-bash-command", "parameters": { - "command": "sudo zypper install -y glibc*" + "command": "sudo zypper ar -f https://packages.microsoft.com/yumrepos/microsoft-sles15-prod/config.repo" + } + }, + { + "name": "linux-bash-command", + "parameters": { + "command": "wget https://github.com/microsoft/omi/releases/download/v1.8.1-0/omi-1.8.1-0.ssl_110.ulinux.s.x64.rpm -O omi.rpm && rpm -fi omi.rpm" + } + }, + { + "name": "linux-bash-command", + "parameters": { + "command": "wget https://github.com/PowerShell/PowerShell/releases/download/v7.4.1/powershell-7.4.1-1.rh.x86_64.rpm -O powershell.rpm && rpm -fi powershell.rpm --nodeps" } } ]