From cd1ff20087a3338ca0c62c96b8fab47b77d3bc07 Mon Sep 17 00:00:00 2001 From: "jeff.kim" Date: Tue, 24 Nov 2020 12:08:13 +0900 Subject: [PATCH 1/4] Add helm3 url --- src/commands/install-helm-client.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/commands/install-helm-client.yml b/src/commands/install-helm-client.yml index 421e137..b3d0bd5 100644 --- a/src/commands/install-helm-client.yml +++ b/src/commands/install-helm-client.yml @@ -28,6 +28,10 @@ steps: fi fi INSTALL_SCRIPT="https://raw.githubusercontent.com/helm/helm/master/scripts/get" + if [ "${IS_VERSION_2}" == "false" ]; then + INSTALL_SCRIPT="https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3" + fi + curl "${INSTALL_SCRIPT}" > get_helm.sh chmod 700 get_helm.sh ./get_helm.sh "$@" From 31e6edbed749fe121168513e9b68a027a7b74372 Mon Sep 17 00:00:00 2001 From: Stella Lok Date: Thu, 26 Nov 2020 20:57:52 +0800 Subject: [PATCH 2/4] fix integration test --- .circleci/config.yml | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 723d222..7ab7e9e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -48,7 +48,7 @@ jobs: parameters: release-name: type: string - default: "grafana-release" + default: "prometheus-release" cluster-name: type: string description: Cluster name @@ -65,9 +65,13 @@ jobs: - aws-eks/update-kubeconfig-with-authenticator: cluster-name: << parameters.cluster-name >> install-kubectl: true + - run: + name: Install cncf stable repo + command: | + helm repo add stable http://cncf.gitlab.io/stable - helm/install-helm-chart: - chart: stable/grafana - release-name: grafana-release + chart: stable/prometheus + release-name: prometheus-release helm-version: << parameters.helm-version >> update-repositories: << parameters.update-repositories >> upgrade-helm-chart-on-eks-cluster: @@ -89,9 +93,13 @@ jobs: - aws-eks/update-kubeconfig-with-authenticator: cluster-name: << parameters.cluster-name >> install-kubectl: true + - run: + name: Install cncf stable repo + command: | + helm repo add stable http://cncf.gitlab.io/stable - helm/upgrade-helm-chart: - chart: stable/grafana - release-name: grafana-release + chart: stable/prometheus + release-name: prometheus-release helm-version: << parameters.helm-version >> update-repositories: << parameters.update-repositories >> # test specifying no-output-timeout @@ -113,8 +121,12 @@ jobs: - aws-eks/update-kubeconfig-with-authenticator: cluster-name: << parameters.cluster-name >> install-kubectl: true + - run: + name: Install cncf stable repo + command: | + helm repo add stable http://cncf.gitlab.io/stable - helm/delete-helm-release: - release-name: grafana-release + release-name: prometheus-release purge: true timeout: << parameters.timeout >> helm-version: << parameters.helm-version >> From 59f0109fc48fc7c626c90c88e40f60aaa2d9cad2 Mon Sep 17 00:00:00 2001 From: Stella Lok Date: Fri, 27 Nov 2020 01:21:36 +0800 Subject: [PATCH 3/4] fix test --- .circleci/config.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7ab7e9e..8d9c5dc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -65,6 +65,8 @@ jobs: - aws-eks/update-kubeconfig-with-authenticator: cluster-name: << parameters.cluster-name >> install-kubectl: true + - helm/install-helm-client: + version: << parameters.helm-version >> - run: name: Install cncf stable repo command: | @@ -93,6 +95,8 @@ jobs: - aws-eks/update-kubeconfig-with-authenticator: cluster-name: << parameters.cluster-name >> install-kubectl: true + - helm/install-helm-client: + version: << parameters.helm-version >> - run: name: Install cncf stable repo command: | @@ -121,6 +125,8 @@ jobs: - aws-eks/update-kubeconfig-with-authenticator: cluster-name: << parameters.cluster-name >> install-kubectl: true + - helm/install-helm-client: + version: << parameters.helm-version >> - run: name: Install cncf stable repo command: | From 18d9b0b643eb5725f3eaf9d0c257343da4033577 Mon Sep 17 00:00:00 2001 From: Stella Lok Date: Fri, 27 Nov 2020 13:20:49 +0800 Subject: [PATCH 4/4] update readme and example --- README.md | 75 +------------------ .../install-helm-chart-with-helm2.yml | 18 ++++- 2 files changed, 18 insertions(+), 75 deletions(-) diff --git a/README.md b/README.md index d3890d3..4d7e3f6 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,10 @@ -# helm Orb [![CircleCI status](https://circleci.com/gh/CircleCI-Public/helm-orb.svg "CircleCI status")](https://circleci.com/gh/CircleCI-Public/helm-orb) [![CircleCI Orb Version](https://img.shields.io/badge/endpoint.svg?url=https://badges.circleci.io/orb/circleci/helm)](https://circleci.com/orbs/registry/orb/circleci/helm) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/CircleCI-Public/helm-orb/blob/master/LICENSE) [![CircleCI Community](https://img.shields.io/badge/community-CircleCI%20Discuss-343434.svg)](https://discuss.circleci.com/c/ecosystem/orbs) +# helm Orb [![CircleCI status](https://circleci.com/gh/CircleCI-Public/helm-orb.svg "CircleCI status")](https://circleci.com/gh/CircleCI-Public/helm-orb) [![CircleCI Orb Version](https://img.shields.io/badge/endpoint.svg?url=https://badges.circleci.io/orb/circleci/helm)](https://circleci.com/developer/orbs/orb/circleci/helm) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/CircleCI-Public/helm-orb/blob/master/LICENSE) [![CircleCI Community](https://img.shields.io/badge/community-CircleCI%20Discuss-343434.svg)](https://discuss.circleci.com/c/ecosystem/orbs) A CircleCI Orb to simplify deployments to Kubernetes using Helm. Here are the features that the Helm orb provides: - Installing the helm client (`install-helm-client`) -- Installing helm on a cluster (`install-helm-on-cluster`) - Installing helm charts (`install-helm-chart`) and deleting releases (`delete-helm-release`) Table of Contents @@ -17,7 +16,7 @@ Table of Contents ## Usage -See the [orb registry listing](http://circleci.com/orbs/registry/orb/circleci/helm) for usage guidelines. +See the [orb registry listing](https://circleci.com/developer/orbs/orb/circleci/helm) for usage guidelines. ## Requirements @@ -25,75 +24,7 @@ See the [orb registry listing](http://circleci.com/orbs/registry/orb/circleci/he ## Examples -``` -version: 2.1 - -orbs: - aws-eks: circleci/aws-eks@0.2.1 - helm: circleci/helm@0.1.1 - -jobs: - install-helm-on-cluster: - executor: aws-eks/python - parameters: - cluster-name: - type: string - description: Cluster name - steps: - - aws-eks/update-kubeconfig-with-authenticator: - cluster-name: << parameters.cluster-name >> - install-kubectl: true - - helm/install-helm-on-cluster: - enable-cluster-wide-admin-access: true - install-helm-chart: - executor: aws-eks/python - parameters: - cluster-name: - type: string - description: Cluster name - steps: - - aws-eks/update-kubeconfig-with-authenticator: - cluster-name: << parameters.cluster-name >> - - helm/install-helm-chart: - chart: stable/grafana - release-name: grafana-release - delete-helm-release: - executor: aws-eks/python - parameters: - cluster-name: - type: string - description: Cluster name - steps: - - aws-eks/update-kubeconfig-with-authenticator: - cluster-name: << parameters.cluster-name >> - - helm/delete-helm-release: - release-name: grafana-release - purge: true - timeout: 600 - -workflows: - deployment: - jobs: - - aws-eks/create-cluster: - cluster-name: test-cluster - - install-helm-on-cluster: - cluster-name: test-cluster - requires: - - aws-eks/create-cluster - - install-helm-chart: - cluster-name: test-cluster - requires: - - install-helm-on-cluster - - delete-helm-release: - cluster-name: test-cluster - requires: - - install-helm-chart - - aws-eks/delete-cluster: - cluster-name: test-cluster - wait: true - requires: - - delete-helm-release -``` +Refer to the usage examples [here](https://circleci.com/developer/orbs/orb/circleci/helm#usage-install-helm-chart-with-helm3). ## Contributing diff --git a/src/examples/install-helm-chart-with-helm2.yml b/src/examples/install-helm-chart-with-helm2.yml index 6075c3c..d10ec46 100644 --- a/src/examples/install-helm-chart-with-helm2.yml +++ b/src/examples/install-helm-chart-with-helm2.yml @@ -31,9 +31,15 @@ usage: steps: - aws-eks/update-kubeconfig-with-authenticator: cluster-name: << parameters.cluster-name >> + - helm/install-helm-client: + version: v2.16.9 + - run: + name: Add cncf stable repo + command: | + helm repo add stable http://cncf.gitlab.io/stable - helm/install-helm-chart: - chart: stable/grafana - release-name: grafana-release + chart: stable/prometheus + release-name: prometheus-release delete-helm-release: executor: aws-eks/python parameters: @@ -43,8 +49,14 @@ usage: steps: - aws-eks/update-kubeconfig-with-authenticator: cluster-name: << parameters.cluster-name >> + - helm/install-helm-client: + version: v2.16.9 + - run: + name: Add cncf stable repo + command: | + helm repo add stable http://cncf.gitlab.io/stable - helm/delete-helm-release: - release-name: grafana-release + release-name: prometheus-release purge: true timeout: 600