Skip to content

Commit

Permalink
chore: change cron and enable slack notify for ppc64le e2e (#821)
Browse files Browse the repository at this point in the history
* chore: change cron and enable slack notify for ppc64le e2e

Signed-off-by: Yussuf Shaikh <[email protected]>

* add destroy command in loop to prevent next cluster create errors

Signed-off-by: Yussuf Shaikh <[email protected]>

---------

Signed-off-by: Yussuf Shaikh <[email protected]>
  • Loading branch information
yussufsh authored Aug 31, 2023
1 parent 7a40e35 commit f04bfd8
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 14 deletions.
27 changes: 14 additions & 13 deletions .github/workflows/e2e-nightly-ppc64le.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
description: 'quay-operator-index tag. Defaults to 3.10-unstable'
required: false
schedule:
- cron: '15 11 * * *'
- cron: '0 0 * * 3,5'

jobs:
deploy:
Expand Down Expand Up @@ -74,15 +74,16 @@ jobs:
run: |
./hack/ppc64le/destroy_cluster.sh
# - name: Notify slack
# if: ${{ always() }}
# uses: rtCamp/action-slack-notify@v2
# env:
# SLACK_CHANNEL: team-quay-bots
# SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
# SLACK_COLOR: ${{ job.status }}
# SLACK_TITLE: "${{ github.workflow }}: ${{ job.status }}"
# SLACK_MESSAGE: |
# * **Repo**: ${{ github.repository }}
# * **Workflow**: ${{ github.workflow }}
# * **Result**: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
- name: Notify slack
if: ${{ always() }}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: team-quay-bots
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_COLOR: ${{ job.status }}
SLACK_TITLE: "${{ github.workflow }}: ${{ job.status }}"
SLACK_MESSAGE: |
* **Repo**: ${{ github.repository }}
* **Workflow**: ${{ github.workflow }}
* **Result**: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
* **Contact**: @yshaikh
21 changes: 20 additions & 1 deletion hack/ppc64le/destroy_cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,25 @@ function info {
echo "INFO $(date '+%Y-%m-%dT%H:%M:%S') $*"
}


NO_OF_RETRY=${NO_OF_RETRY:-"3"}
function retry {
cmd=$1
for i in $(seq 1 "$NO_OF_RETRY"); do
echo "Attempt: $i/$NO_OF_RETRY"
ret_code=0
$cmd || ret_code=$?
if [ $ret_code = 0 ]; then
break
elif [ "$i" == "$NO_OF_RETRY" ]; then
echo "All retry attempts failed!"
exit $ret_code
else
sleep 10
fi
done
}

CLUSTER_ID=quay-e2e
OCP_INSTALL_DIR=quaye2e
CCO_DIR=ccodir
Expand All @@ -21,5 +40,5 @@ fi

if [[ -f ./openshift-install ]]; then
info 'destroying the cluster...'
./openshift-install destroy cluster --dir $OCP_INSTALL_DIR --log-level=info
retry "./openshift-install destroy cluster --dir $OCP_INSTALL_DIR --log-level=info"
fi

0 comments on commit f04bfd8

Please sign in to comment.