Skip to content

Commit

Permalink
ci: remove k8s 1.18,1.19, and add 1.25,1.26,1.27
Browse files Browse the repository at this point in the history
  • Loading branch information
FushuWang committed Jul 21, 2023
1 parent 5b143ce commit 612d743
Showing 1 changed file with 164 additions and 14 deletions.
178 changes: 164 additions & 14 deletions .github/workflows/chart_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
helm plugin install https://github.com/quintush/helm-unittest
helm unittest ${{ steps.list-changed.outputs.chart_name }}
install-on-v1-18:
install-on-v1-20:
runs-on: ubuntu-latest
needs: basic-tests
steps:
Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:
- name: Create kind cluster
run: |
./hack/kind-cluster-build.sh --nodeNum 3 --k8sVersion v1.18.20
./hack/kind-cluster-build.sh --nodeNum 3 --k8sVersion v1.20.15
docker pull "$SN_IMAGE"
kind load docker-image --name pulsar-dev --nodes pulsar-dev-worker "$SN_IMAGE"
Expand Down Expand Up @@ -153,8 +153,81 @@ jobs:
timeout-minutes: 10
if: failure()

install-on-v1-21:
runs-on: ubuntu-latest
needs: basic-tests
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: clean disk
run: |
df -h
sudo swapoff -a
sudo rm -rf /swapfile /usr/share/dotnet /usr/local/lib/android /opt/ghc "$AGENT_TOOLSDIRECTORY"
sudo apt clean
docker rmi $(docker images -q) -f
df -h
- name: Set up Helm
uses: azure/setup-helm@v1
with:
version: v3.12.1

- uses: actions/setup-python@v4
with:
python-version: 3.9

- name: Set up chart-testing
uses: helm/[email protected]

- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }} --config .ci/ct.yaml)
chart_name=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }} --config .ci/ct.yaml | grep -v '>>>')
if [[ -n "$changed" ]]; then
echo "changed=true" >> $GITHUB_OUTPUT
echo "chart_name=$chart_name" >> $GITHUB_OUTPUT
fi
- name: Create kind cluster
run: |
./hack/kind-cluster-build.sh --nodeNum 3 --k8sVersion v1.21.14
docker pull "$SN_IMAGE"
kind load docker-image --name pulsar-dev --nodes pulsar-dev-worker "$SN_IMAGE"
env:
KIND_VERSION: 0.20.0
SN_IMAGE: streamnative/sn-platform:2.10.4.3
if: steps.list-changed.outputs.changed == 'true'


install-on-v1-19:
# Install the pulsar operator before testing the sn-platform
- name: Install the pulsar operator
if: steps.list-changed.outputs.changed == 'true' && steps.list-changed.outputs.chart_name == 'charts/sn-platform'
run: |
helm repo add banzaicloud-stable https://kubernetes-charts.banzaicloud.com
helm -n sn-system install sn charts/pulsar-operator --create-namespace
kubectl -n sn-system get deploy
kubectl -n sn-system wait --for condition=available --timeout=360s deployment/sn-pulsar-operator-pulsar-controller-manager
kubectl -n sn-system wait --for condition=available --timeout=360s deployment/sn-pulsar-operator-zookeeper-controller-manager
kubectl -n sn-system wait --for condition=available --timeout=360s deployment/sn-pulsar-operator-bookkeeper-controller-manager
helm -n sn-system upgrade --install vault-operator banzaicloud-stable/vault-operator
kubectl -nsn-system wait --for condition=available --timeout=360s deployment/vault-operator
df -h
- name: Run chart-testing (install)
run: ct install --debug --config ct.yaml --print-config --charts charts/sn-platform

- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
timeout-minutes: 10
if: failure()

install-on-v1-22:
runs-on: ubuntu-latest
needs: basic-tests
steps:
Expand Down Expand Up @@ -196,7 +269,7 @@ jobs:
- name: Create kind cluster
run: |
./hack/kind-cluster-build.sh --nodeNum 3 --k8sVersion v1.19.11
./hack/kind-cluster-build.sh --nodeNum 3 --k8sVersion v1.22.17
docker pull "$SN_IMAGE"
kind load docker-image --name pulsar-dev --nodes pulsar-dev-worker "$SN_IMAGE"
Expand Down Expand Up @@ -227,9 +300,8 @@ jobs:
uses: mxschmitt/action-tmate@v3
timeout-minutes: 10
if: failure()


install-on-v1-20:
install-on-v1-23:
runs-on: ubuntu-latest
needs: basic-tests
steps:
Expand Down Expand Up @@ -271,7 +343,7 @@ jobs:
- name: Create kind cluster
run: |
./hack/kind-cluster-build.sh --nodeNum 3 --k8sVersion v1.21.12
./hack/kind-cluster-build.sh --nodeNum 3 --k8sVersion v1.23.17
docker pull "$SN_IMAGE"
kind load docker-image --name pulsar-dev --nodes pulsar-dev-worker "$SN_IMAGE"
Expand Down Expand Up @@ -302,7 +374,8 @@ jobs:
uses: mxschmitt/action-tmate@v3
timeout-minutes: 10
if: failure()
install-on-v1-22:

