X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=jjb%2Fglobal-templates-c.yaml;h=f78cce76a4d772be48dffc1a775f24dd0542202f;hb=refs%2Fheads%2Fmaster;hp=9f9bdf9f1bd1e82820b2e44492ef78037ef41b0f;hpb=6d54af138144d47da8a76e85c156878f26f37397;p=ci-management.git diff --git a/jjb/global-templates-c.yaml b/jjb/global-templates-c.yaml index 9f9bdf9f1..9cccda452 100644 --- a/jjb/global-templates-c.yaml +++ b/jjb/global-templates-c.yaml @@ -1,56 +1,78 @@ --- -# vim: sw=2 ts=2 sts=2 et : +#################### +# COMMON FUNCTIONS # +#################### -- job-template: - # - # job template for build C/C++ project - # - # Required Variables: - # script: build script to execute - # +- _c_job_common: &c_job_common + name: c-job-common + + ###################### + # Default parameters # + ###################### + + branch: master + submodule-recursive: true + submodule-disable: false + submodule-timeout: 10 + + ##################### + # Job Configuration # + ##################### - name: '{project-name}-{stream}-verify-c' project-type: freestyle - node: '{build-node}' + node: "{build-node}" + disabled: false properties: - infra-properties: - build-days-to-keep: '{build-days-to-keep}' + build-days-to-keep: "{build-days-to-keep}" parameters: - - infra-parameters: - project: '{project}' - branch: '{branch}' - refspec: 'refs/heads/{branch}' - artifacts: '{archive-artifacts}' - - maven-exec: - maven-version: '{maven-version}' + - lf-infra-parameters: + project: "{project}" + branch: "{branch}" + stream: "{stream}" scm: - - gerrit-trigger-scm: - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' - submodule-recursive: '{submodule-recursive}' + - lf-infra-gerrit-scm: + jenkins-ssh-credential: "{jenkins-ssh-credential}" + git-url: "$GIT_URL/$PROJECT" + refspec: "$GERRIT_REFSPEC" + branch: "$GERRIT_BRANCH" + submodule-recursive: "{submodule-recursive}" + submodule-disable: "{submodule-disable}" + submodule-timeout: "{submodule-timeout}" + choosing-strategy: default wrappers: - - infra-wrappers: - build-timeout: '{build-timeout}' + - lf-infra-wrappers: + build-timeout: "{build-timeout}" + jenkins-ssh-credential: "{jenkins-ssh-credential}" + + publishers: + - lf-infra-publish + +- job-template: + # + # job template for build C/C++ project + # + # Required Variables: + # script: build script to execute + # + name: "{project-name}-{stream}-verify-c" + id: gerrit-verify-c + <<: *c_job_common triggers: - gerrit-trigger-patch-submitted: - server: '{server-name}' - project: '{project}' - branch: '{branch}' - files: '**' + server: "{server-name}" + project: "{project}" + branch: "{branch}" + files: "**" builders: - lf-infra-pre-build - - shell: '{script}' - - publishers: - - infra-shiplogs: - maven-version: '{maven-version}' - + - shell: "{script}" - job-template: # Job template for building & pushing docker images @@ -59,48 +81,22 @@ # 1. login to the docker registry # 2. run a specified shell builder # - - name: '{project-name}-{stream}-docker-c-shell-daily' - project-type: freestyle - node: 'ubuntu1604-docker-8c-8g' - disabled: false - properties: - - infra-properties: - build-days-to-keep: '{build-days-to-keep}' - - parameters: - - infra-parameters: - project: '{project}' - branch: '{branch}' - refspec: 'refs/heads/{branch}' - artifacts: '{archive-artifacts}' - - scm: - - gerrit-trigger-scm: - refspec: '' - choosing-strategy: 'default' - submodule-recursive: '{submodule-recursive}' - - wrappers: - - infra-wrappers: - build-timeout: '{build-timeout}' + name: "{project-name}-{stream}-docker-c-shell-daily" + id: gerrit-docker-c-shell-daily + <<: *c_job_common + node: "ubuntu1804-docker-8c-8g" triggers: # 12 AM UTC - - timed: '@daily' - gerrit-trigger-release-manually: - server: '{server-name}' - project: '{project}' - branch: '{branch}' + server: "{server-name}" + project: "{project}" + branch: "{branch}" builders: - lf-infra-pre-build - provide-maven-settings: - global-settings-file: 'global-settings' - settings-file: '{mvn-settings}' + global-settings-file: "global-settings" + settings-file: "{mvn-settings}" - docker-login - - shell: '{script}' - - publishers: - - infra-shiplogs: - maven-version: '{maven-version}' + - shell: "{script}"