X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=docs%2Fjjb%2Flf-maven-jobs.rst;h=2fe043d711bfa65da6ddd28c6fdb4017e8bc6425;hb=refs%2Fchanges%2F94%2F10394%2F1;hp=9c4d6ca1d18d3597a484d47cc58f3778d61e88f4;hpb=df523ff68c8dbf3ad8eb09ef9cc04825bba86a4f;p=releng%2Fglobal-jjb.git diff --git a/docs/jjb/lf-maven-jobs.rst b/docs/jjb/lf-maven-jobs.rst index 9c4d6ca1..2fe043d7 100644 --- a/docs/jjb/lf-maven-jobs.rst +++ b/docs/jjb/lf-maven-jobs.rst @@ -52,11 +52,30 @@ Jobs for Maven projects to generate javadoc using GitHub. Macros ====== +lf-maven-build +-------------- + +Calls the maven build script to perform a maven build. + +:Required parameters: + + :mvn-goals: The maven goals to perform for the build. + (default: clean deploy) + lf-maven-common --------------- Common Jenkins configuration for Maven jobs. +lf-maven-deploy +--------------- + +Calls the maven deploy script to push artifacts to Nexus. + +lf-maven-stage +--------------- + +Calls the maven stage script to push artifacts to a Nexus staging repository. Job Templates ============= @@ -90,7 +109,7 @@ Produces a CLM scan of the code into Nexus IQ Server. Maven configuration. (default: global-settings) :mvn-opts: Sets MAVEN_OPTS. (default: '') :mvn-params: Additional mvn parameters to pass to the cli. (default: '') - :mvn-version: Version of maven to use. (default: mvn33) + :mvn-version: Version of maven to use. (default: mvn35) :stream: Keyword that can be used to represent a release code-name. Often the same as the branch. (default: master) :submodule-recursive: Whether to checkout submodules recursively. @@ -132,7 +151,7 @@ Expects javadocs to be available in $WORKSPACE/target/site/apidocs Maven configuration. (default: global-settings) :mvn-opts: Sets MAVEN_OPTS. (default: '') :mvn-params: Additional mvn parameters to pass to the cli. (default: '') - :mvn-version: Version of maven to use. (default: mvn33) + :mvn-version: Version of maven to use. (default: mvn35) :stream: Keyword that can be used to represent a release code-name. Often the same as the branch. (default: master) :submodule-recursive: Whether to checkout submodules recursively. @@ -171,7 +190,7 @@ Expects javadocs to be available in $WORKSPACE/target/site/apidocs Maven configuration. (default: global-settings) :mvn-opts: Sets MAVEN_OPTS. (default: '') :mvn-params: Additional mvn parameters to pass to the cli. (default: '') - :mvn-version: Version of maven to use. (default: mvn33) + :mvn-version: Version of maven to use. (default: mvn35) :stream: Keyword that can be used to represent a release code-name. Often the same as the branch. (default: master) :submodule-recursive: Whether to checkout submodules recursively. @@ -179,6 +198,66 @@ Expects javadocs to be available in $WORKSPACE/target/site/apidocs :gerrit_verify_triggers: Override Gerrit Triggers. +Maven Merge +----------- + +Merge job which runs `mvn clean deploy` to build a project. + +This job pushes files to Nexus using cURL instead of allowing the Maven deploy +goal to push the upload. This is to get around the issue that Maven deploy does +not properly support uploading files at the end of the build and instead pushes +as it goes. There exists a `-Ddeploy-at-end` feature however it does not work +with extensions. + +This job uses the following strategy to deploy jobs to Nexus: + +1. `wget -r` to fetch maven-metadata.xml from Nexus +2. `mvn deploy -DaltDeploymentRepository` to prepare files for upload +3. Removes untouched maven-metadata.xml files before upload +4. Use lftools (cURL) upload script to push artifacts to Nexus + +:Template Names: + + - {project-name}-maven-merge-{stream} + - gerrit-maven-merge + - github-maven-merge + +:Required parameters: + + :build-node: The node to run build on. + :jenkins-ssh-credential: Credential to use for SSH. (Generally should + be configured in defaults.yaml) + :mvn-settings: The name of settings file containing credentials for the project. + :mvn-snapshot-id: Maven Server ID from settings.xml to pull credentials from. + (Note: This setting should be configured in defaults.yaml.) + :nexus-snapshot-repo: The repository id of the Nexus snapshot repo to deploy to. + +:Optional parameters: + + :branch: Git branch to fetch for the build. (default: master) + :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7) + :build-timeout: Timeout in seconds before aborting build. (default: 60) + :cron: Cron schedule when to trigger the job. This parameter also + supports multiline input via YAML pipe | character in cases where + one may want to provide more than 1 cron timer. (default: 'H H * * 0' + to run weekly) + :git-url: URL clone project from. (default: $GIT_URL/$PROJECT) + :java-version: Version of Java to use for the build. (default: openjdk8) + :mvn-global-settings: The name of the Maven global settings to use for + Maven configuration. (default: global-settings) + :mvn-opts: Sets MAVEN_OPTS. (default: '') + :mvn-params: Additional mvn parameters to pass to the cli. (default: '') + :mvn-version: Version of maven to use. (default: mvn35) + :nexus-cut-dirs: Number of directories to cut from file path for `wget -r`. + :stream: Keyword that can be used to represent a release code-name. + Often the same as the branch. (default: master) + :submodule-recursive: Whether to checkout submodules recursively. + (default: true) + + :gerrit_merge_triggers: Override Gerrit Triggers. + :gerrit_trigger_file_paths: Override file paths which can be used to + filter which file modifications will trigger a build. + Maven Release ------------- @@ -205,6 +284,7 @@ directory can then be reused later to deploy to Nexus. :Optional parameters: + :archive-artifacts: Artifacts to archive to the logs server (default: ''). :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 seconds before aborting build. (default: 60) @@ -218,7 +298,7 @@ directory can then be reused later to deploy to Nexus. Maven configuration. (default: global-settings) :mvn-opts: Sets MAVEN_OPTS. (default: '') :mvn-params: Additional mvn parameters to pass to the cli. (default: '') - :mvn-version: Version of maven to use. (default: mvn33) + :mvn-version: Version of maven to use. (default: mvn35) :stream: Keyword that can be used to represent a release code-name. Often the same as the branch. (default: master) :submodule-recursive: Whether to checkout submodules recursively. @@ -252,13 +332,17 @@ interest in that kind of support. :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7) :build-timeout: Timeout in seconds before aborting build. (default: 60) + :cron: Cron schedule when to trigger the job. This parameter also + supports multiline input via YAML pipe | character in cases where + one may want to provide more than 1 cron timer. (default: 'H H * * 6' + to run weekly) :git-url: URL clone project from. (default: $GIT_URL/$PROJECT) :java-version: Version of Java to use for the build. (default: openjdk8) :mvn-global-settings: The name of the Maven global settings to use for Maven configuration. (default: global-settings) :mvn-opts: Sets MAVEN_OPTS. (default: '') :mvn-params: Additional mvn parameters to pass to the cli. (default: '') - :mvn-version: Version of maven to use. (default: mvn33) + :mvn-version: Version of maven to use. (default: mvn35) :stream: Keyword that can be used to represent a release code-name. Often the same as the branch. (default: master) :submodule-recursive: Whether to checkout submodules recursively. @@ -295,7 +379,7 @@ Verify job which runs mvn clean install to test a project build.. Maven configuration. (default: global-settings) :mvn-opts: Sets MAVEN_OPTS. (default: '') :mvn-params: Additional mvn parameters to pass to the cli. (default: '') - :mvn-version: Version of maven to use. (default: mvn33) + :mvn-version: Version of maven to use. (default: mvn35) :stream: Keyword that can be used to represent a release code-name. Often the same as the branch. (default: master) :submodule-recursive: Whether to checkout submodules recursively. @@ -332,14 +416,14 @@ via comment trigger. :branch: Git branch to fetch for the build. (default: master) :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7) - :build-timeout: Timeout in seconds before aborting build. (default: 60) + :build-timeout: Timeout in minutes before aborting build. (default: 60) :git-url: URL clone project from. (default: $GIT_URL/$PROJECT) :java-version: Version of Java to use for the build. (default: openjdk8) :mvn-global-settings: The name of the Maven global settings to use for Maven configuration. (default: global-settings) :mvn-opts: Sets MAVEN_OPTS. (default: '') :mvn-params: Additional mvn parameters to pass to the cli. (default: '') - :mvn-version: Version of maven to use. (default: mvn33) + :mvn-version: Version of maven to use. (default: mvn35) :stream: Keyword that can be used to represent a release code-name. Often the same as the branch. (default: master) :submodule-recursive: Whether to checkout submodules recursively.