From 865a8ffab6463e6e7a99ab07a983755fcfafbec0 Mon Sep 17 00:00:00 2001 From: Dileep Ranganathan Date: Mon, 9 Dec 2019 16:27:37 -0800 Subject: [PATCH] Add CI job templates for icn/daaas Added verify, merge jobs for helm charts and microservices. Issue-ID: ICN-201 Signed-off-by: Dileep Ranganathan Change-Id: I0a9e201a2d13aca1bcbf997108ff00abd480a413 --- .../akraino-icn-daaas-templates.yaml | 133 +++++++++++++++++++++ jjb/icn-daaas/icn-daaas.yaml | 18 ++- 2 files changed, 149 insertions(+), 2 deletions(-) create mode 100644 jjb/akraino-templates/akraino-icn-daaas-templates.yaml diff --git a/jjb/akraino-templates/akraino-icn-daaas-templates.yaml b/jjb/akraino-templates/akraino-icn-daaas-templates.yaml new file mode 100644 index 0000000..61de6ca --- /dev/null +++ b/jjb/akraino-templates/akraino-icn-daaas-templates.yaml @@ -0,0 +1,133 @@ +--- +# +# Copyright (c) 2019 Intel Corporation. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. +# +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +- daaas_job_boiler_plate: &daaas_job_boiler_plate + name: daaas_job_boiler_plate + archive-artifacts: > + **/*.log + build-days-to-keep: 30 + build-timeout: 60 + stream: master + project-type: freestyle + submodule-recursive: true + concurrent: true + node: "{build-node}" + + properties: + - lf-infra-properties: + build-days-to-keep: "{build-days-to-keep}" + + parameters: + - lf-infra-parameters: + project: "{project}" + stream: "{stream}" + branch: "{branch}" + lftools-version: "{lftools-version}" + + - string: + name: ARCHIVE_ARTIFACTS + default: "{archive-artifacts}" + description: Artifacts to archive to the logs server. + + wrappers: + - lf-infra-wrappers: + build-timeout: "{build-timeout}" + jenkins-ssh-credential: "{jenkins-ssh-credential}" + + scm: + - lf-infra-gerrit-scm: + jenkins-ssh-credential: "{jenkins-ssh-credential}" + git-url: "{git-url}/{project}.git" + refspec: "$GERRIT_REFSPEC" + branch: "$GERRIT_BRANCH" + submodule-recursive: "{submodule-recursive}" + submodule-timeout: "{submodule-timeout}" + submodule-disable: false + choosing-strategy: "gerrit" + + builders: + - shell: "{obj:script}" + + publishers: + - lf-infra-publish + +################# +# JOB TEMPLATES # +################# +- job-template: + # Job template for verify jobs + + name: "{project-name}-{stream}-{type}-verify" + <<: *daaas_job_boiler_plate + + triggers: + - gerrit: + server-name: "{gerrit-server-name}" + trigger-on: + - 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: "recheck" + - comment-added-contains-event: + comment-contains-value: "reverify" + projects: + - project-compare-type: "ANT" + project-pattern: "{project}" + branches: + - branch-compare-type: "ANT" + branch-pattern: "**/{branch}" + file-paths: + - compare-type: ANT + pattern: "**/{path}/*" + disable-strict-forbidden-file-verification: "true" + forbidden-file-paths: + - compare-type: ANT + pattern: "docs/**" + readable-message: true + +- job-template: + # Job template for merge jobs + + name: "{project-name}-{stream}-{type}-merge" + <<: *daaas_job_boiler_plate + + gerrit_merge_triggers: + - change-merged-event + - comment-added-contains-event: + comment-contains-value: remerge$ + + triggers: + - gerrit: + server-name: "{gerrit-server-name}" + trigger-on: "{obj:gerrit_merge_triggers}" + projects: + - project-compare-type: "ANT" + project-pattern: "{project}" + branches: + - branch-compare-type: "ANT" + branch-pattern: "**/{branch}" + file-paths: + - compare-type: ANT + pattern: "**/{path}/*" + disable-strict-forbidden-file-verification: "true" + forbidden-file-paths: + - compare-type: ANT + pattern: "docs/**" + readable-message: true diff --git a/jjb/icn-daaas/icn-daaas.yaml b/jjb/icn-daaas/icn-daaas.yaml index 332c4aa..6bbcbd3 100644 --- a/jjb/icn-daaas/icn-daaas.yaml +++ b/jjb/icn-daaas/icn-daaas.yaml @@ -19,11 +19,25 @@ name: icn-daaas project: 'icn/daaas' project-name: icn-daaas - build-node: icn-dev + build-node: ubuntu1804-helm-8c-32g stream: - master: branch: master + type: + - golang: + path: microservices + script: |- + #!/bin/bash + cd $WORKSPACE/microservices + make all + - helm: + path: deploy + script: |- + #!/bin/bash + cd $WORKSPACE/deploy + make all jobs: - - akraino-project-stream-verify + - "{project-name}-{stream}-{type}-verify" + - "{project-name}-{stream}-{type}-merge" views: - project-view -- 2.16.6