Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename common_job_properties #5915

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -20,7 +20,7 @@
// common properties that are shared among all Jenkins projects.
// Code in this directory should conform to the Groovy style guide.
// http://groovy-lang.org/style-guide.html
class common_job_properties {
class CommonProperties {

static String checkoutDir = 'src'

Expand Down Expand Up @@ -323,7 +323,7 @@ class common_job_properties {
// Install Perfkit benchmark requirements.
shell('.env/bin/pip install -r PerfKitBenchmarker/requirements.txt')
// Install job requirements for Python SDK.
shell('.env/bin/pip install -e ' + common_job_properties.checkoutDir + '/sdks/python/[gcp,test]')
shell('.env/bin/pip install -e ' + CommonProperties.checkoutDir + '/sdks/python/[gcp,test]')
// Launch performance test.
shell(".env/bin/python PerfKitBenchmarker/pkb.py $pkbArgs")
}
Expand Down
6 changes: 3 additions & 3 deletions .test-infra/jenkins/PostcommitJobBuilder.groovy
Expand Up @@ -16,7 +16,7 @@
* limitations under the License.
*/

import common_job_properties as cjp
import CommonProperties as commonProperties

/**
* This class is to be used for defining jobs for post- and pre-commit tests.
Expand Down Expand Up @@ -47,14 +47,14 @@ class PostcommitJobBuilder {

void defineAutoPostCommitJob(name) {
def autoBuilds = scope.job(name) {
cjp.setAutoJob delegate
commonProperties.setAutoJob delegate
}
autoBuilds.with(jobDefinition)
}

private void defineGhprbTriggeredJob(name, triggerPhrase, githubUiHint, triggerOnPrCommit) {
def ghprbBuilds = scope.job(name) {
cjp.setPullRequestBuildTrigger(
commonProperties.setPullRequestBuildTrigger(
delegate,
githubUiHint,
triggerPhrase,
Expand Down
14 changes: 7 additions & 7 deletions .test-infra/jenkins/PrecommitJobBuilder.groovy
Expand Up @@ -16,7 +16,7 @@
* limitations under the License.
*/

import common_job_properties
import CommonProperties as commonProperties

/** This class defines PrecommitJobBuilder.build() helper for defining pre-comit jobs. */
class PrecommitJobBuilder {
Expand Down Expand Up @@ -51,7 +51,7 @@ class PrecommitJobBuilder {
def job = createBaseJob 'Cron'
job.with {
description buildDescription('on a daily schedule.')
common_job_properties.setAutoJob delegate
commonProperties.setAutoJob delegate
}
job.with additionalCustomization
}
Expand All @@ -71,7 +71,7 @@ class PrecommitJobBuilder {
job.with {
description buildDescription('for each commit push.')
concurrentBuild()
common_job_properties.setPullRequestBuildTrigger(delegate,
commonProperties.setPullRequestBuildTrigger(delegate,
githubUiHint(),
'',
false,
Expand All @@ -85,23 +85,23 @@ class PrecommitJobBuilder {
job.with {
description buildDescription("on trigger phrase '${buildTriggerPhrase()}'.")
concurrentBuild()
common_job_properties.setPullRequestBuildTrigger delegate, githubUiHint(), buildTriggerPhrase()
commonProperties.setPullRequestBuildTrigger delegate, githubUiHint(), buildTriggerPhrase()
}
job.with additionalCustomization
}

private Object createBaseJob(nameSuffix, usesRegionFilter = false) {
def allowRemotePoll = !usesRegionFilter
return scope.job("beam_PreCommit_${nameBase}_${nameSuffix}") {
common_job_properties.setTopLevelMainJobProperties(delegate,
commonProperties.setTopLevelMainJobProperties(delegate,
'master',
timeoutMins,
allowRemotePoll) // needed for included regions PR triggering; see [JENKINS-23606]
steps {
gradle {
rootBuildScriptDir(common_job_properties.checkoutDir)
rootBuildScriptDir(commonProperties.checkoutDir)
tasks(gradleTask)
common_job_properties.setGradleSwitches(delegate)
commonProperties.setGradleSwitches(delegate)
}
}
}
Expand Down