Skip to content

Commit 51ec5e1

Browse files
Adding new profile for pipeline jenkins and fixing tests (#2560)
* Adding new profile for pipeline jenkins and fixing tests
1 parent a229df7 commit 51ec5e1

File tree

6 files changed

+71
-40
lines changed

6 files changed

+71
-40
lines changed

integration-tests/pom.xml

Lines changed: 30 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -214,42 +214,55 @@
214214
<properties>
215215
<skipITs>false</skipITs>
216216
<includes-failsafe>
217-
**/ItCoherenceTests,
217+
**/ItExternalLbTunneling,
218+
**/ItMiiAuxiliaryImage,
219+
**/ItMiiAuxiliaryImageCluster,
220+
**/ItMiiSampleWlsAux,
221+
**/ItMiiCustomSslStore,
222+
**/ItMiiServiceMigration,
223+
**/ItRemoteConsole,
218224
**/ItConfigDistributionStrategy,
219225
**/ItCrossDomainTransaction,
220226
**/ItElasticLogging,
221227
**/ItElasticLoggingFluentd,
222228
**/ItExternalRmiTunneling,
223-
**/ItInitContainers,
224229
**/ItIntrospectVersion,
225-
**/ItIstioCrossDomainTransaction,
226-
**/ItIstioDomainInImage,
230+
**/ItCrossDomainTransaction,
227231
**/ItIstioDomainInPV,
228232
**/ItIstioMiiDomain,
229-
**/ItIstioTwoDomainsInImage,
230-
**/ItKubernetesEvents,
231-
**/ItManageNameSpace,
232233
**/ItManagedCoherence,
233234
**/ItMiiDomain,
234-
**/ItMiiDomainModelInPV,
235235
**/ItMiiDynamicUpdate,
236-
**/ItMiiMultiModel,
237-
**/ItMiiSample,
236+
**/ItMiiSampleWlsMain,
238237
**/ItMiiUpdateDomainConfig,
239238
**/ItMonitoringExporter,
240-
**/ItOperatorRestart,
241239
**/ItParameterizedDomain,
242-
**/ItPodTemplates,
243-
**/ItPodsRestart,
244240
**/ItPodsShutdownOption,
245241
**/ItProductionSecureMode,
246242
**/ItWlsSamples,
247-
**/ItServerStartPolicy,
248243
**/ItSessionMigration,
249244
**/ItStickySession,
250-
**/ItSystemResOverrides,
251-
**/ItTwoDomainsLoadBalancer,
252-
**/ItUsabilityOperatorHelmChart
245+
**/ItSystemResOverrides
246+
</includes-failsafe>
247+
</properties>
248+
</profile>
249+
<profile>
250+
<id>fmw-pipeline</id>
251+
<properties>
252+
<skipITs>false</skipITs>
253+
<includes-failsafe>
254+
**/ItMiiAuxiliaryImage,
255+
**/ItMiiAuxiliaryImageCluster,
256+
**/ItMiiCustomSslStore,
257+
**/ItExternalRmiTunneling,
258+
**/ItIstioDomainInPV,
259+
**/ItMiiDomain,
260+
**/ItMiiUpdateDomainConfig,
261+
**/ItIstioDomainInImage,
262+
**/ItPodsShutdownOption,
263+
**/ItProductionSecureMode,
264+
**/ItSessionMigration,
265+
**/ItSystemResOverrides
253266
</includes-failsafe>
254267
</properties>
255268
</profile>

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
import static oracle.weblogic.kubernetes.TestConstants.RESULTS_ROOT;
4848
import static oracle.weblogic.kubernetes.TestConstants.WDT_TEST_VERSION;
4949
import static oracle.weblogic.kubernetes.TestConstants.WEBLOGIC_IMAGE_NAME;
50-
import static oracle.weblogic.kubernetes.TestConstants.WEBLOGIC_IMAGE_TAG;
50+
import static oracle.weblogic.kubernetes.TestConstants.WEBLOGIC_IMAGE_TO_USE_IN_SPEC;
5151
import static oracle.weblogic.kubernetes.actions.ActionConstants.ARCHIVE_DIR;
5252
import static oracle.weblogic.kubernetes.actions.ActionConstants.DOWNLOAD_DIR;
5353
import static oracle.weblogic.kubernetes.actions.ActionConstants.MODEL_DIR;
@@ -276,7 +276,7 @@ void testCreateDomainUsingMultipleAuxiliaryImages() {
276276
logger.info("Creating domain custom resource with domainUid {0} and auxiliary images {1} {2}",
277277
domainUid, miiAuxiliaryImage1, miiAuxiliaryImage2);
278278
Domain domainCR = createDomainResource(domainUid, domainNamespace,
279-
WEBLOGIC_IMAGE_NAME + ":" + WEBLOGIC_IMAGE_TAG, adminSecretName, OCIR_SECRET_NAME,
279+
WEBLOGIC_IMAGE_TO_USE_IN_SPEC, adminSecretName, OCIR_SECRET_NAME,
280280
encryptionSecretName, replicaCount, "cluster-1", auxiliaryImagePath,
281281
auxiliaryImageVolumeName, miiAuxiliaryImage1, miiAuxiliaryImage2);
282282

@@ -469,7 +469,7 @@ void testErrorPathDomainMismatchMountPath() {
469469
logger.info("Creating domain custom resource with domainUid {0} and auxiliary image {1}",
470470
domainUid, errorPathAuxiliaryImage1);
471471
Domain domainCR = createDomainResource(domainUid, errorpathDomainNamespace,
472-
WEBLOGIC_IMAGE_NAME + ":" + WEBLOGIC_IMAGE_TAG, adminSecretName, OCIR_SECRET_NAME,
472+
WEBLOGIC_IMAGE_TO_USE_IN_SPEC, adminSecretName, OCIR_SECRET_NAME,
473473
encryptionSecretName, replicaCount, "cluster-1", auxiliaryImagePath,
474474
auxiliaryImageVolumeName, errorPathAuxiliaryImage1);
475475

@@ -549,7 +549,7 @@ void testErrorPathDomainMissingWDTBinary() {
549549
logger.info("Creating domain custom resource with domainUid {0} and auxiliary image {1}",
550550
domainUid, errorPathAuxiliaryImage2);
551551
Domain domainCR = createDomainResource(domainUid, errorpathDomainNamespace,
552-
WEBLOGIC_IMAGE_NAME + ":" + WEBLOGIC_IMAGE_TAG, adminSecretName, OCIR_SECRET_NAME,
552+
WEBLOGIC_IMAGE_TO_USE_IN_SPEC, adminSecretName, OCIR_SECRET_NAME,
553553
encryptionSecretName, replicaCount, "cluster-1", auxiliaryImagePath,
554554
auxiliaryImageVolumeName, errorPathAuxiliaryImage2);
555555

@@ -636,7 +636,7 @@ void testErrorPathDomainMissingDomainConfig() {
636636
logger.info("Creating domain custom resource with domainUid {0} and auxiliary image {1}",
637637
domainUid, errorPathAuxiliaryImage3);
638638
Domain domainCR = createDomainResource(domainUid, errorpathDomainNamespace,
639-
WEBLOGIC_IMAGE_NAME + ":" + WEBLOGIC_IMAGE_TAG, adminSecretName, OCIR_SECRET_NAME,
639+
WEBLOGIC_IMAGE_TO_USE_IN_SPEC, adminSecretName, OCIR_SECRET_NAME,
640640
encryptionSecretName, replicaCount, "cluster-1", auxiliaryImagePath,
641641
auxiliaryImageVolumeName, errorPathAuxiliaryImage3);
642642

@@ -831,7 +831,7 @@ void testErrorPathFilePermission() {
831831
logger.info("Creating domain custom resource with domainUid {0} and auxiliary image {1}",
832832
domainUid, errorPathAuxiliaryImage4);
833833
Domain domainCR = createDomainResource(domainUid, errorpathDomainNamespace,
834-
WEBLOGIC_IMAGE_NAME + ":" + WEBLOGIC_IMAGE_TAG, adminSecretName, OCIR_SECRET_NAME,
834+
WEBLOGIC_IMAGE_TO_USE_IN_SPEC, adminSecretName, OCIR_SECRET_NAME,
835835
encryptionSecretName, replicaCount, "cluster-1", auxiliaryImagePath,
836836
auxiliaryImageVolumeName, errorPathAuxiliaryImage4);
837837

@@ -993,7 +993,7 @@ void testUpdateWDTVersionUsingMultipleAuxiliaryImages() {
993993
logger.info("Creating domain custom resource with domainUid {0} and auxiliary images {1} {2}",
994994
domainUid, miiAuxiliaryImage4, miiAuxiliaryImage5);
995995
Domain domainCR = createDomainResource(domainUid, wdtDomainNamespace,
996-
WEBLOGIC_IMAGE_NAME + ":" + WEBLOGIC_IMAGE_TAG, adminSecretName, OCIR_SECRET_NAME,
996+
WEBLOGIC_IMAGE_TO_USE_IN_SPEC, adminSecretName, OCIR_SECRET_NAME,
997997
encryptionSecretName, replicaCount, "cluster-1", auxiliaryImagePath,
998998
auxiliaryImageVolumeName, miiAuxiliaryImage4, miiAuxiliaryImage5);
999999

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@
3535
import static oracle.weblogic.kubernetes.TestConstants.MII_BASIC_IMAGE_TAG;
3636
import static oracle.weblogic.kubernetes.TestConstants.OCIR_SECRET_NAME;
3737
import static oracle.weblogic.kubernetes.TestConstants.RESULTS_ROOT;
38-
import static oracle.weblogic.kubernetes.TestConstants.WEBLOGIC_IMAGE_NAME;
39-
import static oracle.weblogic.kubernetes.TestConstants.WEBLOGIC_IMAGE_TAG;
38+
import static oracle.weblogic.kubernetes.TestConstants.WEBLOGIC_IMAGE_TO_USE_IN_SPEC;
4039
import static oracle.weblogic.kubernetes.actions.ActionConstants.MODEL_DIR;
4140
import static oracle.weblogic.kubernetes.actions.ActionConstants.RESOURCE_DIR;
4241
import static oracle.weblogic.kubernetes.actions.TestActions.dockerPush;
@@ -187,7 +186,7 @@ void testCreateDomainUsingAuxiliaryImagesWClusterConfig() {
187186
logger.info("Creating domain custom resource with domainUid {0} and auxiliary images {1} {2}",
188187
domainUid, auxiliaryImageDomainScopeNames.toString(), auxiliaryImageClusterScopeNames.toString());
189188
Domain domainCR = createDomainResourceWithAuxiliaryImageClusterScope(domainUid, domainNamespace,
190-
WEBLOGIC_IMAGE_NAME + ":" + WEBLOGIC_IMAGE_TAG, adminSecretName, OCIR_SECRET_NAME,
189+
WEBLOGIC_IMAGE_TO_USE_IN_SPEC, adminSecretName, OCIR_SECRET_NAME,
191190
encryptionSecretName, replicaCount, clusterName,
192191
Map.of(auxiliaryImagePath, List.of(auxiliaryImageVolumeName)),
193192
auxiliaryImageDomainScopeNames, auxiliaryImageClusterScopeNames);

integration-tests/src/test/java/oracle/weblogic/kubernetes/utils/ItMiiSampleHelper.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
import oracle.weblogic.kubernetes.actions.impl.primitive.CommandParams;
1212
import oracle.weblogic.kubernetes.annotations.IntegrationTest;
1313
import oracle.weblogic.kubernetes.logging.LoggingFacade;
14-
import oracle.weblogic.kubernetes.utils.ExecResult;
1514
import org.junit.jupiter.api.Assumptions;
1615
import org.junit.jupiter.api.DisplayName;
1716
import org.junit.jupiter.api.MethodOrderer;
@@ -29,8 +28,8 @@
2928
import static oracle.weblogic.kubernetes.TestConstants.OCIR_SECRET_NAME;
3029
import static oracle.weblogic.kubernetes.TestConstants.OKD;
3130
import static oracle.weblogic.kubernetes.TestConstants.RESULTS_ROOT;
32-
import static oracle.weblogic.kubernetes.TestConstants.WEBLOGIC_IMAGE_NAME;
3331
import static oracle.weblogic.kubernetes.TestConstants.WEBLOGIC_IMAGE_TAG;
32+
import static oracle.weblogic.kubernetes.TestConstants.WEBLOGIC_IMAGE_TO_USE_IN_SPEC;
3433
import static oracle.weblogic.kubernetes.assertions.TestAssertions.doesImageExist;
3534
import static oracle.weblogic.kubernetes.utils.CommonTestUtils.getDateAndTimeStamp;
3635
import static oracle.weblogic.kubernetes.utils.ImageUtils.createOcirRepoSecret;
@@ -115,7 +114,8 @@ public static void initAll(List<String> namespaces, DomainType domainTypeParam,
115114
envMap.put("TRAEFIK_HTTP_NODEPORT", "0"); // 0-->dynamically choose the np
116115
envMap.put("TRAEFIK_HTTPS_NODEPORT", "0"); // 0-->dynamically choose the np
117116
envMap.put("WORKDIR", MII_SAMPLES_WORK_DIR);
118-
envMap.put("BASE_IMAGE_NAME", WEBLOGIC_IMAGE_NAME);
117+
envMap.put("BASE_IMAGE_NAME", WEBLOGIC_IMAGE_TO_USE_IN_SPEC
118+
.substring(0, WEBLOGIC_IMAGE_TO_USE_IN_SPEC.lastIndexOf(":")));
119119
envMap.put("BASE_IMAGE_TAG", WEBLOGIC_IMAGE_TAG);
120120
envMap.put("IMAGE_PULL_SECRET_NAME", OCIR_SECRET_NAME); //ocir secret
121121
envMap.put("K8S_NODEPORT_HOST", K8S_NODEPORT_HOST);

jenkinsScript.sh

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,25 @@ cp linux-amd64/helm ${WORKSPACE}/bin/helm
9191
helm version
9292

9393
echo 'Info: Set up kubectl...'
94-
curl --ipv4 -LO --retry 3 https://storage.googleapis.com/kubernetes-release/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl
95-
mv kubectl bin/kubectl
94+
set +e
95+
echo 'Info: download from object storage'
96+
curl --ipv4 -LO --retry 3 https://objectstorage.eu-frankfurt-1.oraclecloud.com/n/weblogicondocker/b/bucket-wko-jenkins/o/v${KUBECTL_VERSION}_kubectl
97+
mv v${KUBECTL_VERSION}_kubectl bin/kubectl
9698
chmod +x bin/kubectl
99+
out=$(kubectl version --client=true)
100+
res=$?
101+
if [ $res -ne 0 ]; then
102+
for i in 1 2 3 ; do
103+
curl --ipv4 -LO --retry 3 https://storage.googleapis.com/kubernetes-release/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl
104+
mv kubectl bin/kubectl
105+
chmod +x bin/kubectl
106+
out=$(kubectl version --client=true)
107+
res=$?
108+
[ $res -eq 0 ] && break
109+
sleep 10
110+
done
111+
fi
112+
set -e
97113
kubectl version --client=true
98114

99115
echo 'Info: Set up kind...'

kindtest.sh

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,8 @@ EOF
282282
echo 'Set up test running ENVVARs...'
283283
export KIND_REPO="localhost:${reg_port}/"
284284
export K8S_NODEPORT_HOST=`kubectl get node kind-worker -o jsonpath='{.status.addresses[?(@.type == "InternalIP")].address}'`
285+
export no_proxy="${no_proxy},${K8S_NODEPORT_HOST}"
286+
echo 'no_proxy ${no_proxy}'
285287
if [[ "$OSTYPE" == "darwin"* ]]; then
286288
export JAVA_HOME=$(/usr/libexec/java_home)
287289
else
@@ -301,16 +303,17 @@ echo 'Clean up result root...'
301303
rm -rf "${RESULT_ROOT:?}/*"
302304

303305
echo "Run tests..."
304-
if [ "${maven_profile_name}" = "wls-image-cert" ] || [ "${maven_profile_name}" = "fmw-image-cert" ] || [ "${maven_profile_name}" = "kind-sequential" ] || [ "${maven_profile_name}" = "kind-parallel" ]; then
305-
echo "Running mvn -Dwdt.download.url=${wdt_download_url} -Dwit.download.url=${wit_download_url} -Dwle.download.url=${wle_download_url} -DPARALLEL_CLASSES=${parallel_run} -DNUMBER_OF_THREADS=${threads} -pl integration-tests -P ${maven_profile_name} verify"
306-
time mvn -Dwdt.download.url="${wdt_download_url}" -Dwit.download.url="${wit_download_url}" -Dwle.download.url="${wle_download_url}" -DPARALLEL_CLASSES="${parallel_run}" -DNUMBER_OF_THREADS="${threads}" -pl integration-tests -P ${maven_profile_name} verify 2>&1 | tee "${RESULT_ROOT}/kindtest.log"
306+
307+
if [ ${test_filter} != "**/It*" ]; then
308+
echo "Running mvn -Dit.test=${test_filter} -Dwdt.download.url=${wdt_download_url} -Dwit.download.url=${wit_download_url} -Dwle.download.url=${wle_download_url} -DPARALLEL_CLASSES=${parallel_run} -DNUMBER_OF_THREADS=${threads} -pl integration-tests -P ${maven_profile_name} verify"
309+
time mvn -Dit.test="${test_filter}" -Dwdt.download.url="${wdt_download_url}" -Dwit.download.url="${wit_download_url}" -Dwle.download.url="${wle_download_url}" -DPARALLEL_CLASSES="${parallel_run}" -DNUMBER_OF_THREADS="${threads}" -pl integration-tests -P ${maven_profile_name} verify 2>&1 | tee "${RESULT_ROOT}/kindtest.log" || captureLogs
307310
else
308-
if [ "${test_filter}" = "ItOperatorWlsUpgrade" ] || [ "${parallel_run}" = "false" ]; then
309-
echo "Running mvn -Dit.test=${test_filter}, !ItIstioCrossClusters, !ItOCILoadBalancer -Dwdt.download.url=${wdt_download_url} -Dwit.download.url=${wit_download_url} -Dwle.download.url=${wle_download_url} -pl integration-tests -P ${maven_profile_name} verify"
310-
time mvn -Dit.test="${test_filter}, !ItIstioCrossClusters*, !ItOCILoadBalancer" -Dwdt.download.url="${wdt_download_url}" -Dwit.download.url="${wit_download_url}" -Dwle.download.url="${wle_download_url}" -pl integration-tests -P ${maven_profile_name} verify 2>&1 | tee "${RESULT_ROOT}/kindtest.log" || captureLogs
311+
if [ "${maven_profile_name}" = "wls-image-cert" ] || [ "${maven_profile_name}" = "fmw-pipeline" ] || [ "${maven_profile_name}" = "fmw-image-cert" ] || [ "${maven_profile_name}" = "kind-sequential" ]; then
312+
echo "Running mvn -Dwdt.download.url=${wdt_download_url} -Dwit.download.url=${wit_download_url} -Dwle.download.url=${wle_download_url} -DPARALLEL_CLASSES=${parallel_run} -DNUMBER_OF_THREADS=${threads} -pl integration-tests -P ${maven_profile_name} verify"
313+
time mvn -Dwdt.download.url="${wdt_download_url}" -Dwit.download.url="${wit_download_url}" -Dwle.download.url="${wle_download_url}" -DPARALLEL_CLASSES="${parallel_run}" -DNUMBER_OF_THREADS="${threads}" -pl integration-tests -P ${maven_profile_name} verify 2>&1 | tee "${RESULT_ROOT}/kindtest.log" || captureLogs
311314
else
312-
echo "Running mvn -Dit.test=${test_filter}, !ItOperatorWlsUpgrade, !ItDedicatedMode, !ItT3Channel, !ItOpUpgradeFmwDomainInPV, !ItOCILoadBalancer, !ItIstioCrossClusters* -Dwdt.download.url=${wdt_download_url} -Dwit.download.url=${wit_download_url} -Dwle.download.url=${wle_download_url} -DPARALLEL_CLASSES=${parallel_run} -DNUMBER_OF_THREADS=${threads} -pl integration-tests -P ${maven_profile_name} verify"
313-
time mvn -Dit.test="${test_filter}, !ItOperatorWlsUpgrade, !ItFmwDomainInPVUsingWDT, !ItFmwDynamicDomainInPV, !ItDedicatedMode, !ItT3Channel, !ItOpUpgradeFmwDomainInPV, !ItOCILoadBalancer, !ItIstioCrossClusters*" -Dwdt.download.url="${wdt_download_url}" -Dwit.download.url="${wit_download_url}" -Dwle.download.url="${wle_download_url}" -DPARALLEL_CLASSES="${parallel_run}" -DNUMBER_OF_THREADS="${threads}" -pl integration-tests -P ${maven_profile_name} verify 2>&1 | tee "${RESULT_ROOT}/kindtest.log" || captureLogs
315+
echo "Running mvn -Dit.test=!ItOperatorWlsUpgrade, !ItDedicatedMode, !ItT3Channel, !ItOpUpgradeFmwDomainInPV, !ItOCILoadBalancer, !ItIstioCrossClusters* -Dwdt.download.url=${wdt_download_url} -Dwit.download.url=${wit_download_url} -Dwle.download.url=${wle_download_url} -DPARALLEL_CLASSES=${parallel_run} -DNUMBER_OF_THREADS=${threads} -pl integration-tests -P ${maven_profile_name} verify"
316+
time mvn -Dit.test="!ItOperatorWlsUpgrade, !ItFmwDomainInPVUsingWDT, !ItFmwDynamicDomainInPV, !ItDedicatedMode, !ItT3Channel, !ItOpUpgradeFmwDomainInPV, !ItOCILoadBalancer, !ItIstioCrossClusters*" -Dwdt.download.url="${wdt_download_url}" -Dwit.download.url="${wit_download_url}" -Dwle.download.url="${wle_download_url}" -DPARALLEL_CLASSES="${parallel_run}" -DNUMBER_OF_THREADS="${threads}" -pl integration-tests -P ${maven_profile_name} verify 2>&1 | tee "${RESULT_ROOT}/kindtest.log" || captureLogs
314317
fi
315318
fi
316319

0 commit comments

Comments
 (0)