Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: do not change timestamps for already existing helm charts #992

Merged
merged 1 commit into from
Oct 8, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions ci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -213,16 +213,29 @@ function push_docker_image() {
function push_helm_chart() {
local version="$1"

local sync_dir="${TRAVIS_BUILD_DIR}-helm-sync"

echo "Pushing new Helm Chart release $version"
set -x

git checkout -- .
sudo helm init --client-only
sudo helm repo add falcosecurity https://falcosecurity.github.io/charts
sudo helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
sudo helm package deploy/helm/sumologic --dependency-update --version="$version" --app-version="$version"

# due to helm repo index issue: https://github.com/helm/helm/issues/7363
# we need to create new package in a different dir, merge the index and move the package back
mkdir -p "${sync_dir}"
sudo helm package deploy/helm/sumologic --dependency-update --version="${version}" --app-version="${version}" --destination "${sync_dir}"

git fetch origin-repo
git checkout gh-pages
sudo helm repo index ./ --url https://sumologic.github.io/sumologic-kubernetes-collection/

sudo helm repo index --url https://sumologic.github.io/sumologic-kubernetes-collection/ --merge ./index.yaml "${sync_dir}"

mv -f "${sync_dir}"/* .
rmdir "${sync_dir}"

git add -A
git commit -m "Push new Helm Chart release $version"
git push --quiet origin-repo gh-pages
Expand Down