Skip to content

Commit

Permalink
Add trap to create a path when BR container exit (#5431)
Browse files Browse the repository at this point in the history
  • Loading branch information
wxiaomou authored Dec 5, 2023
1 parent 6c87ec1 commit 30d7599
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
7 changes: 7 additions & 0 deletions images/ebs-warmup/warmup-steps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ Supported flags:
EOF
}

# The trap command is to make sure the sidecars are terminated when the jobs are finished
cleanup() {
touch /tmp/pod/main-terminated
}

trap cleanup EXIT

operation=none
while [ $# -gt 0 ]; do
case $1 in
Expand Down
7 changes: 7 additions & 0 deletions images/tidb-backup-manager/e2e-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@

set -e

# The trap command is to make sure the sidecars are terminated when the jobs are finished
cleanup() {
touch /tmp/pod/main-terminated
}

trap cleanup EXIT

export GOOGLE_APPLICATION_CREDENTIALS=/tmp/google-credentials.json
echo "Create rclone.conf file."
cat <<EOF > /tmp/rclone.conf
Expand Down
7 changes: 7 additions & 0 deletions images/tidb-backup-manager/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@

set -e

# The trap command is to make sure the sidecars are terminated when the jobs are finished
cleanup() {
touch /tmp/pod/main-terminated
}

trap cleanup EXIT

export GOOGLE_APPLICATION_CREDENTIALS=/tmp/google-credentials.json
echo "Create rclone.conf file."
cat <<EOF > /tmp/rclone.conf
Expand Down

0 comments on commit 30d7599

Please sign in to comment.