From 22b3b6683879ca89123486f9d50e665243df8052 Mon Sep 17 00:00:00 2001 From: Iain Sproat <68657+iainsproat@users.noreply.github.com> Date: Wed, 8 Feb 2023 18:57:36 +0000 Subject: [PATCH] fix(.circleci): amendments to circleci for publishing helm chart --- .circleci/config.yml | 2 ++ .circleci/package_and_publish_helm.sh | 7 ++++++- README.md | 7 ++++++- charts/{ => seq-input-gelf}/.gitkeep | 0 4 files changed, 14 insertions(+), 2 deletions(-) rename charts/{ => seq-input-gelf}/.gitkeep (100%) diff --git a/.circleci/config.yml b/.circleci/config.yml index b31cce1..2d5a475 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -98,3 +98,5 @@ jobs: - run: name: Build and Publish command: ./.circleci/package_and_publish_helm.sh + environment: + APP_VERSION: '3.0.441-x64' diff --git a/.circleci/package_and_publish_helm.sh b/.circleci/package_and_publish_helm.sh index 4392626..88c50c5 100755 --- a/.circleci/package_and_publish_helm.sh +++ b/.circleci/package_and_publish_helm.sh @@ -12,6 +12,11 @@ if [[ -z "${VERSION}" ]]; then exit 1 fi +if [[ -z "${APP_VERSION}" ]]; then + echo "APP_VERSION environment variable should be set" + exit 1 +fi + if [[ -z "${GIT_EMAIL}" ]]; then echo "GIT_EMAIL environment variable should be set" exit 1 @@ -30,7 +35,7 @@ helm version -c echo "🏗️ building dependencies" helm dependency build "${HELM_CHART_DIR_PATH}" echo "🎁 packaging ${HELM_CHART_DIR_PATH} with version: ${VERSION}" -helm package "${HELM_CHART_DIR_PATH}" --dependency-update --version "${VERSION}" --app-version "${VERSION}" --destination "${TEMP_PACKAGE_DIR}" +helm package "${HELM_CHART_DIR_PATH}" --dependency-update --version "${VERSION}" --app-version "${APP_VERSION}" --destination "${TEMP_PACKAGE_DIR}" echo "⏬ checking out git branch '${HELM_PACKAGE_BRANCH}'" git config user.email "${GIT_EMAIL}" diff --git a/README.md b/README.md index 601bc9c..04977da 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,12 @@ Comprehensive developer and user documentation can be found in our: 1. You will require [Helm](https://helm.sh/docs/intro/install/) and access to a [Kubernetes](https://kubernetes.io/) cluster to which you have appropriate permissions to deploy resources. 1. Clone this repository and in a shell terminal, `cd` in to the root directory of the cloned repository. -1. Edit the file `./example/values.yaml` to include your API key for seq. +1. Run the following command to create a secret containing your deployment key, replacing `YOURAPIKEY` with an [API key generated by your Seq instance](https://docs.datalust.co/docs/api-keys): + + ```shell + kubectl create secret generic seq-api-key --from-value=api-key=YOURAPIKEY --namespace seq-input-gelf + ``` + 1. Run the following command to install the helm chart in your kubernetes cluster. Note that this will create a new namespace named `seq-input-gelf`: ```shell diff --git a/charts/.gitkeep b/charts/seq-input-gelf/.gitkeep similarity index 100% rename from charts/.gitkeep rename to charts/seq-input-gelf/.gitkeep