install-on-v1-24:
runs-on: ubuntu-latest
needs: basic-tests
steps:
Expand Down Expand Up @@ -344,7 +417,7 @@ jobs:
- name: Create kind cluster
run: |
./hack/kind-cluster-build.sh --nodeNum 3 --k8sVersion v1.22.9
./hack/kind-cluster-build.sh --nodeNum 3 --k8sVersion v1.24.16
docker pull "$SN_IMAGE"
kind load docker-image --name pulsar-dev --nodes pulsar-dev-worker "$SN_IMAGE"
Expand Down Expand Up @@ -376,7 +449,8 @@ jobs:
timeout-minutes: 10
if: failure()

install-on-v1-23:

install-on-v1-25:
runs-on: ubuntu-latest
needs: basic-tests
steps:
Expand Down Expand Up @@ -418,7 +492,7 @@ jobs:
- name: Create kind cluster
run: |
./hack/kind-cluster-build.sh --nodeNum 3 --k8sVersion v1.23.6
./hack/kind-cluster-build.sh --nodeNum 3 --k8sVersion v1.25.12
docker pull "$SN_IMAGE"
kind load docker-image --name pulsar-dev --nodes pulsar-dev-worker "$SN_IMAGE"
Expand Down Expand Up @@ -449,8 +523,9 @@ jobs:
uses: mxschmitt/action-tmate@v3
timeout-minutes: 10
if: failure()

install-on-v1-24:


install-on-v1-26:
runs-on: ubuntu-latest
needs: basic-tests
steps:
Expand Down Expand Up @@ -492,7 +567,7 @@ jobs:
- name: Create kind cluster
run: |
./hack/kind-cluster-build.sh --nodeNum 3 --k8sVersion v1.24.0
./hack/kind-cluster-build.sh --nodeNum 3 --k8sVersion v1.26.7
docker pull "$SN_IMAGE"
kind load docker-image --name pulsar-dev --nodes pulsar-dev-worker "$SN_IMAGE"
Expand Down Expand Up @@ -523,3 +598,78 @@ jobs:
uses: mxschmitt/action-tmate@v3
timeout-minutes: 10
if: failure()


install-on-v1-27:
runs-on: ubuntu-latest
needs: basic-tests
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: clean disk
run: |
df -h
sudo swapoff -a
sudo rm -rf /swapfile /usr/share/dotnet /usr/local/lib/android /opt/ghc "$AGENT_TOOLSDIRECTORY"
sudo apt clean
docker rmi $(docker images -q) -f
df -h
- name: Set up Helm
uses: azure/setup-helm@v1
with:
version: v3.12.1

- uses: actions/setup-python@v4
with:
python-version: 3.9

- name: Set up chart-testing
uses: helm/[email protected]

- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }} --config .ci/ct.yaml)
chart_name=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }} --config .ci/ct.yaml | grep -v '>>>')
if [[ -n "$changed" ]]; then
echo "changed=true" >> $GITHUB_OUTPUT
echo "chart_name=$chart_name" >> $GITHUB_OUTPUT
fi
- name: Create kind cluster
run: |
./hack/kind-cluster-build.sh --nodeNum 3 --k8sVersion v1.27.4
docker pull "$SN_IMAGE"
kind load docker-image --name pulsar-dev --nodes pulsar-dev-worker "$SN_IMAGE"
env:
KIND_VERSION: 0.20.0
SN_IMAGE: streamnative/sn-platform:2.10.4.3
if: steps.list-changed.outputs.changed == 'true'


# Install the pulsar operator before testing the sn-platform
- name: Install the pulsar operator
if: steps.list-changed.outputs.changed == 'true' && steps.list-changed.outputs.chart_name == 'charts/sn-platform'
run: |
helm repo add banzaicloud-stable https://kubernetes-charts.banzaicloud.com
helm -n sn-system install sn charts/pulsar-operator --create-namespace
kubectl -n sn-system get deploy
kubectl -n sn-system wait --for condition=available --timeout=360s deployment/sn-pulsar-operator-pulsar-controller-manager
kubectl -n sn-system wait --for condition=available --timeout=360s deployment/sn-pulsar-operator-zookeeper-controller-manager
kubectl -n sn-system wait --for condition=available --timeout=360s deployment/sn-pulsar-operator-bookkeeper-controller-manager
helm -n sn-system upgrade --install vault-operator banzaicloud-stable/vault-operator
kubectl -nsn-system wait --for condition=available --timeout=360s deployment/vault-operator
df -h
- name: Run chart-testing (install)
run: ct install --debug --config ct.yaml --print-config --charts charts/sn-platform

- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
timeout-minutes: 10
if: failure()

0 comments on commit 612d743

Please sign in to comment.