Skip to content

Commit a9e77a1

Browse files
anpanigrANTARYAMI.PANIGRAHI@ORACLE.COM
andauthored
initial change (#3214)
Co-authored-by: ANTARYAMI.PANIGRAHI@ORACLE.COM <anpanigr@phx3182b0a.subnet4ad3phx.devweblogicphx.oraclevcn.com>
1 parent 86ecf37 commit a9e77a1

File tree

2 files changed

+28
-12
lines changed

2 files changed

+28
-12
lines changed

integration-tests/src/test/java/oracle/weblogic/kubernetes/ItLiftAndShiftFromOnPremDomain.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,14 @@ void testCreateMiiDomainWithClusterFromOnPremDomain() {
160160
final String adminServerPodName = domainUid + "-admin-server";
161161
final String managedServerPrefix = domainUid + "-managed-server";
162162
final String clusterService = domainUid + "-cluster-cluster-1";
163-
final int replicaCount = 5;
163+
164+
// As of WDT v2.3.1, the discovery tool will not put the replica count
165+
// in genererated domain resource yaml file. So the Operator will start
166+
// only one managed server (default replica count)
167+
// To add custom replica count, need to create a wdt model file with
168+
// kubernates section with custom repilca count
169+
// final int replicaCount = 5;
170+
final int replicaCount = 1;
164171

165172
assertDoesNotThrow(() -> {
166173
logger.info("Deleting and recreating {0}", LIFT_AND_SHIFT_WORK_DIR);

integration-tests/src/test/resources/bash-scripts/syncTestImagesRepo.sh

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
set -eu
66
set -o pipefail
77

8-
function dockerLogin() {
8+
dockerLogin() {
99

1010
echo "docker login to src ${SOURCE_REPO}"
1111
echo ${SOURCE_PASSWORD} > pwd.txt
@@ -22,25 +22,32 @@ rm -rf pwd.txt
2222

2323
}
2424

25-
function dockerPullPushImage() {
25+
dockerPullPushImage() {
2626

2727
# Here the source image contains absolute image path
2828
# and source image contains relative path wrt to TARGET_REPO
2929

3030
src_image="${1}"
3131
tgt_image="${TARGET_REPO}/${2}"
3232

33-
printf 'SRC[%s] TARGET[%s] \n' "${src_image}" "${tgt_image}"
34-
35-
docker pull ${src_image}
36-
docker tag ${src_image} ${tgt_image}
37-
docker push ${tgt_image}
38-
39-
docker rmi -f ${src_image}
40-
docker rmi -f ${tgt_image}
33+
if [ ${DRY_RUN} == "true" ]; then
34+
echo "Executing a dry run ..."
35+
echo "docker pull ${src_image} "
36+
echo "docker tag ${src_image} ${tgt_image} "
37+
echo "docker push ${tgt_image} "
38+
else
39+
printf 'SRC[%s] TARGET[%s] \n' "${src_image}" "${tgt_image}"
40+
docker pull ${src_image}
41+
docker tag ${src_image} ${tgt_image}
42+
docker push ${tgt_image}
43+
44+
docker rmi -f ${src_image}
45+
docker rmi -f ${tgt_image}
46+
fi
47+
4148
}
4249

43-
function dockerPullPushImages {
50+
dockerPullPushImages() {
4451
file="images.properties"
4552
egrep -v '^#' $file | grep -v "^$" |
4653
while IFS=";" read -r f1 f2
@@ -67,6 +74,8 @@ TARGET_REPO=${TARGET_REPO:-phx.ocir.io}
6774
TARGET_USER=${TARGET_USER:-oracle}
6875
TARGET_PASSWORD=${TARGET_PASSWORD:-changeme}
6976

77+
DRY_RUN=${DRY_RUN:-false}
78+
7079
echo "SOURCE_REPO[$SOURCE_REPO] and TARGET_REPO[${TARGET_REPO}]"
7180

7281
if [ ${SOURCE_REPO} == ${TARGET_REPO} ]; then

0 commit comments

Comments
 (0)