Skip to content

Commit

Permalink
Merge pull request #141 from weaveworks/renovate/kafka-14.x
Browse files Browse the repository at this point in the history
Update Helm release kafka to v14.9.3
  • Loading branch information
sbernheim authored May 11, 2022
2 parents da96bb2 + 981c6cc commit b5124a9
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 21 deletions.
33 changes: 23 additions & 10 deletions .bin/test-platform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,32 +16,45 @@ else
exit 1
fi

TLC_FILE="/tmp/$INFRASTRUCTURE-top-layer-changed"
[ -f $TLC_FILE ] && top=$(cat $TLC_FILE) || echo "no top layer file '$TLC_FILE'"
[ -n "$top" ] && echo "the top layer changed is $top"

cat /tmp/layers-sorted | while read layer || [[ -n $layer ]];
do
echo current layer is $layer
if [ -f /tmp/$layer-$INFRASTRUCTURE ]; then
charts_in_layer=$(cat /tmp/$layer-$INFRASTRUCTURE)
[ -f /tmp/$layer-$INFRASTRUCTURE-changed ] && charts_changed_in_layer=$(cat /tmp/$layer-$INFRASTRUCTURE-changed)
CHARTS_CHANGED_FILE="/tmp/$layer-$INFRASTRUCTURE-changed "
if [ -f /tmp/$layer-$INFRASTRUCTURE-changed ]; then
echo Testing changed on $INFRASTRUCTURE in layer: $layer
echo "Testing changes on $INFRASTRUCTURE in layer: $layer"
charts_changed_in_layer=$(cat /tmp/$layer-$INFRASTRUCTURE-changed)
ct install --config ct.yaml --charts $(awk '{print $1}' /tmp/$layer-$INFRASTRUCTURE-changed | paste -s -d, -)
else
echo "No changes to test on $INFRASTRUCTURE in layer $layer"
fi
top=$(cat /tmp/$INFRASTRUCTURE-top-layer-changed)
echo the top layer is $top
if [[ "$top" > "$layer" ]]; then
echo Installing layer: $layer
if [[ -n "$top" && "$top" > "$layer" ]]; then
echo "Installing layer: $layer"
charts_in_layer=$(cat /tmp/$layer-$INFRASTRUCTURE)
echo "Installing charts for layer $layer: ( $charts_in_layer )"
for dir in $charts_in_layer; do
release=${dir##*/}
helm dependency build $dir
echo Helm install: $release
helm install -n wego-system $release $dir
done
else
echo $layer is after $top
[ -n "$top" ] && echo "$layer is after $top"
echo "Skip installing layer $layer"
fi
fi
done
# Tests profiles without a layer
if [[ -f "/tmp/null-$INFRASTRUCTURE-changed" ]]; then
ct install --config ct.yaml --charts $(awk '{print $1}' /tmp/null-$INFRASTRUCTURE-changed | paste -s -d, -)
NO_LAYERS_FILE="/tmp/null-$INFRASTRUCTURE-changed"
echo "NO LAYERS FILE '$NO_LAYERS_FILE'"
if [ -f $NO_LAYERS_FILE ]; then
CHARTS_TO_TEST=$(awk '{print $1}' /tmp/null-$INFRASTRUCTURE-changed | paste -s -d, -)
echo "Testing charts without layers ( $CHARTS_TO_TEST )"
ct install --config ct.yaml --charts $CHARTS_TO_TEST
else
echo "No charts without layers to test - file not found $NO_LAYERS_FILE"
fi
31 changes: 25 additions & 6 deletions .github/workflows/helm-profiles-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

Expand Down Expand Up @@ -152,30 +152,48 @@ jobs:
done
done
done
- name: Authenticate to Google Cloud
id: 'auth'
if: steps.compile-and-sort-layers.outputs.gke-ci == 'true'
uses: google-github-actions/auth@v0
with:
credentials_json: ${{ secrets.GCP_SA_KEY }}

- name: Set up Google Cloud SDK
if: steps.compile-and-sort-layers.outputs.gke-ci == 'true'
uses: google-github-actions/setup-gcloud@v0
with:
project_id: ${{ secrets.GCP_PROJECT_ID }}
service_account_key: ${{ secrets.GCP_SA_KEY }}
export_default_credentials: true

- name: Update GKE Kubectl Auth Plugin
run: |
gcloud components install gke-gcloud-auth-plugin
- name: Create gke cluster
if: steps.compile-and-sort-layers.outputs.gke-ci == 'true'
shell: bash
env:
USE_GKE_GCLOUD_AUTH_PLUGIN: True
GKE_CLUSTER_NAME: profiles-${{ github.run_number }}
INFRASTRUCTURE: "gke"
run: |
make -f makefiles/Makefile create-cluster
- name: Spit the KUBECONFIG file
if: steps.compile-and-sort-layers.outputs.gke-ci == 'true'
shell: bash
run: |
cat ~/.kube/config
- name: Create wego-system namespace (gke)
if: steps.compile-and-sort-layers.outputs.gke-ci == 'true'
env:
USE_GKE_GCLOUD_AUTH_PLUGIN: True
run: kubectl create namespace wego-system

- name: Run chart-testing on gke (install)
if: steps.compile-and-sort-layers.outputs.gke-ci == 'true'
env:
USE_GKE_GCLOUD_AUTH_PLUGIN: True
INFRASTRUCTURE: "gke"
run: |
make -f makefiles/Makefile test
Expand All @@ -184,6 +202,7 @@ jobs:
if: ${{ always() && steps.compile-and-sort-layers.outputs.gke-ci == 'true' }}
shell: bash
env:
USE_GKE_GCLOUD_AUTH_PLUGIN: True
GKE_CLUSTER_NAME: profiles-${{ github.run_number }}
INFRASTRUCTURE: "gke"
run: |
Expand Down Expand Up @@ -450,4 +469,4 @@ jobs:
CLUSTER_NAME: profiles-${{ github.run_number }}
INFRASTRUCTURE: "eks"
run: |
make -f makefiles/Makefile delete-cluster
make -f makefiles/Makefile delete-cluster
6 changes: 3 additions & 3 deletions charts/kafka/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: kafka
repository: https://charts.bitnami.com/bitnami
version: 14.4.1
digest: sha256:142170a1763beeee3f2021d9c40e0e0b9057ac9e4ac16e742dae3e5c5e635202
generated: "2021-12-02T10:53:10.213833-05:00"
version: 14.9.3
digest: sha256:4f268331010ca26ee4cf39a8262cec8ca8b9897ad47f04497269c51e1cb9f175
generated: "2022-03-23T17:36:18.017691424Z"
4 changes: 2 additions & 2 deletions charts/kafka/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: kafka
icon: https://bitnami.com/assets/stacks/kafka/img/kafka-stack-220x234.png
description: A Weaveworks Helm chart for Bitnami Kafka
type: application
version: 0.0.3
version: 0.0.4
kubeVersion: ">=1.16.0-0"
home: https://github.com/weaveworks/profiles-catalog
sources:
Expand Down Expand Up @@ -32,5 +32,5 @@ annotations:
dependencies:
- name: kafka
version: "14.4.1"
version: "14.9.3"
repository: "https://charts.bitnami.com/bitnami"

0 comments on commit b5124a9

Please sign in to comment.