From abff9c06663aa57e4e078d36595498c8c606e5a7 Mon Sep 17 00:00:00 2001 From: Jessica Wagantall Date: Mon, 8 Apr 2019 16:35:10 -0700 Subject: Add external verify job for HELM This new verify job will: - Apply to code transfered outside OOM repo into the tech team's repos. - Get triggered by any submitted changes in /oom repos. - Apply the change in oom/kubernetes/ - Run a helm verify Change-Id: I4bd60f946351623583589d7689343fbfc826237a Issue-ID: CIMAN-250 Signed-off-by: Jessica Wagantall --- jjb/aai/aai-oom.yaml | 36 +++++++++++++++++++++++++++++++++++ jjb/global-templates-helm.yaml | 43 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 jjb/aai/aai-oom.yaml (limited to 'jjb') diff --git a/jjb/aai/aai-oom.yaml b/jjb/aai/aai-oom.yaml new file mode 100644 index 000000000..7581e773b --- /dev/null +++ b/jjb/aai/aai-oom.yaml @@ -0,0 +1,36 @@ +--- +- project: + name: aai-oom-project-view + project-name: aai-oom + views: + - project-view + +- project: + name: aai-oom + helm-module: 'aai' + project-name: 'aai-oom' + project: 'aai/oom' + jobs: + - '{project-name}-{stream}-verify-external-helm' + stream: + - 'master': + branch: 'master' + mvn-settings: 'aai-oom-settings' + files: '**' + archive-artifacts: '' + build-node: ubuntu1604-helm-2c-1g + pre_build_script: !include-raw-escape: shell/helm-repo-init.sh + oom_build_script: | + #!/bin/bash + set -e -o pipefail + cd kubernetes/ + make all + subproject_build_script: | + #!/bin/bash + cd kubernetes/ + make common + make {subproject} + oom_post_build_script: !include-raw-escape: shell/publish_helm_charts.sh + subproject: + - 'aai': + files: 'kubernetes/aai/**' diff --git a/jjb/global-templates-helm.yaml b/jjb/global-templates-helm.yaml index 6c139ddb8..1cff01a0d 100644 --- a/jjb/global-templates-helm.yaml +++ b/jjb/global-templates-helm.yaml @@ -13,9 +13,11 @@ submodule-recursive: true # default params for helm jobs - pre_build_script: '' build_script: '' + git-url: '$GIT_URL/$PROJECT' post_build_script: '' + pre_build_script: '' + submodule-recursive: true submodule-timeout: 10 ##################### @@ -106,6 +108,45 @@ - shell: '{obj:post_build_script}' - lf-provide-maven-settings-cleanup +- job-template: + name: '{project-name}-{stream}-verify-external-helm' + # Job template for helm verify jobs + + <<: *helm_job_boiler_plate + + parameters: + - lf-infra-parameters: + branch: '{branch}' + project: 'oom' + stream: '{stream}' + lftools-version: '{lftools-version}' + + scm: + - lf-infra-gerrit-scm: + jenkins-ssh-credential: '{jenkins-ssh-credential}' + git-url: '{git-url}' + refspec: '$GERRIT_BRANCH' + branch: '$GERRIT_BRANCH' + submodule-recursive: '{submodule-recursive}' + submodule-timeout: '{submodule-timeout}' + choosing-strategy: default + + triggers: + - gerrit-trigger-helm-patch-submitted: + status-context: '{project}-Helm-Verify' + server: '{server-name}' + project: '{project}' + branch: '{branch}' + files: '{files}' + + builders: + - lf-infra-pre-build + - inject: + properties-content: 'HELM_MODULE={helm-module}' + - shell: !include-raw-escape: shell/apply-submodule-patch-oom.sh + - shell: '{obj:pre_build_script}' + - shell: '{obj:build_script}' + - job-template: name: '{project-name}-{stream}-stage-helm' # Job template for Helm stage jobs -- cgit 1.2.3-korg