Skip to content

Commit 1ea15a8

Browse files
committed
Revert CUBRIDQA-1314 changes (from 45cba4d to 40d5b94) for bug fix
This reverts commits 45cba4d through 40d5b94 (CUBRIDQA-1314 related changes). These changes will be reapplied after fixing bugs. Reverted commits: - 40d5b94 Deploy new build artifacts refer to 2182de3 - 2182de3 [CUBRIDQA-1314] support grepo update logic and isoltion test worker node CTP update. (#743) - 637ec59 [CUBRIDQA-1314] use dynamic path for CTP/conf/common.conf (#741) - 245b1b6 Deploy new build artifacts refer to 9dda3b8 - 9dda3b8 [CUBRIDQA-1314] add ENV_ keyword on manualtest job sender module. (#739) - 71b08bf Deploy new build artifacts refer to 45cba4d - 45cba4d [CUBRIDQA-1314] add new environment accept function for ENV keyword (#733)
1 parent 40d5b94 commit 1ea15a8

File tree

18 files changed

+12
-133
lines changed

18 files changed

+12
-133
lines changed
-25 Bytes
Binary file not shown.

CTP/cdc_repl/src/com/navercorp/cubridqa/cdc_repl/deploy/DeployNode.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ private boolean installCUBRID() throws Exception {
112112
boolean isSucc = true;
113113
String role = context.getProperty(ConfigParameterConstants.CUBRID_INSTALL_ROLE, "").trim();
114114
GeneralScriptInput scripts = new GeneralScriptInput();
115-
scripts.addCommand(CommonUtils.getExportsOfENVParams());
116115
scripts.addCommand("chmod u+x ${CTP_HOME}/common/script/run_cubrid_install");
117116
scripts.addCommand("run_cubrid_install " + role + " " + context.getCubridPackageUrl() + " " + context.getProperty(ConfigParameterConstants.CUBRID_ADDITIONAL_DOWNLOAD_URL, "").trim() + " 2>&1");
118117

CTP/common/lib/cubridqa-common.jar

-92 Bytes
Binary file not shown.

CTP/common/sched/init.sh

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,6 @@ function analyzeMessageInfo() {
3636
BUILD_SVN_BRANCH=$BUILD_SVN_BRANCH_NEW
3737
export BUILD_SVN_BRANCH
3838
fi
39-
40-
# Process ENV_ prefixed variables (ENV_CTP_BRANCH_NAME -> export CTP_BRANCH_NAME)
41-
for env_var in `cat $result | grep "^ENV_" | sed "s/:/=/" | sed "s/^ENV_//"`; do
42-
eval "export $env_var"
43-
done
4439

4540
if [ "$SVR_SITE" == 'china' ]
4641
then
@@ -103,15 +98,15 @@ function check_local_disk_space () {
10398
)
10499
}
105100

106-
export DAILYQA_DAILYSRV_HOST=`ini.sh ${CTP_HOME}/conf/common.conf qahome_server_host`
107-
export DAILYQA_DAILYSRV_USER=`ini.sh ${CTP_HOME}/conf/common.conf qahome_server_user`
108-
export DAILYQA_DAILYSRV_PWD=`ini.sh ${CTP_HOME}/conf/common.conf qahome_server_pwd`
109-
export DAILYQA_DAILYSRV_PORT=`ini.sh ${CTP_HOME}/conf/common.conf qahome_server_port`
110-
export DAILYQA_GIT_USER=`ini.sh ${CTP_HOME}/conf/common.conf git_user`
111-
export DAILYQA_GIT_PWD=`ini.sh ${CTP_HOME}/conf/common.conf git_pwd`
112-
export DAILYQA_GIT_EMAIL=`ini.sh ${CTP_HOME}/conf/common.conf git_email`
113-
export DAILYQA_SSH_PWD_DEFAULT=`ini.sh ${CTP_HOME}/conf/common.conf default_ssh_pwd`
114-
export DAILYQA_SSH_PORT_DEFAULT=`ini.sh ${CTP_HOME}/conf/common.conf default_ssh_port`
101+
export DAILYQA_DAILYSRV_HOST=`ini.sh conf/common.conf qahome_server_host`
102+
export DAILYQA_DAILYSRV_USER=`ini.sh conf/common.conf qahome_server_user`
103+
export DAILYQA_DAILYSRV_PWD=`ini.sh conf/common.conf qahome_server_pwd`
104+
export DAILYQA_DAILYSRV_PORT=`ini.sh conf/common.conf qahome_server_port`
105+
export DAILYQA_GIT_USER=`ini.sh conf/common.conf git_user`
106+
export DAILYQA_GIT_PWD=`ini.sh conf/common.conf git_pwd`
107+
export DAILYQA_GIT_EMAIL=`ini.sh conf/common.conf git_email`
108+
export DAILYQA_SSH_PWD_DEFAULT=`ini.sh conf/common.conf default_ssh_pwd`
109+
export DAILYQA_SSH_PORT_DEFAULT=`ini.sh conf/common.conf default_ssh_port`
115110

116111
analyzeMessageInfo $1
117112
export -f getMsgValue
-34 Bytes
Binary file not shown.

CTP/common/sched/src/com/navercorp/cubridqa/scheduler/producer/ManualSender.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ private static boolean acceptConfirm() throws IOException {
325325

326326
private static void showHelp() {
327327
System.out
328-
.println("Usage: java com.navercorp.cubridqa.scheduler.producer.ManualSender <queue> <url1,url2,...> <scenario> <priority> [compat_file|-i18nAll|-dbimgAll|-compatAll] [PROPS:MKEY_TEST1=v1;MKEY_TEST2=v2|ENV_TEST1=v1;ENV_TEST2=v2]");
328+
.println("Usage: java com.navercorp.cubridqa.scheduler.producer.ManualSender <queue> <url1,url2,...> <scenario> <priority> [compat_file|-i18nAll|-dbimgAll|-compatAll] [PROPS:MKEY_TEST1=v1;MKEY_TEST2=v2]");
329329
System.out.println();
330330
}
331331

CTP/common/sched/src/com/navercorp/cubridqa/scheduler/producer/crontab/CUBJob.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ private boolean processTest(CUBJobContext jctx, File buildRootFile, Properties t
193193
while (it.hasNext()) {
194194
key = it.next().trim();
195195
value = testProps.getProperty(key);
196-
if (key.startsWith("MKEY_") || key.startsWith("ENV_")) {
196+
if (key.startsWith("MKEY_")) {
197197
msgProps.put(key, value);
198198
}
199199
}

CTP/common/script/start_consumer.sh

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -139,18 +139,6 @@ function updateCodes()
139139
{
140140
curDir=`pwd`
141141
branchName=$1
142-
143-
# Check branch change and remove cache if needed
144-
branchMarkerFile="${CTP_HOME}/.dailyqa/.current_branch"
145-
if [ -f "$branchMarkerFile" ]; then
146-
currentBranch=`cat $branchMarkerFile`
147-
if [ "$currentBranch" != "$branchName" ]; then
148-
localBranchName=`echo $branchName|sed 's#/#_#g'`
149-
cacheFile="${CTP_HOME}/.dailyqa/cubrid-testtools_${localBranchName}_CTP.zip"
150-
[ -f "$cacheFile" ] && rm -f "$cacheFile" && echo "Branch changed: $currentBranch -> $branchName (cache removed)"
151-
fi
152-
fi
153-
154142
changedCount=`cd ${CTP_HOME}; run_grepo_fetch -r cubrid-testtools -b "$branchName" -p "CTP" -e "conf" --check-only . | grep "fetch" | grep CHANGED | wc -l`
155143

156144
if [ "$changedCount" -gt "0" ]
@@ -172,7 +160,6 @@ function updateCodes()
172160
echo "then " >> $HOME/.autoUpdate.sh
173161
echo " . ~/.bash_profile " >> $HOME/.autoUpdate.sh
174162
echo "fi " >> $HOME/.autoUpdate.sh
175-
echo "export CTP_BRANCH_NAME=$branchName" >> $HOME/.autoUpdate.sh
176163
echo "set -x " >> $HOME/.autoUpdate.sh
177164
echo "cd ${CURRENT_TOOL_HOME}/../script ">> $HOME/.autoUpdate.sh
178165
echo "chmod u+x *">> $HOME/.autoUpdate.sh
@@ -380,27 +367,11 @@ do
380367
if [ "$existsMsgId" -a ${isStartByData} -gt 0 ]
381368
then
382369
echo "Action: $x, ${q_exec[$count]}.sh, CONTINUE"
383-
# Update CTP if ENV_CTP_BRANCH_NAME is set in continue mode
384-
tempBranchContinue=""
385-
if [ $withoutSync -ne 1 ]
386-
then
387-
source ${CTP_HOME}/common/sched/init.sh $ser_site
388-
if [ "$CTP_BRANCH_NAME" ] && [ "$CTP_BRANCH_NAME" != "$branchName" ]
389-
then
390-
echo "ENV_CTP_BRANCH_NAME detected: $CTP_BRANCH_NAME (updating from $branchName)"
391-
updateCodes $CTP_BRANCH_NAME
392-
tempBranchContinue="$branchName"
393-
fi
394-
fi
395370
(cd ${CTP_HOME}; export BUILD_IS_FROM_GIT=$isFromGit ;source ${CTP_HOME}/common/sched/init.sh $ser_site;sh common/ext/${q_exec[$count]}.sh YES)
396371

397372
echo
398373
echo "End continue mode test!"
399374
consumerTimer ${existsMsgId} "stop"
400-
401-
# Restore original branch if temp branch was used
402-
[ -n "$tempBranchContinue" ] && updateCodes $tempBranchContinue
403-
404375
contimeENDTIME=`getTimeStamp`
405376
echo "END_CONTINUE_TIME:${contimeENDTIME}"
406377
echo '' > ${CTP_HOME}/common/sched/status/${x}
@@ -409,20 +380,6 @@ do
409380

410381
startAgent $x
411382
hasTestBuild
412-
413-
#update client again if ENV_CTP_BRANCH_NAME is set in message
414-
tempBranch=""
415-
if [ "$hasBuild" == "true" ] && [ $withoutSync -ne 1 ]
416-
then
417-
source ${CTP_HOME}/common/sched/init.sh $ser_site
418-
if [ "$CTP_BRANCH_NAME" ] && [ "$CTP_BRANCH_NAME" != "$branchName" ]
419-
then
420-
echo "ENV_CTP_BRANCH_NAME detected: $CTP_BRANCH_NAME (updating from $branchName)"
421-
updateCodes $CTP_BRANCH_NAME
422-
tempBranch="$branchName"
423-
fi
424-
fi
425-
426383
if [ "$isDebug" == "--debug" ]
427384
then
428385
echo "-------------------------- Debug Message Information -----------------------------"
@@ -460,9 +417,6 @@ do
460417

461418
consumerTimer $msgId "stop"
462419

463-
# Restore original branch if temp branch was used
464-
[ -n "$tempBranch" ] && updateCodes $tempBranch
465-
466420
ENDTIME=`getTimeStamp`
467421
echo
468422
echo "Clean msg id from queue file"

CTP/common/script/upgrade.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,4 @@ mkdir -p ../.ctp
4747
cp -rf common/lib/* ../.ctp/
4848

4949
export `grep -E "^grepo_service_url" conf/common.conf | tr -d '\r'`
50-
"$JAVA_HOME/bin/java" -cp ../.ctp/cubridqa-common.jar com.navercorp.cubridqa.common.grepo.UpgradeMain -r cubrid-testtools -b "$branchName" -p "CTP" -e "conf" .; (chmod u+x ./bin/*; chmod u+x ./common/script/*; chmod u+x ./common/ext/*; chmod u+x sql/bin/*; mkdir -p ${dest_tool_dir}/.dailyqa; echo "$branchName" > ${dest_tool_dir}/.dailyqa/.current_branch; rm -rf ../.ctp >/dev/null 3>&1); echo DONE; cd "${current_user_dir}"; exit
50+
"$JAVA_HOME/bin/java" -cp ../.ctp/cubridqa-common.jar com.navercorp.cubridqa.common.grepo.UpgradeMain -r cubrid-testtools -b "$branchName" -p "CTP" -e "conf" .; (chmod u+x ./bin/*; chmod u+x ./common/script/*; chmod u+x ./common/ext/*; chmod u+x sql/bin/*; rm -rf ../.ctp >/dev/null 3>&1); echo DONE; cd "${current_user_dir}"; exit

CTP/common/src/com/navercorp/cubridqa/common/CommonUtils.java

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -361,25 +361,6 @@ public static String getExportsOfMEKYParams() {
361361
return result.toString();
362362
}
363363

364-
public static String getExportsOfENVParams() {
365-
Map<String, String> map = System.getenv();
366-
367-
Set<Map.Entry<String, String>> entries = map.entrySet();
368-
StringBuffer result = new StringBuffer();
369-
370-
String key, value;
371-
for (Map.Entry<String, String> entry : entries) {
372-
key = entry.getKey().trim();
373-
value = entry.getValue();
374-
375-
// Export CTP related variables that were set by ENV_ prefix
376-
if ((key.startsWith("CTP_") || key.equals("BUILD_SCENARIO_BRANCH_GIT")) && value != null) {
377-
result.append("export ").append(key).append("=\"").append(value).append("\";");
378-
}
379-
}
380-
return result.toString();
381-
}
382-
383364
public static String getEnvInFile(String var) {
384365
String value = System.getenv(var);
385366

0 commit comments

Comments
 (0)