File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
packer/linux/conf/buildkite-agent/scripts Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -17,11 +17,11 @@ if [[ $LIFECYCLE_TRANSITION = "ec2:SPOT_INSTANCE_TERMINATION" ]]; then
17
17
# Spot termination time is provided as the third argument in RFC3339 format,
18
18
# i.e. 2020-10-09T01:33:10Z
19
19
SPOT_TERMINATION_TIME=$3
20
- SPOT_TERMINATION_TIME_UNIX=$( date ' +%s' -d ${SPOT_TERMINATION_TIME} )
20
+ SPOT_TERMINATION_TIME_UNIX=$( date ' +%s' -d " ${SPOT_TERMINATION_TIME} " )
21
21
# Subtracts 20 seconds from the published spot termination time to give the
22
22
# agent a little time to forcefully quit running jobs. If the agent doesn't
23
23
# gracefully quit before this time we will send SIGQUIT.
24
- STOP_BY_TIME_UNIX=$( expr ${ SPOT_TERMINATION_TIME_UNIX} - 20)
24
+ STOP_BY_TIME_UNIX=$(( SPOT_TERMINATION_TIME_UNIX - 20 ) )
25
25
26
26
echo " Waiting for agents to quit gracefully until 20 seconds before the spot termination time: ${SPOT_TERMINATION_TIME} "
27
27
while [[ $( date ' +%s' ) -lt $STOP_BY_TIME_UNIX ]]; do
You can’t perform that action at this time.
0 commit comments