CI: Install helm 3.7.1 for packer build 44/98544/1
authorAnil Belur <abelur@linuxfoundation.org>
Tue, 16 Nov 2021 06:20:21 +0000 (16:20 +1000)
committerAnil Belur <abelur@linuxfoundation.org>
Tue, 16 Nov 2021 06:20:21 +0000 (16:20 +1000)
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
Change-Id: I130a15af668a52712598b68ea24b10b4247ba613

packer/provision/helm.yaml

index 99dcda9475866694cc312495ce7e7316919a5c29..cac1ffaeec8901e36fc165c58fb5dc7fa8de4870 100644 (file)
@@ -10,6 +10,7 @@
     helm_version: 2.16.6
     helm3_3_version: 3.3.4
     helm3_5_version: 3.5.1
+    helm3_7_version: 3.7.1
     chartmuseum_version: 0.12.0
 
   tasks:
@@ -94,7 +95,6 @@
           command: "which helm3.5"
         - name: "Check kubectl {{kubectl_version}}"
           command: "which kubectl"
-
         - name: "Install Helm 3.5"
           shell: |
             echo "----> Installing helm3.5"
             which helm3.5
           become: true
 
+    - name: "Install Helm3.7 {{helm3_7_version}}"
+      block:
+        - name: "Create directory /tmp/helm3.7"
+          file:
+            path: /tmp/helm3.7
+            state: directory
+        - name: "Fetch tar.gz for Helm 3.7"
+          get_url:
+            url: "https://get.helm.sh/helm-v{{helm3_7_version}}-linux-amd64.tar.gz"
+            dest: /tmp/helm3.7
+        - name: "Unarchive Helm 3.7"
+          unarchive:
+            src: "/tmp/helm3.7/helm-v{{helm3_7_version}}-linux-amd64.tar.gz"
+            dest: /tmp/helm3.7
+            remote_src: true
+          become: yes
+        - name: "Move Helm 3.7 bin to /usr/local/bin and set as executable"
+          command: "mv /tmp/helm3.7/linux-amd64/helm /usr/local/bin/helm3.7"
+          become: yes
+        - name: "Check Helm 3.7"
+          command: "which helm3.7"
+        - name: "Check kubectl {{kubectl_version}}"
+          command: "which kubectl"
+        - name: "Install Helm 3.7"
+          shell: |
+            echo "----> Installing helm3.7"
+            wget 'https://get.helm.sh/helm-v{{helm3_7_version}}-linux-amd64.tar.gz'
+            tar -xvf 'https://get.helm.sh/helm-v{{helm3_7_version}}-linux-amd64.tar.gz'
+            mv linux-amd64/helm /usr/local/bin/helm3.7
+            which helm3.7
+          become: true
+
     - name: "Install ChartMuseum {{chartmuseum_version}}"
       block:
         - name: "Fetch bin for ChartMuseum"