[SEAWORTHY] Stop Shipyard job after failure
Change-Id: If7b728176fd75792b7cd6cceed64e3874daf673f
This commit is contained in:
parent
a6f98d969e
commit
75dce5e78e
|
@ -137,6 +137,14 @@ shipyard_action_wait() {
|
|||
done
|
||||
}
|
||||
|
||||
shipyard_action_stop() {
|
||||
|
||||
ACTION_ID=$(shipyard_cmd get actions | grep -oE 'action/[0-9A-Z]+' | tail -1)
|
||||
shipyard_cmd describe "${ACTION_ID}"
|
||||
log "${ACTION}"
|
||||
shipyard_cmd control stop "${ACTION_ID}"
|
||||
echo -e "\n${ACTION_ID} terminated SUCCESSFULLY\n"
|
||||
}
|
||||
# Re-use the ssh key from ssh-config
|
||||
# for MAAS-deployed nodes
|
||||
collect_ssh_key() {
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
#!/usr/bin/env bash
|
||||
# Copyright 2018 AT&T Intellectual Property. All other rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set -e
|
||||
|
||||
source "${GATE_UTILS}"
|
||||
|
||||
cd "${TEMP_DIR}"
|
||||
|
||||
shipyard_action_stop
|
|
@ -19,4 +19,4 @@ source "${GATE_UTILS}"
|
|||
|
||||
cd "${TEMP_DIR}"
|
||||
|
||||
shipyard_action_wait update_site 1800
|
||||
shipyard_action_wait update_site 7200
|
||||
|
|
Loading…
Reference in New Issue