Skip to content

Commit

Permalink
feat(ci): parallelize chart templating even more (#480)
Browse files Browse the repository at this point in the history
  • Loading branch information
cwrau authored Sep 26, 2023
1 parent de72cbc commit daad6f7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
14 changes: 10 additions & 4 deletions .github/scripts/create-values-diff.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,17 @@ function generateComment() {

mkdir "$originalResourcesDir" "$newResourcesDir"

"$SCRIPTS/templateGitHelmChart" -1 "$GITHUB_REPO_URL" "$chart" "${GITHUB_DEFAULT_BRANCH}" "$values" | yq -y -S >"$originalResourcesDir.yaml"
splitYamlIntoDir "$originalResourcesDir.yaml" "$originalResourcesDir"
(
"$SCRIPTS/templateGitHelmChart" -1 "$GITHUB_REPO_URL" "$chart" "${GITHUB_DEFAULT_BRANCH}" "$values" | yq -y -S >"$originalResourcesDir.yaml"
splitYamlIntoDir "$originalResourcesDir.yaml" "$originalResourcesDir"
) &

(
"$SCRIPTS/templateLocalHelmChart" -1 "$chart" "$values" | yq -y -S >"$newResourcesDir.yaml"
splitYamlIntoDir "$newResourcesDir.yaml" "$newResourcesDir"
) &

"$SCRIPTS/templateLocalHelmChart" -1 "$chart" "$values" | yq -y -S >"$newResourcesDir.yaml"
splitYamlIntoDir "$newResourcesDir.yaml" "$newResourcesDir"
wait
) &
done
wait
Expand Down
3 changes: 2 additions & 1 deletion .github/scripts/templateHelmChart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ function templateGitHelmRelease() {
git checkout -q "$gitRef"
) >/dev/null

helm dependency update "$tmpDir/$gitPath" >/dev/null
source <(helm env)
flock --close "${HELM_REPOSITORY_CACHE}" helm dependency update "$tmpDir/$gitPath" >/dev/null
helm template ${namespace:+--namespace "$namespace"} "$releaseName" "$tmpDir/$gitPath" --values <(if [[ -f "$values" ]]; then cat "$values"; else echo "$values"; fi)
}

Expand Down

0 comments on commit daad6f7

Please sign in to comment.