[OOM] Fix helm3.x job generation 57/117857/5
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>
Wed, 17 Feb 2021 12:49:17 +0000 (13:49 +0100)
committerSylvain Desbureaux <sylvain.desbureaux@orange.com>
Wed, 17 Feb 2021 12:49:17 +0000 (13:49 +0100)
It appeared that helm3.x job generation wasn't good.
This patch takes another approach that should help with that.

Issue-ID: OOM-1
Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com>
Change-Id: I80a841f82195ee2975023fda34d23e4cf11185fa

jjb/aai/aai-oom.yaml
jjb/global-templates-helm.yaml
jjb/oom/oom-helm.yaml

index 2b87b1c..e60cd01 100644 (file)
@@ -17,8 +17,6 @@
           post_build_script: !include-raw-escape: shell/publish_helm_charts.sh
           files: '**'
     stream:
-      - 'master':
-          branch: 'master'
       - 'guilin':
           branch: 'guilin'
 
         #!/bin/bash
         set -e -o pipefail
         cd kubernetes/
-        make HELM_BIN=helm3 all
+        make HELM_BIN=helm3.3 all
     build_script: |
         #!/bin/bash
         cd kubernetes/
-        make HELM_BIN=helm3 common
-        make HELM_BIN=helm3 {helm-module}
+        make HELM_BIN=helm3.3 common
+        make HELM_BIN=helm3.3 {helm-module}
     oom_post_build_script: !include-raw-escape: shell/publish_helm_charts.sh
index 7d4541f..4f7db33 100644 (file)
 # JOB TEMPLATES #
 #################
 - job-template:
-    name: '{project-name}-{stream}-verify-helm'
+    name: '{project-name}-{stream}-verify-{helm_bin}'
     # Job template for helm verify jobs
 
     <<: *helm_job_boiler_plate
     concurrent: true
-    helm_bin: helm3
 
     scm:
       - gerrit-trigger-scm:
@@ -75,8 +74,8 @@
 
     builders:
       - lf-infra-pre-build
-      - inject:
-          properties-content: 'HELM_BIN={helm_bin}'
+      - shell: |
+          echo "export HELM_BIN={helm_bin}" > helm.prop
       - shell: '{obj:pre_build_script}'
       - shell: '{obj:build_script}'
 
       - lf-provide-maven-settings:
           global-settings-file: '{mvn-global-settings}'
           settings-file: '{mvn-settings}'
+      - shell: |
+          echo "export HELM_BIN=helm3.5" > helm.prop
       - shell: '{obj:pre_build_script}'
       - shell: '{obj:build_script}'
       - lf-infra-create-netrc:
       - inject:
           properties-content: 'HELM_MODULE={helm-module}'
       - shell: !include-raw-escape: shell/apply-submodule-patch-oom.sh
+      - shell: |
+          echo "export HELM_BIN=helm3.5" > helm.prop
       - shell: '{obj:pre_build_script}'
       - shell: '{obj:build_script}'
 
       - lf-provide-maven-settings:
           global-settings-file: 'global-settings'
           settings-file: '{mvn-settings}'
+      - shell: |
+          echo "export HELM_BIN=helm3.5" > helm.prop
       - shell: '{obj:pre_build_script}'
       - shell: '{obj:build_script}'
       - lf-infra-create-netrc:
       - lf-provide-maven-settings:
           global-settings-file: '{mvn-global-settings}'
           settings-file: '{mvn-settings}'
+      - shell: |
+          echo "export HELM_BIN=helm3.5" > helm.prop
       - shell: '{obj:pre_build_script}'
       - shell: '{obj:build_script}'
       - lf-infra-create-netrc:
     disabled: true
     builders:
       - lf-infra-pre-build
+      - shell: |
+          echo "export HELM_BIN=helm3.5" > helm.prop
       - shell: '{pre_build_script}'
       - shell: '{build_script}'
       - shell: '{post_build_script}'
     disabled: true
     builders:
       - lf-infra-pre-build
+      - shell: |
+          echo "export HELM_BIN=helm3.5" > helm.prop
       - shell: '{pre_build_script}'
       - shell: '{build_script}'
       - shell: '{post_build_script}'
 
     builders:
       - lf-infra-pre-build
+      - shell: |
+          echo "export HELM_BIN=helm3.5" > helm.prop
       - shell: '{pre_build_script}'
       - shell: '{build_script}'
       - shell: '{post_build_script}'
index 6a3fed2..eeeab15 100644 (file)
     pre_build_script: !include-raw-escape: shell/helm-repo-init.sh
     oom_build_script: |
       #!/bin/bash
+      source helm.prop
       set -e -o pipefail
       cd kubernetes/
-      make all
+      make HELM_BIN=$HELM_BIN all
     subproject_build_script: |
       #!/bin/bash
       cd kubernetes/
-      make common
-      make {subproject}
+      make HELM_BIN=$HELM_BIN common
+      make HELM_BIN=$HELM_BIN {subproject}
 
     stream:
       - "master":
       - "robot":
           files: "kubernetes/robot/**"
 
+    helm_bin:
+      - helm3.5
+      - helm3.3
+
+    exclude:
+      - stream: guilin
+        helm_bin: helm3.5
+      - stream: frankfurt
+        helm_bin: helm3.5
+      - stream: frankfurt
+        helm_bin: helm3.3
+      - stream: dublin
+        helm_bin: helm3.5
+      - stream: dublin
+        helm_bin: helm3.3
+      - stream: casablanca
+        helm_bin: helm3.5
+      - stream: casablanca
+        helm_bin: helm3.3
     jobs:
       - "{project-name}-{stream}-image-verify":
           files: "**"
       - "{project-name}-{stream}-verify-helm2":
           files: "**"
           build-timeout: 360
-      - "{project-name}-{stream}-verify-helm":
-          build_script: "{oom_build_script}"
-          files: "**"
-          build-timeout: 360
-          stream: master
-      - "{project-name}-{stream}-verify-helm":
+      - "{project-name}-{stream}-verify-{helm_bin}":
           build_script: "{oom_build_script}"
           files: "**"
           build-timeout: 360
-          stream: guilin
-          helm_bin: "helm3.3"
       - "{project-name}-{stream}-merge-helm":
           build_script: "{oom_build_script}"
           files: "**"