Skip to content

Commit

Permalink
fix: incorrect pipeline logs
Browse files Browse the repository at this point in the history
Signed-off-by: Roland.Ma <[email protected]>
  • Loading branch information
Roland.Ma committed May 25, 2021
1 parent 31f25a0 commit 637eb2f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 30 deletions.
33 changes: 5 additions & 28 deletions .github/workflows/pr-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,19 @@ env:

jobs:
Test-on-k8s-v-1-19-7:
runs-on: ubuntu-latest
runs-on: self-hosted
timeout-minutes: 150
steps:
- uses: actions/checkout@v2

- name: Clean up
run: kind delete cluster --name chart-testing && docker image prune -f

- name: Build image
run: docker build . --file Dockerfile --tag ks-installer

- name: Create kind cluster
uses: helm/kind-action@v1.0.0-rc.1
uses: helm/kind-action@v1.1.0
with:
config: .github/workflows/kind/kind.yaml

Expand Down Expand Up @@ -78,32 +81,6 @@ jobs:
kubectl apply -f deploy/kubesphere-installer.yaml
kubectl apply -f deploy/cluster-configuration.yaml
kubectl -n kubesphere-system patch cc ks-installer --type merge --patch '{"spec":{"servicemesh":{"enabled":true}}}'
for i in {1..300};do
set +e
kubectl -n istio-system get deploy | grep istiod
if [[ $? -ne 0 ]];then
sleep 1
echo "wait $i s..."
continue
fi
set -e
sleep 2
kubectl -n istio-system get deploy istiod-1-6-10 -oyaml | sed '/cpu: /d' | sed '/memory: /d' | sed '/resourceVersion: /d' | kubectl replace -f -
break
done
for i in {1..300};do
set +e
kubectl -n istio-system get deploy | grep istio-ingressgateway
if [[ $? -ne 0 ]];then
sleep 1
echo "wait $i s..."
continue
fi
set -e
sleep 2
kubectl -n istio-system get deploy istio-ingressgateway -oyaml | sed '/cpu: /d' | sed '/memory: /d' | sed '/resourceVersion: /d' | kubectl replace -f -
break
done
bash scripts/check_cluster_status.sh
- name: slack
Expand Down
4 changes: 2 additions & 2 deletions scripts/check_cluster_status.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ function check_installer_ok(){
kubectl -n kubesphere-system wait --timeout=180s --for=condition=Ready $(kubectl -n kubesphere-system get pod -l app=ks-install -oname)
echo "waiting for KubeSphere ready"
while IFS= read -r line; do
echo $line
echo "$line"
if [[ $line =~ "Welcome to KubeSphere" ]]
then
return
fi
done < <(timeout 1200 kubectl logs -n kubesphere-system deploy/ks-installer -f)
done < <(timeout 1200 kubectl logs -n kubesphere-system deploy/ks-installer -f --tail 1)
echo "ks-install not output 'Welcome to KubeSphere'"
exit 1
}
Expand Down

0 comments on commit 637eb2f

Please sign in to comment.