Skip to content

Commit 7eb229f

Browse files
author
Justin Lai
authored
Merge pull request #74 from weaveworks/charts-ci
Update CI to include testing on GKE
2 parents ad04e5f + 1bd9959 commit 7eb229f

File tree

17 files changed

+103
-29
lines changed

17 files changed

+103
-29
lines changed

.github/workflows/helm-profiles-test.yaml

+48-8
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,20 @@ jobs:
2828
id: list-changed
2929
run: |
3030
changed=$(ct list-changed --config ct.yaml)
31-
if [[ -n "$changed" ]]; then
32-
echo "::set-output name=changed::true"
33-
fi
31+
touch /tmp/kind-ci
32+
touch /tmp/gke-ci
33+
for dir in $changed; do
34+
if [[ $(yq e '.annotations."weave.works/profile-ci"|contains("kind")' $dir/Chart.yaml) = "true" ]]; then
35+
echo $dir >> /tmp/kind-ci
36+
echo "::set-output name=kind-ci::true"
37+
fi
38+
if [[ $(yq e '.annotations."weave.works/profile-ci"|contains("gke")' $dir/Chart.yaml) = "true" ]]; then
39+
echo $dir >> /tmp/gke-ci
40+
echo "::set-output name=gke-ci::true"
41+
fi
42+
done
3443
35-
- name: Add dependencies
44+
- name: Add helm dependencies
3645
shell: bash
3746
run: |
3847
for dir in $(ls -d charts/*/ | cut -f2 -d'/'); do
@@ -49,13 +58,44 @@ jobs:
4958
done
5059
done
5160
done
52-
61+
5362
- name: Run chart-testing (lint)
5463
run: ct lint --config ct.yaml
5564

5665
- name: Create kind cluster
66+
if: steps.list-changed.outputs.kind-ci == 'true'
5767
uses: helm/[email protected]
58-
if: steps.list-changed.outputs.changed == 'true'
5968

60-
- name: Run chart-testing (install)
61-
run: ct install --config ct.yaml
69+
- name: Run chart-testing on Kind (install)
70+
if: steps.list-changed.outputs.kind-ci == 'true'
71+
run: ct install --config ct.yaml --charts $(awk '{print $1}' /tmp/kind-ci | paste -s -d, -)
72+
73+
- name: Set up Google Cloud SDK
74+
if: steps.list-changed.outputs.gke-ci == 'true'
75+
uses: google-github-actions/setup-gcloud@master
76+
with:
77+
project_id: ${{ secrets.GCP_PROJECT_ID }}
78+
service_account_key: ${{ secrets.GCP_SA_KEY }}
79+
export_default_credentials: true
80+
81+
- name: Create gke cluster
82+
if: steps.list-changed.outputs.gke-ci == 'true'
83+
shell: bash
84+
env:
85+
GKE_CLUSTER_NAME: profiles-test-mgmt-${{ github.head_ref }}-${{ github.run_number }}
86+
INFRASTRUCTURE: "gke"
87+
run: |
88+
make create-cluster
89+
90+
- name: Run chart-testing on gke (install)
91+
if: steps.list-changed.outputs.gke-ci == 'true'
92+
run: ct install --config ct.yaml --charts $(awk '{print $1}' /tmp/gke-ci | paste -s -d, -)
93+
94+
- name: Delete gke cluster
95+
if: steps.list-changed.outputs.gke-ci == 'true'
96+
shell: bash
97+
env:
98+
GKE_CLUSTER_NAME: profiles-test-mgmt-${{ github.head_ref }}-${{ github.run_number }}
99+
INFRASTRUCTURE: "gke"
100+
run: |
101+
make delete-cluster

charts/dex/Chart.yaml

+4-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: dex
33
icon: https://dexidp.io/img/logos/dex-horizontal-color.png
44
description: A Weaveworks Helm chart for OpenID Connect (OIDC)
55
type: application
6-
version: 0.0.7
6+
version: 0.0.8
77
kubeVersion: ">=1.16.0-0"
88
home: https://github.com/weaveworks/profiles-catalog
99
sources:
@@ -25,6 +25,9 @@ annotations:
2525
url: https://github.com/dexidp/helm-charts
2626
- name: Upstream Project
2727
url: https://github.com/dexidp/dex
28+
"weave.works/profile-ci": |
29+
- "gke"
30+
- "kind"
2831
2932
dependencies:
3033
- name: dex

charts/ingress-nginx/Chart.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: ingress-nginx
33
icon: https://raw.githubusercontent.com/prometheus/prometheus.github.io/master/assets/prometheus_logo-cb55bb5c346.png
44
description: A Weaveworks Helm chart for ingress-nginx
55
type: application
6-
version: 0.0.5
6+
version: 0.0.6
77
kubeVersion: ">=1.16.0-0"
88
home: https://github.com/weaveworks/profiles-catalog
99
sources:
@@ -26,6 +26,8 @@ annotations:
2626
url: https://kubernetes.github.io/ingress-nginx
2727
- name: Upstream Project
2828
url: https://github.com/kubernetes/ingress-nginx/tree/main/charts/ingress-nginx
29+
"weave.works/profile-ci": |
30+
- "gke"
2931
3032
dependencies:
3133
- name: ingress-nginx

charts/magalix-agent/Chart.yaml

+8-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: magalix-agent
33
icon: https://www.magalix.com/hubfs/Imported%20images/logo-02.png%3Fwidth=560%26name=logo-02-Dec-18-2020-11-24-41-75-AM.png
44
description: A Weaveworks Helm chart for Magalix policy agent
55
type: application
6-
version: 0.0.10
6+
version: 0.0.11
77
kubeVersion: ">=1.16.0-0"
88
home: https://github.com/weaveworks/profiles-catalog
99
sources:
@@ -13,9 +13,16 @@ keywords:
1313
- magalix
1414
- policy
1515

16+
maintainers:
17+
- name: Weaveworks
18+
19+
1620
annotations:
1721
"weave.works/profile": magalix
1822
"weave.works/operator": "true"
1923
"weave.works/links": |
2024
- name: Upstream Project
2125
url: https://github.com/MagalixCorp/magalix-agent
26+
"weave.works/profile-ci": |
27+
- "gke"
28+
- "kind"
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
dependencies:
22
- name: servicemesh
33
repository: file://../servicemesh
4-
version: 0.0.6
4+
version: 0.0.7
55
- name: kube-prometheus-stack
66
repository: https://prometheus-community.github.io/helm-charts
77
version: 19.2.2
8-
digest: sha256:8510f850a0058e23f6dcaf9903cf5f0f5a71b4235a8dcf9a4e830cff6a922190
9-
generated: "2021-11-05T09:30:09.330781-04:00"
8+
digest: sha256:be4a9dfa1f3ea492f4dbadf5f98df42814d3085f40d65b71ad632e3830dfb32a
9+
generated: "2021-11-09T15:58:32.475952-05:00"

charts/observability-dependency-sevice-mesh-example/Chart.yaml

+8-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: observability-dependency-sevice-mesh-example
33
icon: https://raw.githubusercontent.com/prometheus/prometheus.github.io/master/assets/prometheus_logo-cb55bb5c346.png
44
description: A Weaveworks Helm chart for observability-dependency-sevice-mesh-example
55
type: application
6-
version: 0.0.5
6+
version: 0.0.6
77
kubeVersion: ">=1.16.0-0"
88
home: https://github.com/weaveworks/profiles-catalog
99
sources:
@@ -16,6 +16,10 @@ keywords:
1616
- kube-prometheus
1717
- observability
1818

19+
maintainers:
20+
- name: Weaveworks
21+
22+
1923
annotations:
2024
"weave.works/profile": observability
2125
"weave.works/operator": "true"
@@ -24,6 +28,9 @@ annotations:
2428
url: https://github.com/prometheus-community/helm-charts
2529
- name: Upstream Project
2630
url: https://github.com/prometheus-operator/kube-prometheus
31+
"weave.works/profile-ci": |
32+
- "gke"
33+
- "kind"
2734
2835
dependencies:
2936
- name: servicemesh
Binary file not shown.

charts/observability-dependency-sevice-mesh-example/values.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ kube-prometheus-stack:
2020
serve_from_sub_path: true
2121
alertmanager:
2222
ingress:
23-
paths: [ "/alertmanager/?(.*)" ]
23+
paths: ["/alertmanager/?(.*)"]
2424
enabled: true
2525
annotations:
2626
kubernetes.io/ingress.class: nginx
2727
nginx.ingress.kubernetes.io/rewrite-target: /$1
28-
nginx.ingress.kubernetes.io/use-regex: "true"
28+
nginx.ingress.kubernetes.io/use-regex: "true"

charts/observability/Chart.yaml

+9-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: observability
33
icon: https://raw.githubusercontent.com/prometheus/prometheus.github.io/master/assets/prometheus_logo-cb55bb5c346.png
44
description: A Weaveworks Helm chart for observability
55
type: application
6-
version: 0.0.6
6+
version: 0.0.7
77
kubeVersion: ">=1.16.0-0"
88
home: https://github.com/weaveworks/profiles-catalog
99
sources:
@@ -24,9 +24,16 @@ annotations:
2424
url: https://github.com/prometheus-community/helm-charts
2525
- name: Upstream Project
2626
url: https://github.com/prometheus-operator/kube-prometheus
27+
"weave.works/profile-ci": |
28+
- "gke"
29+
- "kind"
30+
31+
maintainers:
32+
- name: Weaveworks
33+
2734

2835
dependencies:
2936
- name: kube-prometheus-stack
3037
version: "19.2.2"
3138
repository: "https://prometheus-community.github.io/helm-charts"
32-
condition: kube-prometheus-stack.enabled
39+
condition: kube-prometheus-stack.enabled

charts/observability/values.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ kube-prometheus-stack:
1212
serve_from_sub_path: true
1313
alertmanager:
1414
ingress:
15-
paths: [ "/alertmanager/?(.*)" ]
15+
paths: ["/alertmanager/?(.*)"]
1616
enabled: true
1717
annotations:
1818
kubernetes.io/ingress.class: nginx
1919
nginx.ingress.kubernetes.io/rewrite-target: /$1
20-
nginx.ingress.kubernetes.io/use-regex: "true"
20+
nginx.ingress.kubernetes.io/use-regex: "true"

charts/servicemesh/Chart.yaml

+8-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: servicemesh
33
icon: https://raw.githubusercontent.com/prometheus/prometheus.github.io/master/assets/prometheus_logo-cb55bb5c346.png
44
description: A Weaveworks Helm chart for service-mesh
55
type: application
6-
version: 0.0.6
6+
version: 0.0.7
77
kubeVersion: ">=1.16.0-0"
88
home: https://github.com/weaveworks/profiles-catalog
99
sources:
@@ -14,13 +14,20 @@ keywords:
1414
- servicemesh
1515
- linkerd
1616

17+
maintainers:
18+
- name: Weaveworks
19+
20+
1721
annotations:
1822
"weave.works/profile": ingress
1923
"weave.works/links": |
2024
- name: Chart Sources
2125
url: https://helm.linkerd.io/stable
2226
- name: Upstream Project
2327
url: https://github.com/linkerd/linkerd2
28+
"weave.works/profile-ci": |
29+
- "gke"
30+
- "kind"
2431
2532
dependencies:
2633
- name: cert-manager

charts/servicemesh/values.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
servicemesh:
32
enableControlPlaneAutoRotatingCerts: true
43
installCRDs: true
@@ -10,7 +9,7 @@ servicemesh:
109
yiKC9f7uujdHCUlOdsibnuiKutzrzGmv6w==
1110
-----END EC PRIVATE KEY-----
1211
13-
cert-manager:
12+
cert-manager:
1413
enabled: true
1514
installCRDs: false
1615
linkerd2:
@@ -30,4 +29,4 @@ linkerd2:
3029
installNamespace: false
3130
identity:
3231
issuer:
33-
scheme: kubernetes.io/tls
32+
scheme: kubernetes.io/tls

charts/sockshop/Chart.lock

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
dependencies:
22
- name: ingress-nginx
33
repository: file://../ingress-nginx
4-
version: 0.0.5
5-
digest: sha256:adb8bd6fdb74cf879dd026d6457c6db7a9256064eb6c2293e6ba08130c7d41cb
6-
generated: "2021-11-08T13:53:50.353293-05:00"
4+
version: 0.0.6
5+
digest: sha256:030082ecc7196bf794970d13bb83978f4b1198a1f4af7e3a50670109a470cc02
6+
generated: "2021-11-09T16:05:27.836785-05:00"

charts/sockshop/Chart.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v2
22
name: sockshop
33
description: A Weaveworks Helm chart for sockshop microservices demo
4-
version: 0.0.1
4+
version: 0.0.3
55
dependencies:
66
- name: ingress-nginx
77
version: "~0.0.5"
@@ -25,3 +25,5 @@ annotations:
2525
url: https://github.com/microservices-demo/microservices-demo/tree/master/deploy/kubernetes/helm-chart
2626
- name: Upstream Project
2727
url: https://github.com/microservices-demo/microservices-demo
28+
"weave.works/profile-ci": |
29+
- "gke"
-27.4 KB
Binary file not shown.
27.4 KB
Binary file not shown.

0 commit comments

Comments
 (0)