From: Thanh Ha Date: Thu, 31 Aug 2017 02:54:52 +0000 (-0400) Subject: Re-order maven jobs alphabetically X-Git-Tag: v0.8.0~4 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F46%2F6246%2F1;p=releng%2Fglobal-jjb.git Re-order maven jobs alphabetically Change-Id: Ibc3d91e21d59614fc8e0ed3402e43b986a185759 Signed-off-by: Thanh Ha --- diff --git a/jjb/lf-maven-jobs.yaml b/jjb/lf-maven-jobs.yaml index 73f567ec..b5038877 100644 --- a/jjb/lf-maven-jobs.yaml +++ b/jjb/lf-maven-jobs.yaml @@ -257,14 +257,18 @@ choosing-strategy: default jenkins-ssh-credential: '{jenkins-ssh-credential}' -################ -# Maven Verify # -################ +############### +# Maven Sonar # +############### -- lf_maven_verify: &lf_maven_verify - name: lf-maven-verify +- lf_maven_sonar: &lf_maven_sonar + name: lf-maven-sonar - # Verify job which runs mvn clean install to test a project build.. + # Sonar job which runs mvn clean install then publishes to Sonar. + # + # This job purposely only runs on the master branch as there are Additional + # configuration needed to support multiple branches and there's not much + # interest in that kind of support. # # Required parameters: # @@ -276,7 +280,6 @@ # # 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) # :git-url: URL clone project from. (default: $GIT_URL/$PROJECT) @@ -286,101 +289,106 @@ # :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) - # :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_verify_triggers: Override Gerrit Triggers. - # :gerrit_trigger_file_paths: Override file paths which can be used to - # filter which file modifications will trigger a build. + # :gerrit_sonar_triggers: Override Gerrit Triggers. ###################### # Default parameters # ###################### - branch: master + branch: master # Sonar should always be run on master branch build-days-to-keep: 7 - build-timeout: 60 + build-timeout: 30 git-url: '$GIT_URL/$PROJECT' java-version: openjdk8 mvn-global-settings: global-settings mvn-opts: '' - mvn-params: '-Dstream=$STREAM' + mvn-params: '' mvn-version: mvn33 stream: master submodule-recursive: true - gerrit_verify_triggers: - - patchset-created-event: - exclude-drafts: false - exclude-trivial-rebase: false - exclude-no-code-change: false - - draft-published-event + gerrit_sonar_triggers: - comment-added-contains-event: - comment-contains-value: recheck$ - gerrit_trigger_file_paths: - - compare-type: ANT - pattern: '**' + comment-contains-value: run-sonar$ + + # Staging repos do not make sense for CLM jobs so set it blank. + staging-profile-id: '' ##################### # Job Configuration # ##################### - concurrent: true + triggers: + - timed: 'H H * * 6' + - gerrit: + server-name: '{gerrit-server-name}' + trigger-on: '{obj:gerrit_sonar_triggers}' + projects: + - project-compare-type: 'ANT' + project-pattern: '{project}' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/master' + skip-vote: + successful: true + failed: true + unstable: true + notbuilt: true builders: - - lf-jacoco-nojava-workaround + - lf-infra-maven-sonar: + mvn-settings: '{mvn-settings}' + mvn-version: '{mvn-version}' + + publishers: + - lf-jacoco-report + - findbugs + - lf-infra-publish + +- builder: + name: lf-infra-maven-sonar + # Run a Sonar build with Maven + builders: - lf-maven-install: mvn-version: '{mvn-version}' + - inject: + # Switch this to the sonar wrapper when JJB 2.0 is available + properties-content: | + SONAR_HOST_URL=$SONAR_URL + SONAR_MAVEN_GOAL=sonar:sonar - lf-provide-maven-settings: - global-settings-file: '{mvn-global-settings}' + global-settings-file: global-settings settings-file: '{mvn-settings}' - shell: !include-raw-escape: - - ../shell/lftools-install.sh - ../shell/common-variables.sh - - ../shell/maven-build.sh + - ../shell/maven-sonar.sh - lf-provide-maven-settings-cleanup - publishers: - - findbugs - - lf-jacoco-report - - lf-infra-publish - - job-template: - name: '{project-name}-maven-verify-{stream}-{mvn-version}-{java-version}' - id: gerrit-maven-verify + name: '{project-name}-sonar' + id: gerrit-maven-sonar <<: *lf_maven_common # yamllint disable-line rule:key-duplicates - <<: *lf_maven_verify + <<: *lf_maven_sonar scm: - lf-infra-gerrit-scm: jenkins-ssh-credential: '{jenkins-ssh-credential}' git-url: '{git-url}' - refspec: '$GERRIT_REFSPEC' - branch: '$GERRIT_BRANCH' + refspec: $GERRIT_REFSPEC + branch: $GERRIT_BRANCH submodule-recursive: '{submodule-recursive}' - choosing-strategy: gerrit - - triggers: - - gerrit: - server-name: '{gerrit-server-name}' - trigger-on: '{obj:gerrit_verify_triggers}' - projects: - - project-compare-type: ANT - project-pattern: '{project}' - branches: - - branch-compare-type: ANT - branch-pattern: '**/{branch}' - file-paths: '{obj:gerrit_trigger_file_paths}' + choosing-strategy: default - job-template: - name: '{project-name}-maven-verify-{stream}-{mvn-version}-{java-version}' - id: github-maven-verify + name: '{project-name}-sonar' + id: github-maven-sonar <<: *lf_maven_common # yamllint disable-line rule:key-duplicates - <<: *lf_maven_verify + <<: *lf_maven_sonar properties: - github: @@ -408,18 +416,14 @@ github_pr_admin_list: - '' -############### -# Maven Sonar # -############### +################ +# Maven Verify # +################ -- lf_maven_sonar: &lf_maven_sonar - name: lf-maven-sonar +- lf_maven_verify: &lf_maven_verify + name: lf-maven-verify - # Sonar job which runs mvn clean install then publishes to Sonar. - # - # This job purposely only runs on the master branch as there are Additional - # configuration needed to support multiple branches and there's not much - # interest in that kind of support. + # Verify job which runs mvn clean install to test a project build.. # # Required parameters: # @@ -431,6 +435,7 @@ # # 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) # :git-url: URL clone project from. (default: $GIT_URL/$PROJECT) @@ -440,106 +445,101 @@ # :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) + # :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_sonar_triggers: Override Gerrit Triggers. + # :gerrit_verify_triggers: Override Gerrit Triggers. + # :gerrit_trigger_file_paths: Override file paths which can be used to + # filter which file modifications will trigger a build. ###################### # Default parameters # ###################### - branch: master # Sonar should always be run on master branch + branch: master build-days-to-keep: 7 - build-timeout: 30 + build-timeout: 60 git-url: '$GIT_URL/$PROJECT' java-version: openjdk8 mvn-global-settings: global-settings mvn-opts: '' - mvn-params: '' + mvn-params: '-Dstream=$STREAM' mvn-version: mvn33 stream: master submodule-recursive: true - gerrit_sonar_triggers: + gerrit_verify_triggers: + - patchset-created-event: + exclude-drafts: false + exclude-trivial-rebase: false + exclude-no-code-change: false + - draft-published-event - comment-added-contains-event: - comment-contains-value: run-sonar$ - - # Staging repos do not make sense for CLM jobs so set it blank. - staging-profile-id: '' + comment-contains-value: recheck$ + gerrit_trigger_file_paths: + - compare-type: ANT + pattern: '**' ##################### # Job Configuration # ##################### - triggers: - - timed: 'H H * * 6' - - gerrit: - server-name: '{gerrit-server-name}' - trigger-on: '{obj:gerrit_sonar_triggers}' - projects: - - project-compare-type: 'ANT' - project-pattern: '{project}' - branches: - - branch-compare-type: 'ANT' - branch-pattern: '**/master' - skip-vote: - successful: true - failed: true - unstable: true - notbuilt: true - - builders: - - lf-infra-maven-sonar: - mvn-settings: '{mvn-settings}' - mvn-version: '{mvn-version}' - - publishers: - - lf-jacoco-report - - findbugs - - lf-infra-publish + concurrent: true -- builder: - name: lf-infra-maven-sonar - # Run a Sonar build with Maven builders: + - lf-jacoco-nojava-workaround - lf-maven-install: mvn-version: '{mvn-version}' - - inject: - # Switch this to the sonar wrapper when JJB 2.0 is available - properties-content: | - SONAR_HOST_URL=$SONAR_URL - SONAR_MAVEN_GOAL=sonar:sonar - lf-provide-maven-settings: - global-settings-file: global-settings + global-settings-file: '{mvn-global-settings}' settings-file: '{mvn-settings}' - shell: !include-raw-escape: + - ../shell/lftools-install.sh - ../shell/common-variables.sh - - ../shell/maven-sonar.sh + - ../shell/maven-build.sh - lf-provide-maven-settings-cleanup + publishers: + - findbugs + - lf-jacoco-report + - lf-infra-publish + - job-template: - name: '{project-name}-sonar' - id: gerrit-maven-sonar + name: '{project-name}-maven-verify-{stream}-{mvn-version}-{java-version}' + id: gerrit-maven-verify <<: *lf_maven_common # yamllint disable-line rule:key-duplicates - <<: *lf_maven_sonar + <<: *lf_maven_verify scm: - lf-infra-gerrit-scm: jenkins-ssh-credential: '{jenkins-ssh-credential}' git-url: '{git-url}' - refspec: $GERRIT_REFSPEC - branch: $GERRIT_BRANCH + refspec: '$GERRIT_REFSPEC' + branch: '$GERRIT_BRANCH' submodule-recursive: '{submodule-recursive}' - choosing-strategy: default + choosing-strategy: gerrit + + triggers: + - gerrit: + server-name: '{gerrit-server-name}' + trigger-on: '{obj:gerrit_verify_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}-sonar' - id: github-maven-sonar + name: '{project-name}-maven-verify-{stream}-{mvn-version}-{java-version}' + id: github-maven-verify <<: *lf_maven_common # yamllint disable-line rule:key-duplicates - <<: *lf_maven_sonar + <<: *lf_maven_verify properties: - github: