10
10
# assumes is in the same directory. It takes suite name, suite user, version
11
11
# number, ticket number and required platforms as inputs. It runs the script on
12
12
# each platform as required and then moves the generated variables file to
13
- # ~frum/kgo_updated_variables/vnVV.V_tTTTT/ on linux. IF xc40 is being run it
14
- # rsyncs with the xcs.
13
+ # $UMDIR/kgo_updated_variables/vnVV.V_tTTTT/
15
14
# This script is NOT intended to be run independently of '../meto_update_kgo.sh'
16
15
17
16
# shellcheck disable=SC2059
@@ -22,12 +21,11 @@ GREEN='\033[0;32m'
22
21
NC=' \033[0m' # No Color
23
22
24
23
# Read in command line arguments
25
- while getopts S:U:E: Z:N:R:P:V:F: flag
24
+ while getopts S:U:Z:N:R:P:V:F: flag
26
25
do
27
26
case " ${flag} " in
28
27
S) suite_name=${OPTARG} ;;
29
28
U) suite_user=${OPTARG} ;;
30
- E) suite_user_ex1a=${OPTARG} ;;
31
29
Z) ex_kgo_host=${OPTARG} ;;
32
30
N) new_kgo_dir=${OPTARG} ;;
33
31
R) new_release=${OPTARG} ;;
@@ -43,36 +41,14 @@ kgo_command="./kgo_update.py"
43
41
if [[ $new_release -eq 1 ]]; then
44
42
kgo_command=" ${kgo_command} --new-release"
45
43
fi
46
- kgo_command=" ${kgo_command} -S $suite_name -N $new_kgo_dir -E $variables_extension "
47
- kgo_command_spice=" $kgo_command -U $suite_user -P spice"
48
- kgo_command_azspice=" $kgo_command -U $suite_user_ex1a -P azspice"
49
- kgo_command_xc40=" $kgo_command -U $suite_user -P xc40"
50
- kgo_command_ex1a=" $kgo_command -U $suite_user_ex1a -P ex1a"
44
+ kgo_command=" ${kgo_command} -S $suite_name -N $new_kgo_dir -E $variables_extension -U $suite_user "
45
+ kgo_command_azspice=" $kgo_command -P azspice"
46
+ kgo_command_ex1a=" $kgo_command -P ex1a"
51
47
52
48
# Make a directory to store the script and variables file file in
53
49
variables_dir=~ /kgo_update_files/vn$version_number /$new_kgo_dir
54
50
mkdir -p " $variables_dir "
55
51
56
- # If spice has kgo updates
57
- if [[ $platforms == * " spice" * ]] && [[ $platforms != * " azspice" * ]]; then
58
- printf " ${GREEN} \n\nRunning KGO Update Script on spice.\n${NC} "
59
-
60
- # Run the Update Script
61
- if $kgo_command_spice ; then
62
- # Move the updated variables file and script into the ticket folder
63
- printf " ${GREEN} \n\nSuccessfully installed on spice.\n${NC} "
64
- printf " ${GREEN} Moving the generated files into spice ${variables_dir} .${NC} \n"
65
- if [[ $new_release -ne 1 ]]; then
66
- mv ~ /" variables${variables_extension} _${new_kgo_dir} " \
67
- " ${variables_dir} /spice_updated_variables${variables_extension} "
68
- fi
69
- mv ~ /" kgo_update_${new_kgo_dir} .sh" \
70
- " ${variables_dir} /spice_update_script.sh"
71
- else
72
- printf " ${RED} \nThe installation script has failed on spice.\n${NC} "
73
- fi
74
- fi
75
-
76
52
# If azspice has kgo updates
77
53
if [[ $platforms == * " azspice" * ]]; then
78
54
printf " ${GREEN} \n\nRunning KGO Update Script on azspice.\n${NC} "
@@ -93,40 +69,6 @@ if [[ $platforms == *"azspice"* ]]; then
93
69
fi
94
70
fi
95
71
96
- # If xc40 has kgo updates
97
- if [[ $platforms == * " xc40" * ]]; then
98
- printf " ${GREEN} \n\nRunning KGO Update Script on xc40.\n${NC} "
99
-
100
- host_xc40=$( rose host-select xc)
101
-
102
- # SCP the python script to the xc40
103
- scp -q kgo_update.py " frum@${host_xc40} " :~
104
-
105
- # Define the commands to run on xc40
106
- command=" . /etc/profile ; module load scitools ;
107
- ${kgo_command_xc40} "
108
-
109
- # SSH to the xc40 with the run command
110
- if ssh -Y " $host_xc40 " " $command " ; then
111
- # rsync the generated variables file and script back to frum on linux
112
- # This cleans up the original files
113
- printf " ${GREEN} \n\nSuccessfully installed on xc40.\n${NC} "
114
- printf " ${GREEN} Rsyncing the generated files into spice ${variables_dir} .\n${NC} "
115
- if [[ $new_release -ne 1 ]]; then
116
- rsync --remove-source-files -avz \
117
- " frum@$host_xc40 :~/variables${variables_extension} _${new_kgo_dir} " \
118
- " ${variables_dir} /xc40_updated_variables${variables_extension} "
119
- fi
120
- rsync --remove-source-files -avz \
121
- " frum@${host_xc40} :~/kgo_update_${new_kgo_dir} .sh" \
122
- " ${variables_dir} /xc40_update_script.sh"
123
- else
124
- printf " ${RED} \nThe installation script has failed on xc40.\n${NC} "
125
- fi
126
-
127
- # Clean up kgo_update.py on xc40
128
- ssh -Yq " $host_xc40 " " rm kgo_update.py"
129
- fi
130
72
131
73
# If ex1a has kgo updates
132
74
if [[ $platforms == * " ex1a" * ]]; then
0 commit comments