Skip to content

Commit

Permalink
Merge pull request #17238 from ibzib/BEAM-14225
Browse files Browse the repository at this point in the history
[BEAM-14225] load balance jenkins jobs
  • Loading branch information
ibzib committed Apr 1, 2022
2 parents d16c8c1 + d856f28 commit 3d4454c
Show file tree
Hide file tree
Showing 21 changed files with 23 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .test-infra/jenkins/CommonJobProperties.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ class CommonJobProperties {

// Sets common config for jobs which run on a schedule; optionally on push
static void setAutoJob(context,
String buildSchedule = '0 */6 * * *',
String buildSchedule = 'H H/6 * * *',
notifyAddress = 'builds@beam.apache.org',
triggerOnCommit = false,
emailIndividuals = false) {
Expand Down
2 changes: 1 addition & 1 deletion .test-infra/jenkins/CronJobBuilder.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class CronJobBuilder {
* @param cronPattern Defines when the job should be fired. Default: "every 6th hour".
* @param jobDefinition Closure for the job.
*/
static void cronJob(nameBase, cronPattern = '0 */6 * * *', scope, jobDefinition = {}) {
static void cronJob(nameBase, cronPattern = 'H H/6 * * *', scope, jobDefinition = {}) {
CronJobBuilder builder = new CronJobBuilder(scope, jobDefinition)
builder.defineAutoPostCommitJob(nameBase, cronPattern)
}
Expand Down
2 changes: 1 addition & 1 deletion .test-infra/jenkins/PostcommitJobBuilder.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class PostcommitJobBuilder {

void defineAutoPostCommitJob(name) {
def autoBuilds = scope.job(name) {
commonJobProperties.setAutoJob delegate, '0 */6 * * *', 'builds@beam.apache.org', true, true
commonJobProperties.setAutoJob delegate, 'H H/6 * * *', 'builds@beam.apache.org', true, true
}

autoBuilds.with(jobDefinition)
Expand Down
4 changes: 2 additions & 2 deletions .test-infra/jenkins/job_00_seed.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ job('beam_SeedJob') {
}

triggers {
// Run once per day
cron('H */6 * * *')
// Run every six hours
cron('H H/6 * * *')

githubPullRequest {
admins(['asfbot'])
Expand Down
3 changes: 1 addition & 2 deletions .test-infra/jenkins/job_Dependency_Check.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,9 @@ job('beam_Dependency_Check') {
false
)

// This is a job that runs weekly.
commonJobProperties.setAutoJob(
delegate,
'0 12 * * 1')
'@weekly')

steps {
gradle {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ PhraseTriggeringPostCommitBuilder.postCommitJob(


// Run this job every 6 hours on a random minute.
CronJobBuilder.cronJob('beam_Python_LoadTests_FnApiRunner_Microbenchmark', 'H */6 * * *', this) {
CronJobBuilder.cronJob('beam_Python_LoadTests_FnApiRunner_Microbenchmark', 'H H/6 * * *', this) {
additionalPipelineArgs = [
influx_db_name: InfluxDBCredentialsHelper.InfluxDBDatabaseName,
influx_hostname: InfluxDBCredentialsHelper.InfluxDBHostUrl,
Expand Down
3 changes: 1 addition & 2 deletions .test-infra/jenkins/job_Metrics_Report.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,9 @@ job('beam_Metrics_Report') {
false
)

// This is a job that runs weekly.
commonJobProperties.setAutoJob(
delegate,
'0 12 * * 1')
'@weekly')

steps {
gradle {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ private void createPostCommitJob(jobConfig) {
description(jobConfig.description)
common.setTopLevelMainJobProperties(delegate)
common.enablePhraseTriggeringFromPullRequest(delegate, jobConfig.title, jobConfig.triggerPhrase)
common.setAutoJob(delegate, 'H */6 * * *')
common.setAutoJob(delegate, 'H H/6 * * *')
publishers {
archiveJunit('**/build/test-results/**/*.xml')
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ private void createGCSFileBasedIOITTestJob(testJob) {
description(testJob.description)
common.setTopLevelMainJobProperties(delegate)
common.enablePhraseTriggeringFromPullRequest(delegate, testJob.githubTitle, testJob.githubTriggerPhrase)
common.setAutoJob(delegate, 'H */6 * * *')
common.setAutoJob(delegate, 'H H/6 * * *')
InfluxDBCredentialsHelper.useCredentials(delegate)
additionalPipelineArgs = [
influxDatabase: InfluxDBCredentialsHelper.InfluxDBDatabaseName,
Expand Down Expand Up @@ -340,7 +340,7 @@ private void createHDFSFileBasedIOITTestJob(testJob) {
description(testJob.description)
common.setTopLevelMainJobProperties(delegate)
common.enablePhraseTriggeringFromPullRequest(delegate, testJob.githubTitle, testJob.githubTriggerPhrase)
common.setAutoJob(delegate, 'H */6 * * *')
common.setAutoJob(delegate, 'H H/6 * * *')
InfluxDBCredentialsHelper.useCredentials(delegate)
additionalPipelineArgs = [
influxDatabase: InfluxDBCredentialsHelper.InfluxDBDatabaseName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ String jobName = "beam_PerformanceTests_HadoopFormat"

job(jobName) {
common.setTopLevelMainJobProperties(delegate)
common.setAutoJob(delegate, 'H */6 * * *')
common.setAutoJob(delegate, 'H H/6 * * *')
common.enablePhraseTriggeringFromPullRequest(
delegate,
'Java HadoopFormatIO Performance Test',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ String jobName = "beam_PerformanceTests_InfluxDbIO_IT"

job(jobName) {
common.setTopLevelMainJobProperties(delegate)
common.setAutoJob(delegate,'H */6 * * *')
common.setAutoJob(delegate,'H H/6 * * *')
common.enablePhraseTriggeringFromPullRequest(
delegate,
'Java InfluxDbIO Performance Test',
Expand Down
2 changes: 1 addition & 1 deletion .test-infra/jenkins/job_PerformanceTests_JDBC.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ String jobName = "beam_PerformanceTests_JDBC"

job(jobName) {
common.setTopLevelMainJobProperties(delegate)
common.setAutoJob(delegate, 'H */6 * * *')
common.setAutoJob(delegate, 'H H/6 * * *')
common.enablePhraseTriggeringFromPullRequest(
delegate,
'Java JdbcIO Performance Test',
Expand Down
2 changes: 1 addition & 1 deletion .test-infra/jenkins/job_PerformanceTests_KafkaIO_IT.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ String jobName = "beam_PerformanceTests_Kafka_IO"
job(jobName) {
common.setTopLevelMainJobProperties(delegate)
// TODO(BEAM-9482): Re-enable once fixed.
// common.setAutoJob(delegate, 'H */6 * * *')
// common.setAutoJob(delegate, 'H H/6 * * *')
common.enablePhraseTriggeringFromPullRequest(
delegate,
'Java KafkaIO Performance Test',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ String jobName = "beam_PerformanceTests_MongoDBIO_IT"

job(jobName) {
common.setTopLevelMainJobProperties(delegate)
common.setAutoJob(delegate,'H */6 * * *')
common.setAutoJob(delegate,'H H/6 * * *')
common.enablePhraseTriggeringFromPullRequest(
delegate,
'Java MongoDBIO Performance Test',
Expand Down
2 changes: 1 addition & 1 deletion .test-infra/jenkins/job_PerformanceTests_Python.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ private void createPythonPerformanceTestJob(Map testConfig) {
InfluxDBCredentialsHelper.useCredentials(delegate)

// Run job in postcommit, don't trigger every push.
commonJobProperties.setAutoJob(delegate, 'H */6 * * *')
commonJobProperties.setAutoJob(delegate, 'H H/6 * * *')

// Allows triggering this build against pull requests.
commonJobProperties.enablePhraseTriggeringFromPullRequest(
Expand Down
2 changes: 1 addition & 1 deletion .test-infra/jenkins/job_PerformanceTests_SQLIO_Java.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ private void createPostCommitJob(jobConfig) {
description(jobConfig.description)
common.setTopLevelMainJobProperties(delegate)
common.enablePhraseTriggeringFromPullRequest(delegate, jobConfig.title, jobConfig.triggerPhrase)
common.setAutoJob(delegate, 'H */6 * * *')
common.setAutoJob(delegate, 'H H/6 * * *')
publishers {
archiveJunit('**/build/test-results/**/*.xml')
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ String jobName = "beam_python_mongoio_load_test"

job(jobName) {
common.setTopLevelMainJobProperties(delegate)
common.setAutoJob(delegate, 'H */6 * * *')
common.setAutoJob(delegate, 'H H/6 * * *')
common.enablePhraseTriggeringFromPullRequest(
delegate,
'Python MongoDBIO Load Test',
Expand Down
2 changes: 1 addition & 1 deletion .test-infra/jenkins/job_PostRelease_NightlySnapshot.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ job('beam_PostRelease_NightlySnapshot') {
// This is a post-commit job that runs once per day, not for every push.
commonJobProperties.setAutoJob(
delegate,
'0 11 * * *')
'@daily')


// Allows triggering this build against pull requests.
Expand Down
2 changes: 1 addition & 1 deletion .test-infra/jenkins/job_Publish_Docker_Snapshots.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ job('beam_Publish_Docker_Snapshots') {
)

// Runs once per day.
commonJobProperties.setAutoJob(delegate, 'H 10 * * *')
commonJobProperties.setAutoJob(delegate, '@daily')

steps {
gradle {
Expand Down
2 changes: 1 addition & 1 deletion .test-infra/jenkins/job_Release_NightlySnapshot.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ job('beam_Release_NightlySnapshot') {
// This is a post-commit job that runs once per day, not for every push.
commonJobProperties.setAutoJob(
delegate,
'0 7 * * *',
'@daily',
'builds@beam.apache.org')


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ job('beam_Release_Python_NightlySnapshot') {
// This is a post-commit job that runs once per day, not for every push.
commonJobProperties.setAutoJob(
delegate,
'0 7 * * *',
'@daily',
'builds@beam.apache.org')

// Allows triggering this build against pull requests.
Expand Down

0 comments on commit 3d4454c

Please sign in to comment.