Skip to content

Commit

Permalink
Extending archiveJunit post-commit task with stability history
Browse files Browse the repository at this point in the history
  • Loading branch information
damgad committed Aug 11, 2020
1 parent 18503a6 commit 1356698
Show file tree
Hide file tree
Showing 40 changed files with 52 additions and 39 deletions.
8 changes: 8 additions & 0 deletions .test-infra/jenkins/CommonJobProperties.groovy
Expand Up @@ -201,6 +201,14 @@ class CommonJobProperties {
}
}

static void setArchiveJunitWithStabilityHistory(context, String glob) {
context.archiveJunit(glob) {
testDataPublishers {
publishTestStabilityData()
}
}
}

// Sets common config for jobs which run on a schedule; optionally on push
static void setAutoJob(context,
String buildSchedule = '0 */6 * * *',
Expand Down
Expand Up @@ -121,7 +121,7 @@ private void createPostCommitJob(jobConfig) {
common.enablePhraseTriggeringFromPullRequest(delegate, jobConfig.title, jobConfig.triggerPhrase)
common.setAutoJob(delegate, 'H */6 * * *')
publishers {
archiveJunit('**/build/test-results/**/*.xml')
common.setArchiveJunitWithStabilityHistory(delegate, '**/build/test-results/**/*.xml')
}
InfluxDBCredentialsHelper.useCredentials(delegate)
additionalPipelineArgs = [
Expand Down
2 changes: 1 addition & 1 deletion .test-infra/jenkins/job_PerformanceTests_Python.groovy
Expand Up @@ -81,7 +81,7 @@ private void createPythonPerformanceTestJob(Map testConfig) {
)

publishers {
archiveJunit('**/nosetests*.xml')
commonJobProperties.setArchiveJunitWithStabilityHistory(delegate, '**/nosetests*.xml')
}

steps {
Expand Down
2 changes: 1 addition & 1 deletion .test-infra/jenkins/job_PerformanceTests_SQLIO_Java.groovy
Expand Up @@ -46,7 +46,7 @@ private void createPostCommitJob(jobConfig) {
common.enablePhraseTriggeringFromPullRequest(delegate, jobConfig.title, jobConfig.triggerPhrase)
common.setAutoJob(delegate, 'H */6 * * *')
publishers {
archiveJunit('**/build/test-results/**/*.xml')
common.setArchiveJunitWithStabilityHistory(delegate, '**/build/test-results/**/*.xml')
}

steps {
Expand Down
Expand Up @@ -29,7 +29,7 @@ PostcommitJobBuilder.postCommitJob('beam_PostCommit_XVR_Direct',

// Publish all test results to Jenkins
publishers {
archiveJunit('**/build/test-results/**/*.xml')
commonJobProperties.setArchiveJunitWithStabilityHistory(delegate, '**/build/test-results/**/*.xml')
}

// Gradle goals for this job.
Expand Down
Expand Up @@ -29,7 +29,7 @@ PostcommitJobBuilder.postCommitJob('beam_PostCommit_XVR_Flink',

// Publish all test results to Jenkins
publishers {
archiveJunit('**/build/test-results/**/*.xml')
commonJobProperties.setArchiveJunitWithStabilityHistory(delegate, '**/build/test-results/**/*.xml')
}

// Gradle goals for this job.
Expand Down
Expand Up @@ -29,7 +29,7 @@ PostcommitJobBuilder.postCommitJob('beam_PostCommit_XVR_Spark',

// Publish all test results to Jenkins
publishers {
archiveJunit('**/build/test-results/**/*.xml')
commonJobProperties.setArchiveJunitWithStabilityHistory(delegate, '**/build/test-results/**/*.xml')
}

// Gradle goals for this job.
Expand Down
2 changes: 1 addition & 1 deletion .test-infra/jenkins/job_PostCommit_Java.groovy
Expand Up @@ -33,7 +33,7 @@ PostcommitJobBuilder.postCommitJob('beam_PostCommit_Java', 'Run Java PostCommit'

// Publish all test results to Jenkins
publishers {
archiveJunit('**/build/test-results/**/*.xml')
commonJobProperties.setArchiveJunitWithStabilityHistory(delegate, '**/build/test-results/**/*.xml')
}

// Gradle goals for this job.
Expand Down
Expand Up @@ -27,7 +27,7 @@ PostcommitJobBuilder.postCommitJob('beam_PostCommit_Java_Examples_Dataflow_Java1
commonJobProperties.setTopLevelMainJobProperties(delegate, 'master', 180)

publishers {
archiveJunit('**/build/test-results/**/*.xml')
commonJobProperties.setArchiveJunitWithStabilityHistory(delegate, '**/build/test-results/**/*.xml')
}

steps {
Expand Down
Expand Up @@ -29,7 +29,7 @@ PostcommitJobBuilder.postCommitJob('beam_PostCommit_Java_PVR_Flink_Batch',

// Publish all test results to Jenkins
publishers {
archiveJunit('**/build/test-results/**/*.xml')
commonJobProperties.setArchiveJunitWithStabilityHistory(delegate, '**/build/test-results/**/*.xml')
}

// Gradle goals for this job.
Expand Down
Expand Up @@ -29,7 +29,7 @@ PostcommitJobBuilder.postCommitJob('beam_PostCommit_Java_PVR_Flink_Streaming',

// Publish all test results to Jenkins
publishers {
archiveJunit('**/build/test-results/**/*.xml')
commonJobProperties.setArchiveJunitWithStabilityHistory(delegate, '**/build/test-results/**/*.xml')
}

// Gradle goals for this job.
Expand Down
Expand Up @@ -29,7 +29,7 @@ PostcommitJobBuilder.postCommitJob('beam_PostCommit_Java_PVR_Spark_Batch',

// Publish all test results to Jenkins
publishers {
archiveJunit('**/build/test-results/**/*.xml')
commonJobProperties.setArchiveJunitWithStabilityHistory(delegate, '**/build/test-results/**/*.xml')
}

// Gradle goals for this job.
Expand Down
Expand Up @@ -32,7 +32,7 @@ PostcommitJobBuilder.postCommitJob('beam_PostCommit_Java_ValidatesRunner_Dataflo

// Publish all test results to Jenkins
publishers {
archiveJunit('**/build/test-results/**/*.xml')
commonJobProperties.setArchiveJunitWithStabilityHistory(delegate, '**/build/test-results/**/*.xml')
}

// Gradle goals for this job.
Expand Down
Expand Up @@ -30,7 +30,7 @@ PostcommitJobBuilder.postCommitJob('beam_PostCommit_Java_ValidatesRunner_Dataflo

commonJobProperties.setTopLevelMainJobProperties(delegate, 'master', 270)
publishers {
archiveJunit('**/build/test-results/**/*.xml')
commonJobProperties.setArchiveJunitWithStabilityHistory(delegate, '**/build/test-results/**/*.xml')
}

steps {
Expand Down
Expand Up @@ -30,7 +30,7 @@ PostcommitJobBuilder.postCommitJob('beam_PostCommit_Java_ValidatesRunner_Direct'
commonJobProperties.setTopLevelMainJobProperties(delegate, 'master', 180)

publishers {
archiveJunit('**/build/test-results/**/*.xml')
commonJobProperties.setArchiveJunitWithStabilityHistory(delegate, '**/build/test-results/**/*.xml')
}

steps {
Expand Down
Expand Up @@ -32,7 +32,7 @@ PostcommitJobBuilder.postCommitJob('beam_PostCommit_Java_ValidatesRunner_Direct_
commonJobProperties.setTopLevelMainJobProperties(delegate, 'master', 180)

publishers {
archiveJunit('**/build/test-results/**/*.xml')
commonJobProperties.setArchiveJunitWithStabilityHistory(delegate, '**/build/test-results/**/*.xml')
}

steps {
Expand Down
Expand Up @@ -30,7 +30,7 @@ PostcommitJobBuilder.postCommitJob('beam_PostCommit_Java_ValidatesRunner_Flink',

// Publish all test results to Jenkins
publishers {
archiveJunit('**/build/test-results/**/*.xml')
commonJobProperties.setArchiveJunitWithStabilityHistory(delegate, '**/build/test-results/**/*.xml')
}

// Gradle goals for this job.
Expand Down
Expand Up @@ -30,7 +30,7 @@ PostcommitJobBuilder.postCommitJob('beam_PostCommit_Java_ValidatesRunner_Flink_J

commonJobProperties.setTopLevelMainJobProperties(delegate, 'master', 270)
publishers {
archiveJunit('**/build/test-results/**/*.xml')
commonJobProperties.setArchiveJunitWithStabilityHistory(delegate, '**/build/test-results/**/*.xml')
}

steps {
Expand Down
Expand Up @@ -30,7 +30,7 @@ PostcommitJobBuilder.postCommitJob('beam_PostCommit_Java_ValidatesRunner_Samza',

// Publish all test results to Jenkins
publishers {
archiveJunit('**/build/test-results/**/*.xml')
commonJobProperties.setArchiveJunitWithStabilityHistory(delegate, '**/build/test-results/**/*.xml')
}

// Gradle goals for this job.
Expand Down
Expand Up @@ -30,7 +30,7 @@ PostcommitJobBuilder.postCommitJob('beam_PostCommit_Java_ValidatesRunner_Spark',

// Publish all test results to Jenkins
publishers {
archiveJunit('**/build/test-results/**/*.xml')
commonJobProperties.setArchiveJunitWithStabilityHistory(delegate, '**/build/test-results/**/*.xml')
}

// Gradle goals for this job.
Expand Down
Expand Up @@ -29,7 +29,7 @@ PostcommitJobBuilder.postCommitJob('beam_PostCommit_Java_ValidatesRunner_SparkSt

// Publish all test results to Jenkins
publishers {
archiveJunit('**/build/test-results/**/*.xml')
commonJobProperties.setArchiveJunitWithStabilityHistory(delegate, '**/build/test-results/**/*.xml')
}

// Gradle goals for this job.
Expand Down
Expand Up @@ -30,7 +30,7 @@ PostcommitJobBuilder.postCommitJob('beam_PostCommit_Java_ValidatesRunner_Twister

// Publish all test results to Jenkins
publishers {
archiveJunit('**/build/test-results/**/*.xml')
commonJobProperties.setArchiveJunitWithStabilityHistory(delegate, '**/build/test-results/**/*.xml')
}

// Gradle goals for this job.
Expand Down
2 changes: 1 addition & 1 deletion .test-infra/jenkins/job_PostCommit_Python2.groovy
Expand Up @@ -30,7 +30,7 @@ PostcommitJobBuilder.postCommitJob('beam_PostCommit_Python2', 'Run Python 2 Post
commonJobProperties.setTopLevelMainJobProperties(delegate)

publishers {
archiveJunit('**/nosetests*.xml')
commonJobProperties.setArchiveJunitWithStabilityHistory(delegate, '**/nosetests*.xml')
}

// Execute shell command to test Python SDK.
Expand Down
2 changes: 1 addition & 1 deletion .test-infra/jenkins/job_PostCommit_Python35.groovy
Expand Up @@ -30,7 +30,7 @@ PostcommitJobBuilder.postCommitJob('beam_PostCommit_Python35', 'Run Python 3.5 P
commonJobProperties.setTopLevelMainJobProperties(delegate)

publishers {
archiveJunit('**/nosetests*.xml')
commonJobProperties.setArchiveJunitWithStabilityHistory(delegate, '**/nosetests*.xml')
}

// Execute shell command to test Python SDK.
Expand Down
2 changes: 1 addition & 1 deletion .test-infra/jenkins/job_PostCommit_Python36.groovy
Expand Up @@ -30,7 +30,7 @@ PostcommitJobBuilder.postCommitJob('beam_PostCommit_Python36', 'Run Python 3.6 P
commonJobProperties.setTopLevelMainJobProperties(delegate)

publishers {
archiveJunit('**/nosetests*.xml')
commonJobProperties.setArchiveJunitWithStabilityHistory(delegate, '**/nosetests*.xml')
}

// Execute shell command to test Python SDK.
Expand Down
2 changes: 1 addition & 1 deletion .test-infra/jenkins/job_PostCommit_Python37.groovy
Expand Up @@ -30,7 +30,7 @@ PostcommitJobBuilder.postCommitJob('beam_PostCommit_Python37', 'Run Python 3.7 P
commonJobProperties.setTopLevelMainJobProperties(delegate, 'master', 100)

publishers {
archiveJunit('**/nosetests*.xml')
commonJobProperties.setArchiveJunitWithStabilityHistory(delegate, '**/nosetests*.xml')
}

// Execute shell command to test Python SDK.
Expand Down
2 changes: 1 addition & 1 deletion .test-infra/jenkins/job_PostCommit_Python38.groovy
Expand Up @@ -30,7 +30,7 @@ PostcommitJobBuilder.postCommitJob('beam_PostCommit_Python38', 'Run Python 3.8 P
commonJobProperties.setTopLevelMainJobProperties(delegate, 'master', 100)

publishers {
archiveJunit('**/nosetests*.xml')
commonJobProperties.setArchiveJunitWithStabilityHistory(delegate, '**/nosetests*.xml')
}

// Execute shell command to test Python SDK.
Expand Down
Expand Up @@ -29,7 +29,7 @@ PostcommitJobBuilder.postCommitJob('beam_PostCommit_Py_ValCont',
commonJobProperties.setTopLevelMainJobProperties(delegate)

publishers {
archiveJunit('**/nosetests*.xml')
commonJobProperties.setArchiveJunitWithStabilityHistory(delegate, '**/nosetests*.xml')
}

// Execute shell command to test Python SDK.
Expand Down
Expand Up @@ -29,7 +29,7 @@ PostcommitJobBuilder.postCommitJob('beam_PostCommit_Py_VR_Dataflow', 'Run Python
commonJobProperties.setTopLevelMainJobProperties(delegate)

publishers {
archiveJunit('**/nosetests*.xml')
commonJobProperties.setArchiveJunitWithStabilityHistory(delegate, '**/nosetests*.xml')
}

// Execute gradle task to test Python SDK.
Expand Down
Expand Up @@ -29,7 +29,7 @@ PostcommitJobBuilder.postCommitJob('beam_PostCommit_Py_VR_Dataflow_V2', 'Run Pyt
commonJobProperties.setTopLevelMainJobProperties(delegate)

publishers {
archiveJunit('**/nosetests*.xml')
commonJobProperties.setArchiveJunitWithStabilityHistory(delegate, '**/nosetests*.xml')
}

// Execute gradle task to test Python SDK.
Expand Down
2 changes: 1 addition & 1 deletion .test-infra/jenkins/job_PostCommit_SQL.groovy
Expand Up @@ -31,7 +31,7 @@ PostcommitJobBuilder.postCommitJob('beam_PostCommit_SQL', 'Run SQL PostCommit',

// Publish all test results to Jenkins
publishers {
archiveJunit('**/build/test-results/**/*.xml')
commonJobProperties.setArchiveJunitWithStabilityHistory(delegate, '**/build/test-results/**/*.xml')
}

// Gradle goals for this job.
Expand Down
3 changes: 2 additions & 1 deletion .test-infra/jenkins/job_PreCommit_Java.groovy
Expand Up @@ -17,6 +17,7 @@
*/

import PrecommitJobBuilder
import CommonJobProperties as common

PrecommitJobBuilder builder = new PrecommitJobBuilder(
scope: this,
Expand All @@ -39,7 +40,7 @@ PrecommitJobBuilder builder = new PrecommitJobBuilder(
)
builder.build {
publishers {
archiveJunit('**/build/test-results/**/*.xml')
common.setArchiveJunitWithStabilityHistory(delegate, '**/build/test-results/**/*.xml')
recordIssues {
tools {
errorProne()
Expand Down
Expand Up @@ -17,6 +17,7 @@
*/

import PrecommitJobBuilder
import CommonJobProperties as common

PrecommitJobBuilder builder = new PrecommitJobBuilder(
scope: this,
Expand All @@ -37,6 +38,6 @@ PrecommitJobBuilder builder = new PrecommitJobBuilder(
)
builder.build {
publishers {
archiveJunit('**/build/test-results/**/*.xml')
common.setArchiveJunitWithStabilityHistory(delegate, '**/build/test-results/**/*.xml')
}
}
Expand Up @@ -39,7 +39,7 @@ PrecommitJobBuilder builder = new PrecommitJobBuilder(
)
builder.build {
publishers {
archiveJunit('**/build/test-results/**/*.xml')
properties.setArchiveJunitWithStabilityHistory(delegate, '**/build/test-results/**/*.xml')
}

steps {
Expand Down
3 changes: 2 additions & 1 deletion .test-infra/jenkins/job_PreCommit_Java_PortabilityApi.groovy
Expand Up @@ -17,6 +17,7 @@
*/

import PrecommitJobBuilder
import CommonJobProperties as common

PrecommitJobBuilder builder = new PrecommitJobBuilder(
scope: this,
Expand All @@ -36,6 +37,6 @@ PrecommitJobBuilder builder = new PrecommitJobBuilder(
)
builder.build {
publishers {
archiveJunit('**/build/test-results/**/*.xml')
common.setArchiveJunitWithStabilityHistory(delegate, '**/build/test-results/**/*.xml')
}
}
Expand Up @@ -38,7 +38,7 @@ PrecommitJobBuilder builder = new PrecommitJobBuilder(
)
builder.build {
publishers {
archiveJunit('**/build/test-results/**/*.xml')
properties.setArchiveJunitWithStabilityHistory(delegate, '**/build/test-results/**/*.xml')
}

steps {
Expand Down
3 changes: 2 additions & 1 deletion .test-infra/jenkins/job_PreCommit_Python.groovy
Expand Up @@ -17,6 +17,7 @@
*/

import PrecommitJobBuilder
import CommonJobProperties as common

PrecommitJobBuilder builder = new PrecommitJobBuilder(
scope: this,
Expand All @@ -32,6 +33,6 @@ PrecommitJobBuilder builder = new PrecommitJobBuilder(
builder.build {
// Publish all test results to Jenkins.
publishers {
archiveJunit('**/pytest*.xml')
common.setArchiveJunitWithStabilityHistory(delegate, '**/pytest*.xml')
}
}
3 changes: 2 additions & 1 deletion .test-infra/jenkins/job_PreCommit_SQL.groovy
Expand Up @@ -17,6 +17,7 @@
*/

import PrecommitJobBuilder
import CommonJobProperties as common

PrecommitJobBuilder builder = new PrecommitJobBuilder(
scope: this,
Expand All @@ -31,7 +32,7 @@ PrecommitJobBuilder builder = new PrecommitJobBuilder(
)
builder.build {
publishers {
archiveJunit('**/build/test-results/**/*.xml')
common.setArchiveJunitWithStabilityHistory(delegate, '**/build/test-results/**/*.xml')
recordIssues {
tools {
errorProne()
Expand Down
2 changes: 1 addition & 1 deletion .test-infra/jenkins/job_PreCommit_SQL_Java11.groovy
Expand Up @@ -37,7 +37,7 @@ PrecommitJobBuilder builder = new PrecommitJobBuilder(
)
builder.build {
publishers {
archiveJunit('**/build/test-results/**/*.xml')
properties.setArchiveJunitWithStabilityHistory(delegate, '**/build/test-results/**/*.xml')
recordIssues {
tools {
errorProne()
Expand Down

0 comments on commit 1356698

Please sign in to comment.