X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=jjb%2Flf-gradle-jobs.yaml;fp=jjb%2Flf-gradle-jobs.yaml;h=424d83e418a3da28d7cc2cd4d3526b1fd46310eb;hb=1afbd8edc78c9d6f5f1337791d31881fee49a376;hp=0000000000000000000000000000000000000000;hpb=45d9a115f755b95b4fc25da7a25ed82bda4efe98;p=releng%2Fglobal-jjb.git diff --git a/jjb/lf-gradle-jobs.yaml b/jjb/lf-gradle-jobs.yaml new file mode 100644 index 00000000..424d83e4 --- /dev/null +++ b/jjb/lf-gradle-jobs.yaml @@ -0,0 +1,135 @@ +#################### +# COMMON FUNCTIONS # +#################### + +- _lf_gradle_common: &lf_gradle_common + name: lf-gradle-common + + ###################### + # Default parameters # + ###################### + + branch: master + build-days-to-keep: 7 + build-timeout: 60 + disable-job: false + git-url: "$GIT_URL/$PROJECT" + github-url: https://github.com + java-version: openjdk17 + stream: master + submodule-recursive: true + submodule-timeout: 10 + submodule-disable: false + cron: "@daily" + + archive-artifacts: > + **/*.log + **/hs_err_*.log + **/target/**/feature.xml + **/target/failsafe-reports/failsafe-summary.xml + **/target/surefire-reports/*-output.txt + + ##################### + # Job Configuration # + ##################### + + project-type: freestyle + node: "{build-node}" + + properties: + - lf-infra-properties: + build-days-to-keep: "{build-days-to-keep}" + + parameters: + - lf-infra-parameters: + project: "{project}" + branch: "{branch}" + stream: "{stream}" + - string: + name: ARCHIVE_ARTIFACTS + default: "{archive-artifacts}" + description: Artifacts to archive to the logs server. + + wrappers: + - lf-infra-wrappers: + build-timeout: "{build-timeout}" + jenkins-ssh-credential: "{jenkins-ssh-credential}" + + publishers: + - lf-infra-publish + + gerrit_gradle_triggers: + - patchset-created-event: + exclude-drafts: true + exclude-trivial-rebase: false + exclude-no-code-change: false + - draft-published-event + - comment-added-contains-event: + comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$' + + gerrit_trigger_file_paths: + - compare-type: REG_EXP + pattern: ".*" + +- job-template: + name: "{project-name}-gradle-build-{stream}" + id: gerrit-gradle-build + <<: *lf_gradle_common + + builders: + - shell: | + ./gradlew build + + scm: + - lf-infra-gerrit-scm: + jenkins-ssh-credential: "{jenkins-ssh-credential}" + git-url: "{git-url}" + refspec: "$GERRIT_REFSPEC" + branch: "$GERRIT_BRANCH" + submodule-recursive: "{submodule-recursive}" + submodule-timeout: "{submodule-timeout}" + submodule-disable: "{submodule-disable}" + choosing-strategy: default + + triggers: + - timed: "{obj:cron}" + - gerrit: + server-name: "{gerrit-server-name}" + trigger-on: "{obj:gerrit_gradle_triggers}" + projects: + - project-compare-type: ANT + project-pattern: "{project}" + branches: + - branch-compare-type: ANT + branch-pattern: "**/{branch}" + file-paths: "{obj:gerrit_trigger_file_paths}" + +- job-template: + name: "{project-name}-gradle-build-{stream}" + id: github-gradle-build + <<: *lf_gradle_common + + builders: + - shell: | + ./gradlew build + + scm: + - lf-infra-github-scm: + url: "{git-clone-url}{github-org}/{project}" + refspec: "+refs/pull/*:refs/remotes/origin/pr/*" + branch: "$sha1" + submodule-recursive: "{submodule-recursive}" + submodule-timeout: "{submodule-timeout}" + submodule-disable: "{submodule-disable}" + choosing-strategy: default + jenkins-ssh-credential: "{jenkins-ssh-credential}" + + triggers: + - github-pull-request: + trigger-phrase: ^(recheck|reverify)$ + only-trigger-phrase: false + status-context: "Gradle Verify" + permit-all: true + github-hooks: true + white-list-target-branches: + - "{branch}"