Skip to content

Commit

Permalink
chore(ci): include build info in tests (WPB-4505) (#2319)
Browse files Browse the repository at this point in the history
  • Loading branch information
yamilmedina committed Oct 12, 2023
1 parent 052384e commit 2928999
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions AR-builder.groovy
Expand Up @@ -249,9 +249,15 @@ pipeline {
withGradle() {
sh './gradlew runUnitTests'
}

publishHTML(allowMissing: true, alwaysLinkToLastBuild: true, keepAll: true, reportDir: "app/build/reports/tests/test${params.FLAVOR}${params.BUILD_TYPE}UnitTest/", reportFiles: 'index.html', reportName: 'Unit Test Report', reportTitles: 'Unit Test')
zip archive: true, defaultExcludes: false, dir: "app/build/reports/tests/test${params.FLAVOR}${params.BUILD_TYPE}UnitTest/", overwrite: true, glob: "", zipFile: "unit-tests-android.zip"

script {
commitHash = sh(
script: 'git rev-parse HEAD | xargs echo -n',
returnStdout: true
)
}
zip archive: true, defaultExcludes: false, dir: "app/build/reports/tests/test${params.FLAVOR}${params.BUILD_TYPE}UnitTest/", overwrite: true, glob: "", zipFile: "unit-tests-android_${commitHash}.zip"
}
}

Expand Down Expand Up @@ -305,9 +311,15 @@ pipeline {
withGradle() {
sh './gradlew runAcceptanceTests'
}

publishHTML(allowMissing: true, alwaysLinkToLastBuild: true, keepAll: true, reportDir: "app/build/reports/androidTests/connected/debug/flavors/${params.FLAVOR.toLowerCase()}", reportFiles: 'index.html', reportName: 'Acceptance Test Report', reportTitles: 'Acceptance Test')
zip archive: true, defaultExcludes: false, dir: "app/build/reports/androidTests/connected/debug/flavors/${params.FLAVOR.toLowerCase()}", overwrite: true, glob: "", zipFile: "integration-tests-android.zip"

script {
commitHash = sh(
script: 'git rev-parse HEAD | xargs echo -n',
returnStdout: true
)
}
zip archive: true, defaultExcludes: false, dir: "app/build/reports/androidTests/connected/debug/flavors/${params.FLAVOR.toLowerCase()}", overwrite: true, glob: "", zipFile: "integration-tests-android_${commitHash}.zip"
}
}

Expand Down

0 comments on commit 2928999

Please sign in to comment.