You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by jo...@apache.org on 2022/06/28 13:20:07 UTC
[incubator-shenyu-helm-chart] branch main updated: add CI workflow (#4)
This is an automated email from the ASF dual-hosted git repository.
jooks pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-shenyu-helm-chart.git
The following commit(s) were added to refs/heads/main by this push:
new c52e818 add CI workflow (#4)
c52e818 is described below
commit c52e81853849714aac2091fd6d05d4f3830d40c1
Author: 尔等同学 <37...@users.noreply.github.com>
AuthorDate: Tue Jun 28 21:20:04 2022 +0800
add CI workflow (#4)
---
.github/workflows/ci.yaml | 65 +++++++++++++++++++++++++++++++++++++++++++++++
ct.yaml | 7 +++++
test/kind.yaml | 16 ++++++++++++
3 files changed, 88 insertions(+)
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
new file mode 100644
index 0000000..0c928ff
--- /dev/null
+++ b/.github/workflows/ci.yaml
@@ -0,0 +1,65 @@
+name: CI
+
+on:
+ pull_request:
+ push:
+ branches:
+ - main
+
+jobs:
+
+ helm:
+ name: K8s chart test
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ k8s: [v1.16.15]
+
+ steps:
+
+ - name: Checkout
+ uses: actions/checkout@v2
+ with:
+ submodules: recursive
+
+ - name: Lint
+ run: |
+ docker run --rm --interactive --network host \
+ --name ct-lint \
+ --volume $PWD:/workdir \
+ --workdir /workdir/charts/shenyu \
+ quay.io/helmpack/chart-testing:v3.4.0 sh -c 'helm dependency update \
+ && cd ../.. \
+ && helm repo add shenyu https://apache.github.io/incubator-shenyu-helm-chart \
+ && ct lint \
+ --charts charts/shenyu '
+
+ - name: fix permissions
+ run: |
+ sudo mkdir -p $HOME/.kube
+ sudo chmod -R 777 $HOME/.kube
+
+ - name: KinD (Kubernetes in Docker) Action
+ uses: engineerd/setup-kind@v0.5.0
+ with:
+ version: v0.11.0
+ config: test/kind.yaml
+ image: kindest/node:${{ matrix.k8s }}
+
+
+ - name: Test
+ env:
+ KIND_CLUSTER_NAME: kind
+ SKIP_CLUSTER_CREATION: true
+ run: |
+ kind get kubeconfig > $HOME/.kube/kind-config-kind
+ docker run --rm --interactive --network host \
+ --name ct \
+ --volume $HOME/.kube/kind-config-kind:/root/.kube/config \
+ --volume $PWD:/workdir \
+ --workdir /workdir/charts/shenyu \
+ quay.io/helmpack/chart-testing:v3.4.0 sh -c 'helm dependency update \
+ && cd ../.. \
+ && helm repo add shenyu https://apache.github.io/incubator-shenyu-helm-chart \
+ && ct install \
+ --charts charts/shenyu '
\ No newline at end of file
diff --git a/ct.yaml b/ct.yaml
new file mode 100644
index 0000000..f5ece48
--- /dev/null
+++ b/ct.yaml
@@ -0,0 +1,7 @@
+remote: origin
+target-branch: gh-pages
+chart-dirs:
+ - charts
+chart-repos:
+ - shenyu=https://apache.github.io/incubator-shenyu-helm-chart
+helm-extra-args: --timeout 600s
\ No newline at end of file
diff --git a/test/kind.yaml b/test/kind.yaml
new file mode 100644
index 0000000..6fddba4
--- /dev/null
+++ b/test/kind.yaml
@@ -0,0 +1,16 @@
+kind: Cluster
+apiVersion: kind.x-k8s.io/v1alpha4
+nodes:
+- role: control-plane
+- role: worker
+- role: worker
+kubeadmConfigPatches:
+- |
+ kind: ClusterConfiguration
+ metadata:
+ name: config
+ controllerManager:
+ extraArgs:
+ namespace-sync-period: 10s
+ concurrent-deployment-syncs: "30"
+ deployment-controller-sync-period: 10s