File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed
CTP/isolation/src/com/navercorp/cubridqa/isolation/deploy Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -96,6 +96,8 @@ private boolean installCUBRID() {
9696 }
9797
9898 public void deploy () {
99+ updateCTP ();
100+
99101 while (true ) {
100102 if (installCUBRID ()) {
101103 break ;
@@ -107,6 +109,33 @@ public void deploy() {
107109
108110 updateCUBRIDConfigurations ();
109111 }
112+
113+ private void updateCTP () {
114+ ShellScriptInput scripts = new ShellScriptInput ();
115+ scripts .addCommand ("cd ${CTP_HOME}/common/script" );
116+
117+ String ctpBranchName = System .getenv (ConfigParameterConstants .CTP_BRANCH_NAME );
118+ if (!CommonUtils .isEmpty (ctpBranchName )) {
119+ scripts .addCommand ("export CTP_BRANCH_NAME=" + ctpBranchName );
120+ }
121+
122+ String skipUpgrade = System .getenv (ConfigParameterConstants .CTP_SKIP_UPDATE );
123+ if (!CommonUtils .isEmpty (skipUpgrade )) {
124+ scripts .addCommand ("export CTP_SKIP_UPDATE=" + skipUpgrade );
125+ }
126+ scripts .addCommand ("chmod u+x upgrade.sh" );
127+ scripts .addCommand ("./upgrade.sh" );
128+
129+ String result ;
130+ try {
131+ log .print ("==> Begin to update CTP:" );
132+ result = ssh .execute (scripts );
133+ log .println (result );
134+ log .print ("DONE." );
135+ } catch (Exception e ) {
136+ log .print ("[ERROR] Fail to update CTP: " + e .getMessage ());
137+ }
138+ }
110139
111140 private void updateCUBRIDConfigurations () {
112141 String cubridEnginParamsList = com .navercorp .cubridqa .common .CommonUtils .parseInstanceParametersByRole (this .context .getProperties (), ConfigParameterConstants .TEST_INSTANCE_PREFIX
You can’t perform that action at this time.
0 commit comments