From 297a35f0097a251a3275a2ae27343a21145325e3 Mon Sep 17 00:00:00 2001 From: Alfredo Matas Date: Thu, 23 Apr 2020 20:36:35 +0200 Subject: [PATCH 1/4] GPII-4195: Add tests for each flavour of Windows 10 --- jenkins_jobs/gpii-app.yml | 37 +++++++++++++++++---- jenkins_jobs/windows.yml | 68 +++++++++++++++++++++++++++++++-------- 2 files changed, 85 insertions(+), 20 deletions(-) diff --git a/jenkins_jobs/gpii-app.yml b/jenkins_jobs/gpii-app.yml index 3427584..13219fd 100644 --- a/jenkins_jobs/gpii-app.yml +++ b/jenkins_jobs/gpii-app.yml @@ -14,7 +14,7 @@ wrappers: - timeout: # Abort after these many minutes - timeout: 120 + timeout: 180 # Mark the build as failed fail: true builders: @@ -34,10 +34,16 @@ - name: gpii-app-code-analysis predefined-parameters: parent_workspace=$WORKSPACE - multijob: - name: gpii-app-test + name: gpii-app-test-1909 condition: COMPLETED projects: - - name: gpii-app-test + - name: gpii-app-test-1909 + predefined-parameters: parent_workspace=$WORKSPACE + - multijob: + name: gpii-app-test-ltsc + condition: COMPLETED + projects: + - name: gpii-app-test-ltsc predefined-parameters: parent_workspace=$WORKSPACE - multijob: name: delete-gpii-app-vm @@ -73,7 +79,24 @@ node: h-0005.tor1.incd.ca workspace: $parent_workspace builders: - - shell: vagrant winrm -c "do.ps1 -c 'grunt lint'" + - shell: vagrant winrm LTSC -c "do.ps1 -c 'grunt lint'" + publishers: + - email: + recipients: ci@lists.gpii.net + wrappers: + - timeout: + # Abort after these many minutes + timeout: 60 + # Mark the build as failed + fail: true + +- job: + name: gpii-app-test-1909 + description: 'GPII-APP tests in the 1909 version of Windows 10' + node: h-0005.tor1.incd.ca + workspace: $parent_workspace + builders: + - shell: vagrant winrm 1909 -c "do.ps1 -c 'npm test'" publishers: - email: recipients: ci@lists.gpii.net @@ -85,12 +108,12 @@ fail: true - job: - name: gpii-app-test - description: 'GPII-APP tests' + name: gpii-app-test-ltsc + description: 'GPII-APP tests in LTSC Windows 10' node: h-0005.tor1.incd.ca workspace: $parent_workspace builders: - - shell: vagrant winrm -c "do.ps1 -c 'npm test'" + - shell: vagrant winrm LTSC -c "do.ps1 -c 'npm test'" publishers: - email: recipients: ci@lists.gpii.net diff --git a/jenkins_jobs/windows.yml b/jenkins_jobs/windows.yml index e947975..17cb220 100644 --- a/jenkins_jobs/windows.yml +++ b/jenkins_jobs/windows.yml @@ -2,7 +2,7 @@ name: windows-tests description: 'Main Jenkins job responsible for orchestrating tasks required to run GPII Windows tests' project-type: multijob - build_timeout: 120 + build_timeout: 180 node: h-0005.tor1.incd.ca properties: # Required by the GitHub PR builder plugin. @@ -15,7 +15,7 @@ wrappers: - timeout: # Abort after these many minutes - timeout: 120 + timeout: 180 # Mark the build as failed fail: true builders: @@ -35,16 +35,28 @@ - name: windows-code-analysis predefined-parameters: parent_workspace=$WORKSPACE - multijob: - name: windows-unit-tests + name: windows-unit-tests-1909 condition: COMPLETED projects: - - name: windows-unit-tests + - name: windows-unit-tests-1909 predefined-parameters: parent_workspace=$WORKSPACE - multijob: - name: windows-acceptance-tests + name: windows-acceptance-tests-1909 condition: COMPLETED projects: - - name: windows-acceptance-tests + - name: windows-acceptance-tests-1909 + predefined-parameters: parent_workspace=$WORKSPACE + - multijob: + name: windows-unit-tests-ltsc + condition: COMPLETED + projects: + - name: windows-unit-tests-ltsc + predefined-parameters: parent_workspace=$WORKSPACE + - multijob: + name: windows-acceptance-tests-ltsc + condition: COMPLETED + projects: + - name: windows-acceptance-tests-ltsc predefined-parameters: parent_workspace=$WORKSPACE - multijob: name: windows-delete-vm @@ -74,18 +86,48 @@ node: h-0005.tor1.incd.ca workspace: $parent_workspace builders: - - shell: vagrant winrm -c "do.ps1 -c 'grunt lint'" + - shell: vagrant winrm LTSC -c "do.ps1 -c 'grunt lint'" + publishers: + - email: + recipients: ci@lists.gpii.net + +- job: + name: windows-unit-tests-ltsc + description: 'GPII Windows unit tests in LTSC Windows 10' + node: h-0005.tor1.incd.ca + workspace: $parent_workspace + builders: + - shell: vagrant winrm LTSC -c "do.ps1 -c 'npm run test:unit'" publishers: - email: recipients: ci@lists.gpii.net + wrappers: + - timeout: + timeout: 90 + fail: true + +- job: + name: windows-acceptance-tests-ltsc + description: 'GPII Windows acceptance tests in LTSC Windows 10' + node: h-0005.tor1.incd.ca + workspace: $parent_workspace + builders: + - shell: vagrant winrm LTSC -c "do.ps1 -c 'npm run test:acceptance'" + publishers: + - email: + recipients: ci@lists.gpii.net + wrappers: + - timeout: + timeout: 90 + fail: true - job: - name: windows-unit-tests - description: 'GPII Windows unit tests' + name: windows-unit-tests-1909 + description: 'GPII Windows unit tests in 1909 version of Windows 10' node: h-0005.tor1.incd.ca workspace: $parent_workspace builders: - - shell: vagrant winrm -c "do.ps1 -c 'npm run test:unit'" + - shell: vagrant winrm 1909 -c "do.ps1 -c 'npm run test:unit'" publishers: - email: recipients: ci@lists.gpii.net @@ -95,12 +137,12 @@ fail: true - job: - name: windows-acceptance-tests - description: 'GPII Windows acceptance tests' + name: windows-acceptance-tests-1909 + description: 'GPII Windows acceptance tests in 1909 version of Windows 10' node: h-0005.tor1.incd.ca workspace: $parent_workspace builders: - - shell: vagrant winrm -c "do.ps1 -c 'npm run test:acceptance'" + - shell: vagrant winrm 1909 -c "do.ps1 -c 'npm run test:acceptance'" publishers: - email: recipients: ci@lists.gpii.net From 48e7eb640e7bfc7b2e925571200e460feaa53dbb Mon Sep 17 00:00:00 2001 From: Alfredo Matas Date: Mon, 4 May 2020 19:00:04 +0200 Subject: [PATCH 2/4] GPII-4195: Run unit and acceptance tests in parallel --- jenkins_jobs/gpii-app.yml | 4 ---- jenkins_jobs/windows.yml | 12 ++---------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/jenkins_jobs/gpii-app.yml b/jenkins_jobs/gpii-app.yml index 13219fd..b7ebb38 100644 --- a/jenkins_jobs/gpii-app.yml +++ b/jenkins_jobs/gpii-app.yml @@ -39,10 +39,6 @@ projects: - name: gpii-app-test-1909 predefined-parameters: parent_workspace=$WORKSPACE - - multijob: - name: gpii-app-test-ltsc - condition: COMPLETED - projects: - name: gpii-app-test-ltsc predefined-parameters: parent_workspace=$WORKSPACE - multijob: diff --git a/jenkins_jobs/windows.yml b/jenkins_jobs/windows.yml index 17cb220..ebeba86 100644 --- a/jenkins_jobs/windows.yml +++ b/jenkins_jobs/windows.yml @@ -40,22 +40,14 @@ projects: - name: windows-unit-tests-1909 predefined-parameters: parent_workspace=$WORKSPACE + - name: windows-unit-tests-ltsc + predefined-parameters: parent_workspace=$WORKSPACE - multijob: name: windows-acceptance-tests-1909 condition: COMPLETED projects: - name: windows-acceptance-tests-1909 predefined-parameters: parent_workspace=$WORKSPACE - - multijob: - name: windows-unit-tests-ltsc - condition: COMPLETED - projects: - - name: windows-unit-tests-ltsc - predefined-parameters: parent_workspace=$WORKSPACE - - multijob: - name: windows-acceptance-tests-ltsc - condition: COMPLETED - projects: - name: windows-acceptance-tests-ltsc predefined-parameters: parent_workspace=$WORKSPACE - multijob: From e81cb0407c28674695f81ad6996e4ede156fd8e5 Mon Sep 17 00:00:00 2001 From: Alfredo Matas Date: Wed, 6 May 2020 17:40:06 +0200 Subject: [PATCH 3/4] GPII-4195: Paralelize as much as possible --- jenkins_jobs/gpii-app.yml | 45 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 42 insertions(+), 3 deletions(-) diff --git a/jenkins_jobs/gpii-app.yml b/jenkins_jobs/gpii-app.yml index b7ebb38..50de5b4 100644 --- a/jenkins_jobs/gpii-app.yml +++ b/jenkins_jobs/gpii-app.yml @@ -27,6 +27,14 @@ projects: - name: create-gpii-app-vm predefined-parameters: parent_workspace=$WORKSPACE + - multijob: + name: provision-gpii-app-vm + condition: COMPLETED + projects: + - name: provision-gpii-app-vm-1909 + predefined-parameters: parent_workspace=$WORKSPACE + - name: provision-gpii-app-vm-LTSC + predefined-parameters: parent_workspace=$WORKSPACE - multijob: name: gpii-app-code-analysis condition: COMPLETED @@ -34,7 +42,7 @@ - name: gpii-app-code-analysis predefined-parameters: parent_workspace=$WORKSPACE - multijob: - name: gpii-app-test-1909 + name: gpii-app-test condition: COMPLETED projects: - name: gpii-app-test-1909 @@ -61,7 +69,39 @@ builders: # Setting BUILD_ID for vagrant to make sure Jenkins process tree killer doesn't kill the VM # before the next job is started - - shell: DISPLAY=:0 BUILD_ID=gpii-app vagrant up --provider virtualbox + - shell: DISPLAY=:0 BUILD_ID=gpii-app vagrant up --no-provision --provider virtualbox + wrappers: + - timeout: + # Abort after these many minutes + timeout: 60 + # Mark the build as failed + fail: true + +- job: + name: provision-gpii-app-vm-1909 + description: 'Job responsible for provisioning VM 1909' + node: h-0005.tor1.incd.ca + workspace: $parent_workspace + builders: + # Setting BUILD_ID for vagrant to make sure Jenkins process tree killer doesn't kill the VM + # before the next job is started + - shell: DISPLAY=:0 BUILD_ID=gpii-app vagrant provision 1909 --provider virtualbox + wrappers: + - timeout: + # Abort after these many minutes + timeout: 60 + # Mark the build as failed + fail: true + +- job: + name: provision-gpii-app-vm-LTSC + description: 'Job responsible for provisioning VM LTSC' + node: h-0005.tor1.incd.ca + workspace: $parent_workspace + builders: + # Setting BUILD_ID for vagrant to make sure Jenkins process tree killer doesn't kill the VM + # before the next job is started + - shell: DISPLAY=:0 BUILD_ID=gpii-app vagrant provision LTSC --provider virtualbox wrappers: - timeout: # Abort after these many minutes @@ -120,7 +160,6 @@ # Mark the build as failed fail: true - - job: name: delete-gpii-app-vm description: 'Job responsible for deleting the test VM' From e091c9aba8de303fafcb25d3c899c0d991478088 Mon Sep 17 00:00:00 2001 From: Alfredo Matas Date: Wed, 6 May 2020 17:51:10 +0200 Subject: [PATCH 4/4] GPII-4195: Paralelize provision step --- jenkins_jobs/windows.yml | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/jenkins_jobs/windows.yml b/jenkins_jobs/windows.yml index ebeba86..746275e 100644 --- a/jenkins_jobs/windows.yml +++ b/jenkins_jobs/windows.yml @@ -28,6 +28,14 @@ projects: - name: windows-create-vm predefined-parameters: parent_workspace=$WORKSPACE + - multijob: + name: windows-provision-vm + condition: COMPLETED + projects: + - name: windows-provision-1909 + predefined-parameters: parent_workspace=$WORKSPACE + - name: windows-provision-ltsc + predefined-parameters: parent_workspace=$WORKSPACE - multijob: name: windows-code-analysis condition: COMPLETED @@ -70,7 +78,29 @@ builders: # Setting BUILD_ID for vagrant to make sure Jenkins process tree killer doesn't kill the VM # before the next job is started - - shell: DISPLAY=:0 BUILD_ID=gpii-windows vagrant up --provider virtualbox + - shell: DISPLAY=:0 BUILD_ID=gpii-windows vagrant up --no-provision --provider virtualbox + +- job: + name: windows-provision-1909 + description: 'Job responsible for provisionin the VM 1909' + node: h-0005.tor1.incd.ca + workspace: $parent_workspace + builders: + - shell: vagrant provision 1909 + publishers: + - email: + recipients: ci@lists.gpii.net + +- job: + name: windows-provision-LTSC + description: 'Job responsible for provisionin the VM LTSC' + node: h-0005.tor1.incd.ca + workspace: $parent_workspace + builders: + - shell: vagrant provision LTSC + publishers: + - email: + recipients: ci@lists.gpii.net - job: name: windows-code-analysis