Skip to content

Commit

Permalink
More windows fixes (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
bmeike authored Nov 4, 2024
1 parent 0918e17 commit f510465
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 20 deletions.
20 changes: 10 additions & 10 deletions jenkins/pipelines/java/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pipeline {
stage('OSX Tests') {
agent { label 'mob-e2e-mac-01' }
options {
timeout(time: 45, unit: 'MINUTES')
// timeout(time: 60, unit: 'MINUTES')
lock("mob-e2e-mac-01")
}
stages {
Expand All @@ -52,22 +52,22 @@ pipeline {
stage('Windows Tests') {
agent { label 'mob-e2e-win-01' }
options {
timeout(time: 45, unit: 'MINUTES')
// timeout(time: 60, unit: 'MINUTES')
lock("mob-e2e-win-01")
}
stages {
stage('Windows Desktop Tests') {
steps {
echo "Run Windows Java Desktop Tests"
pwsh """
jenkins/pipelines/java/desktop/win_tests.ps1 "${params.CBL_VERSION}" "${params.CBL_BUILD}" "${params.SGW_URL}"
jenkins\pipelines\java/desktop\win_tests.ps1 "${params.CBL_VERSION}" "${params.CBL_BUILD}" "${params.SGW_URL}"
"""
}
post {
always {
echo "Teardown Windows Java Desktop Tests"
pwsh '''
jenkins/pipelines/java/desktop/win_teardown.ps1
jenkins\pipelines\java/desktop\win_teardown.ps1
'''
}
}
Expand All @@ -77,7 +77,7 @@ pipeline {
stage('Linux Tests') {
agent { label 'mob-e2e-deb-02' }
options {
timeout(time: 45, unit: 'MINUTES')
// timeout(time: 60, unit: 'MINUTES')
lock("mob-e2e-deb-02")
}
stages {
Expand Down Expand Up @@ -106,7 +106,7 @@ pipeline {
stage('OSX Tests') {
agent { label 'mob-e2e-mac-01' }
options {
timeout(time: 60, unit: 'MINUTES')
// timeout(time: 120, unit: 'MINUTES')
lock("mob-e2e-mac-01")
}
stages {
Expand All @@ -131,22 +131,22 @@ pipeline {
stage('Windows Tests') {
agent { label 'mob-e2e-win-01' }
options {
timeout(time: 60, unit: 'MINUTES')
// timeout(time: 120, unit: 'MINUTES')
lock("mob-e2e-win-01")
}
stages {
stage('Windows Web Services Tests') {
steps {
echo "Run Windows Java Web Services Tests"
pwsh """
jenkins/pipelines/java/webservice/win_tests.ps1 "${params.CBL_VERSION}" "${params.CBL_BUILD}" "${params.SGW_URL}"
jenkins\pipelines\java\webservice\win_tests.ps1 "${params.CBL_VERSION}" "${params.CBL_BUILD}" "${params.SGW_URL}"
"""
}
post {
always {
echo "Teardown Windows Web Services Tests"
pwsh '''
jenkins/pipelines/java/webservice/win_teardown.ps1
jenkins\pipelines\java\webservice\win_teardown.ps1
'''
}
}
Expand All @@ -156,7 +156,7 @@ pipeline {
stage('Linux Tests') {
agent { label 'mob-e2e-deb-02' }
options {
timeout(time: 60, unit: 'MINUTES')
// timeout(time: 120, unit: 'MINUTES')
lock("mob-e2e-deb-02")
}
stages {
Expand Down
6 changes: 2 additions & 4 deletions jenkins/pipelines/java/desktop/win_teardown.ps1
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
#!/bin/bash
# Clean up after running Java Web Services tests

echo "Shutdown Test Server"
Write-Host "Shutdown Test Server"
Push-Location servers\jak\desktop
if (Test-Path -Path .\server.pid){
$serverId = Get-Content .\server.pid
Stop-Process -Id $serverId
}
Pop-Location

echo "Shutdown Environment"
Write-Host "Shutdown Environment"
Push-Location environment
& docker compose down

2 changes: 1 addition & 1 deletion jenkins/pipelines/java/desktop/win_tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Get-Content config_java_desktop.json
Write-Host "Running tests on desktop test server at $serverUrl"
& python3.10 -m venv venv
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process -Force
./venv/Scripts/activate.ps1
.\venv\Scripts\activate.ps1
pip install -r requirements.txt

Write-Host "Run tests"
Expand Down
6 changes: 2 additions & 4 deletions jenkins/pipelines/java/webservice/win_teardown.ps1
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
#!/bin/bash
# Clean up after running Java Web Services tests

echo "Shutdown Test Server"
Write-Host "Shutdown Test Server"
Push-Location servers\jak\desktop
& .\gradlew.bat --no-daemon appStop
Remove-Item app\server.url
Pop-Location

echo "Shutdown Environment"
Write-Host "Shutdown Environment"
Push-Location environment
& docker compose down

2 changes: 1 addition & 1 deletion jenkins/pipelines/java/webservice/win_tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Get-Content config_java_webservice.json
Write-Host "Running tests on desktop test server at $SERVER_URL"
& python3.10 -m venv venv
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process -Force
./venv/Scripts/activate.ps1
.\venv\Scripts\activate.ps1
pip install -r requirements.txt

Write-Host "Run tests"
Expand Down

0 comments on commit f510465

Please sign in to comment.