Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,20 @@ def parallelStages = [failFast: false]
}
}
} else {
stage('Build and Test') {
// ci.jenkins.io builds (e.g. no publication)
// ci.jenkins.io builds (e.g. no publication)
stage('Build') {
if (isUnix()) {
sh './build.sh'
} else {
powershell '& ./build.ps1 build'
archiveArtifacts artifacts: 'build-windows_*.yaml', allowEmptyArchive: true
}
}
stage('Test') {
if (isUnix()) {
sh './build.sh test'
} else {
powershell '& ./build.ps1 test'
archiveArtifacts artifacts: 'build-windows_*.yaml', allowEmptyArchive: true
}
junit(allowEmptyResults: true, keepLongStdio: true, testResults: 'target/**/junit-results*.xml')
}
Expand Down
18 changes: 10 additions & 8 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -189,15 +189,17 @@ foreach($agentType in $AgentTypes) {
Write-Host '= PREPARE: List of images and tags to be processed:'
Invoke-Expression "$baseDockerCmd config"

Write-Host '= BUILD: Building all images...'
switch ($DryRun) {
$true { Write-Host "(dry-run) $baseDockerBuildCmd" }
$false { Invoke-Expression $baseDockerBuildCmd }
}
Write-Host '= BUILD: Finished building all images.'
if ($target -eq 'build') {
Write-Host '= BUILD: Building all images...'
switch ($DryRun) {
$true { Write-Host "(dry-run) $baseDockerBuildCmd" }
$false { Invoke-Expression $baseDockerBuildCmd }
}
Write-Host '= BUILD: Finished building all images.'

if ($lastExitCode -ne 0) {
exit $lastExitCode
if ($lastExitCode -ne 0) {
exit $lastExitCode
}
}

if ($target -eq 'test') {
Expand Down