:java-version: Version of Java to execute Maven build. (default: openjdk17)
:jenkins-ssh-credential: Credential to use for SSH. (Generally configured in defaults.yaml)
:mvn-settings: Maven settings.xml file containing credentials to use.
- :wrapper: Use the gradle wrapper (default: false)
+ :wrapper: Use the gradle wrapper (default: true)
+
+:Optional parameters:
+
+ :branch: The branch to build against. (default: master)
+ :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
+ :build-timeout: Timeout in minutes before aborting build. (default: 60)
+ :deploy-path: The path in Nexus to deploy javadoc to. (default: $PROJECT/$STREAM)
+ :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
+ :stream: Keyword that represents a release code-name.
+ Often the same as the branch. (default: master)
+ :submodule-recursive: Whether to checkout submodules recursively.
+ (default: true)
+ :submodule-timeout: Timeout (in minutes) for checkout operation.
+ (default: 10)
+ :submodule-disable: Disable submodule checkout operation.
+ (default: false)
+
+ :gerrit_verify_triggers: Override Gerrit Triggers.
+
+Gradle Publish Jar
+------------
+
+Runs a gradle publish command to publish the jar.
+
+:Template Names:
+
+ - {project-name}-gradle-publish-jar-{stream}
+
+:Comment Trigger: recheck|reverify
+
+:Required parameters:
+ :build-node: The node to run build on.
+ :java-version: Version of Java to execute Maven build. (default: openjdk17)
+ :jenkins-ssh-credential: Credential to use for SSH. (Generally configured in defaults.yaml)
+ :mvn-settings: Maven settings.xml file containing credentials to use.
+ :wrapper: Use the gradle wrapper (default: true)
:Optional parameters:
- lf-infra-docker-login:
global-settings-file: "global-settings"
settings-file: "{mvn-settings}"
- - shell: |
- ./gradlew build
+ - gradle:
+ wrapper: "{wrapper}"
+ executable: true
+ tasks: |
+ build
scm:
- lf-infra-github-scm:
github-hooks: true
white-list-target-branches:
- "{branch}"
+
+- job-template:
+ name: "{project-name}-gradle-publish-jar-{stream}"
+ id: gerrit-gradle-publish-jar
+ <<: *lf_gradle_common
+
+ builders:
+ - lf-infra-pre-build
+ - lf-update-java-alternatives:
+ java-version: "{java-version}"
+ - lf-infra-docker-login:
+ global-settings-file: "global-settings"
+ settings-file: "{mvn-settings}"
+ - gradle:
+ wrapper: "{wrapper}"
+ executable: true
+ tasks: |
+ shadowJar
+ publish
+
+ 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}"