X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=jjb%2Flf-whitesource-jobs.yaml;h=f0adbc4d4beacb478d58d9cb86dd187ff515d9b4;hb=fdcb4193a50803ac02b162e4b875f126b1fe8a37;hp=89673741af5389ab1ec9fa2030a9218c932f725a;hpb=00abd5048e7fa6b55c2ccda441a8c7e72cd2d48d;p=releng%2Fglobal-jjb.git diff --git a/jjb/lf-whitesource-jobs.yaml b/jjb/lf-whitesource-jobs.yaml index 89673741..f0adbc4d 100644 --- a/jjb/lf-whitesource-jobs.yaml +++ b/jjb/lf-whitesource-jobs.yaml @@ -1,12 +1,33 @@ --- - ########## # Macros # ########## +- builder: + name: lf-infra-wss-mvn-clean-install + builders: + - inject: + properties-content: JAVA_OPTS={java-opts} + - conditional-step: + condition-kind: boolean-expression + condition-expression: "{mvn-clean-install}" + steps: + - maven-target: + maven-version: "{mvn-version}" + pom: "{mvn-pom}" + goals: "clean install" + settings: "{mvn-settings}" + settings-type: cfp + global-settings: "global-settings" + global-settings-type: cfp + - builder: name: lf-infra-wss-unified-agent-scan builders: + - config-file-provider: + files: + - file-id: wss-unified-agent.config + target: $WORKSPACE/wss-unified-agent.config - shell: !include-raw: - ../shell/whitesource-unified-agent-cli.sh @@ -29,22 +50,22 @@ ##################### project-type: freestyle - node: '{build-node}' + node: "{build-node}" properties: - lf-infra-properties: - build-days-to-keep: '{build-days-to-keep}' + build-days-to-keep: "{build-days-to-keep}" parameters: - lf-infra-parameters: - project: '{project}' - branch: '{branch}' - stream: '{stream}' + project: "{project}" + branch: "{branch}" + stream: "{stream}" wrappers: - lf-infra-wrappers: - build-timeout: '{build-timeout}' - jenkins-ssh-credential: '{jenkins-ssh-credential}' + build-timeout: "{build-timeout}" + jenkins-ssh-credential: "{jenkins-ssh-credential}" - credentials-binding: - text: credential-id: wss-apiKey @@ -67,65 +88,73 @@ branch: master build-days-to-keep: 30 build-timeout: 60 - cron: '@daily' + cron: "H H * * 7" disable-job: false - git-url: '$GIT_URL/$PROJECT' - github-url: 'https://github.com' + git-url: "$GIT_URL/$PROJECT" + github-url: "https://github.com" + java-opts: "" java-version: openjdk8 + mvn-clean-install: false + mvn-global-settings: global-settings + mvn-pom: "" + mvn-version: mvn35 stream: master submodule-recursive: true submodule-timeout: 10 - wss-unified-agent-opts: '' - wss-unified-agent-version: 19.2.2.2 + submodule-disable: false + wss-unified-agent-opts: "" + wss-unified-agent-version: 19.8.1 gerrit_trigger_file_paths: - compare-type: ANT - pattern: '.*' + pattern: ".*" # github_included_regions MUST match gerrit_trigger_file_paths github_included_regions: - - '.*' + - ".*" ##################### # Job Configuration # ##################### - disabled: '{disable-job}' + disabled: "{disable-job}" parameters: - lf-infra-parameters: - project: '{project}' - branch: '{branch}' - stream: '{stream}' + project: "{project}" + branch: "{branch}" + stream: "{stream}" - string: name: WSS_PROJECT_NAME - default: '{project-name}' + default: "{project-name}" description: Project to asociate the WhiteSource report in the dashboard. - string: name: WSS_PRODUCT_NAME - default: '{wss-product-name}' + default: "{wss-product-name}" description: Product to asociate the WhiteSource report in the dashboard. - - string: - name: WSS_UNIFIED_AGENT_CONFIG - default: '{wss-unified-agent-config}' - description: Path to wss-unifed-agent.config - string: name: WSS_UNIFIED_AGENT_OPTIONS - default: '{wss-unified-agent-opts}' + default: "{wss-unified-agent-opts}" description: Options to pass to the WhiteSource Unified Agent CLI. - string: name: WSS_UNIFIED_AGENT_VERSION - default: '{wss-unified-agent-version}' + default: "{wss-unified-agent-version}" description: WhiteSource Unified Agent version package to download and use. builders: - lf-infra-pre-build - lf-update-java-alternatives: - java-version: '{java-version}' + java-version: "{java-version}" + - lf-infra-wss-mvn-clean-install: + java-opts: "{java-opts}" + mvn-clean-install: "{mvn-clean-install}" + mvn-version: "{mvn-version}" + mvn-pom: "{mvn-pom}" + mvn-settings: "{mvn-settings}" - lf-infra-wss-unified-agent-scan - job-template: - name: '{project-name}-whitesource-scan-{stream}' + name: "{project-name}-whitesource-scan-{stream}" id: gerrit-whitesource-scan <<: *lf_whitesource_common # yamllint disable-line rule:key-duplicates @@ -137,7 +166,7 @@ gerrit_wss_triggers: - comment-added-contains-event: - comment-contains-value: run-whitesource$ + comment-contains-value: '^Patch Set\s+\d+:\s+(run-whitesource)\s*$' ##################### # Job Configuration # @@ -145,27 +174,28 @@ 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}' + 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: # Build weekly on Saturdays - - timed: '{obj:cron}' + - timed: "{obj:cron}" - gerrit: - server-name: '{gerrit-server-name}' - trigger-on: '{obj:gerrit_wss_triggers}' + server-name: "{gerrit-server-name}" + trigger-on: "{obj:gerrit_wss_triggers}" projects: - project-compare-type: ANT - project-pattern: '{project}' + project-pattern: "{project}" branches: - branch-compare-type: ANT - branch-pattern: '**/{branch}' - file-paths: '{obj:gerrit_trigger_file_paths}' + branch-pattern: "**/{branch}" + file-paths: "{obj:gerrit_trigger_file_paths}" skip-vote: successful: true failed: true @@ -173,7 +203,7 @@ notbuilt: true - job-template: - name: '{project-name}-whitesource-scan-{stream}' + name: "{project-name}-whitesource-scan-{stream}" id: github-whitesource-scan <<: *lf_whitesource_common # yamllint disable-line rule:key-duplicates @@ -181,29 +211,30 @@ properties: - lf-infra-properties: - build-days-to-keep: '{build-days-to-keep}' + build-days-to-keep: "{build-days-to-keep}" - github: - url: '{github-url}/{github-org}/{project}' + url: "{github-url}/{github-org}/{project}" scm: - lf-infra-github-scm: - url: '{git-clone-url}{github-org}/{project}' - refspec: '' - branch: 'refs/heads/{branch}' - submodule-recursive: '{submodule-recursive}' - submodule-timeout: '{submodule-timeout}' + url: "{git-clone-url}{github-org}/{project}" + refspec: "" + branch: "refs/heads/{branch}" + submodule-recursive: "{submodule-recursive}" + submodule-timeout: "{submodule-timeout}" + submodule-disable: "{submodule-disable}" choosing-strategy: default - jenkins-ssh-credential: '{jenkins-ssh-credential}' + jenkins-ssh-credential: "{jenkins-ssh-credential}" triggers: # Build weekly on Saturdays - - timed: '{obj:cron}' + - timed: "{obj:cron}" - github-pull-request: - trigger-phrase: '^run-whitesource$' + trigger-phrase: "^run-whitesource$" only-trigger-phrase: false - status-context: 'WhiteSource' + status-context: "WhiteSource" permit-all: true github-hooks: true white-list-target-branches: - - '{branch}' - included-regions: '{obj:github_included_regions}' + - "{branch}" + included-regions: "{obj:github_included_regions}"