Skip to content

Commit 04659ff

Browse files
marinakogrjeberhard
authored andcommitted
Backport oke-dev Jenkins job setup
1 parent 248875f commit 04659ff

File tree

69 files changed

+1246
-175
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+1246
-175
lines changed

Jenkinsfile.oke

Lines changed: 33 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//
44

55
CRON_SETTINGS = '''H 3 * * * % MAVEN_PROFILE_NAME=oke-gate;CLUSTER_NAME=seqone;PARALLEL_RUN=false
6-
H 2 * * * % MAVEN_PROFILE_NAME=oke-parallelnew;CLUSTER_NAME=parone;PARALLEL_RUN=true'''
6+
H 2 * * * % MAVEN_PROFILE_NAME=oke-parallel;CLUSTER_NAME=parone;PARALLEL_RUN=true'''
77
pipeline {
88
agent { label 'large' }
99
options {
@@ -57,6 +57,7 @@ pipeline {
5757
wle_download_url="https://github.com/oracle/weblogic-logging-exporter/releases/latest"
5858
kubeconfig_file = "${WORKSPACE}/terraform/${CLUSTER_NAME}_kubeconfig"
5959
availability_domain = "${env.JOB_NAME == 'wko-oke-nightly-parallel' ? 'mFEn:PHX-AD-1' : 'mFEn:PHX-AD-1'}"
60+
oke_run = "${env.JOB_NAME == 'wko-oke-nightly' ? 'okeint' : 'okeintdev'}"
6061

6162
}
6263

@@ -74,13 +75,13 @@ pipeline {
7475

7576
string(name: 'OKE_KUBE_VERSION',
7677
description: 'kube version for oke cluster',
77-
defaultValue: '1.28.2'
78+
defaultValue: '1.29.1'
7879
)
7980
string(name: 'IMAGE_ID',
8081
description: 'oci image id for node pool, find image OCID for your region from https://docs.oracle.com/iaas/images/',
8182
//defaultValue OKE1.26.2: 'ocid1.image.oc1.phx.aaaaaaaaaizmtmozeudeeuq7o5ir7dkl2bkxbbb3tgomshqbqn6jpomrsjza'
8283
//1.27.2 oke defaultValue: 'ocid1.image.oc1.phx.aaaaaaaaypr5r5drojwytghw6e6mvpjsscrnkuwtmqlmvmix7kjb2zcnc7wa'
83-
defaultValue: 'ocid1.image.oc1.phx.aaaaaaaajqv2odwgofwohn2chxfytl4uiupz2filik5e2rrepe3izq26pyrq'
84+
defaultValue: 'ocid1.image.oc1.phx.aaaaaaaa22u45gr3ikxnc6rius2qil2kz5k3e7p476c4usr6qnvql4l5dxea'
8485

8586
)
8687
string(name: 'KUBECTL_VERSION',
@@ -103,26 +104,22 @@ pipeline {
103104
'1.9.9'
104105
]
105106
)
106-
choice(name: 'CLUSTER_NAME',
107-
description: 'Oke cluster name.',
108-
choices: [
109-
'parone',
110-
'seqone',
111-
'seqtwo'
112-
]
113-
)
107+
114108
choice(name: 'MAVEN_PROFILE_NAME',
115-
description: 'Profile to use in mvn command to run the tests. Possible values are oke-gate, oke-sequential1,oke-parallelnew. Refer to weblogic-kubernetes-operator/integration-tests/pom.xml on the branch.',
109+
description: 'Profile to use in mvn command to run the tests. Possible values are oke-gate,oke-parallel. Refer to weblogic-kubernetes-operator/integration-tests/pom.xml on the branch.',
116110
choices: [
117111
'oke-gate',
118-
'oke-sequential1',
119-
'oke-parallelnew'
112+
'oke-parallel'
120113
]
121114
)
122115
string(name: 'NUMBER_OF_THREADS',
123116
description: 'Number of threads to run the classes in parallel, default is 3.',
124117
defaultValue: "3"
125118
)
119+
string(name: 'CLUSTER_NAME',
120+
description: 'OKE cluster name',
121+
defaultValue: "seqone"
122+
)
126123
string(name: 'WDT_DOWNLOAD_URL',
127124
description: 'URL to download WDT.',
128125
//defaultValue: 'https://github.com/oracle/weblogic-deploy-tooling/releases/latest'
@@ -139,6 +136,10 @@ pipeline {
139136
description: '',
140137
defaultValue: "VM.Standard.E3.Flex"
141138
)
139+
string(name: 'MOUNT_TARGET_OCID',
140+
description: 'only for debug runs on wko-oke-dev',
141+
defaultValue: "test"
142+
)
142143
string(name: 'BRANCH',
143144
description: '',
144145
defaultValue: "main"
@@ -351,6 +352,7 @@ vcn.ocid=${vcn_ocid}
351352
pub.subnet.ocid=${pub_subnet_ocid}
352353
private.subnet.ocid=${private_subnet_ocid}
353354
nodepool.shape=${NODE_SHAPE}
355+
mounttarget.ocid=${MOUNT_TARGET_OCID}
354356
nodepool.imagename=${IMAGE_ID}
355357
k8s.version=v${OKE_KUBE_VERSION}
356358
nodepool.ssh.pubkey=${ssh_pubkey}
@@ -393,7 +395,7 @@ EOF
393395
OCI_PROP_FILE="${WORKSPACE}/terraform/oci.prop"
394396
CLUSTER_NAME="${CLUSTER_NAME}"
395397
KUBECONFIG ="${WORKSPACE}/terraform/${CLUSTER_NAME}_kubeconfig"
396-
terraform_script_dir_name = "${WORKSPACE}/integration-tests/src/test/resources/oke/terraform/okeint"
398+
terraform_script_dir_name = "${WORKSPACE}/integration-tests/src/test/resources/oke/terraform/${oke_run}"
397399

398400
}
399401
steps {
@@ -413,7 +415,7 @@ EOF
413415
mkdir -p ${WORKSPACE}/terraform/terraforminstall
414416
sh ${WORKSPACE}/terraform/oke.create.sh ${OCI_PROP_FILE} ${WORKSPACE}/terraform
415417

416-
clusterIP=$(oci ce cluster list --compartment-id=${compartment_id} | jq '.data[] | select(."name" == '\"$CLUSTER_NAME}\"' and (."lifecycle-state" == "ACTIVE"))' | jq ' ."endpoints" | ."public-endpoint"')
418+
clusterIP=$(oci ce cluster list --compartment-id=${compartment_id} | jq '.data[] | select(."name" == '\"${CLUSTER_NAME}\"' and (."lifecycle-state" == "ACTIVE"))' | jq ' ."endpoints" | ."public-endpoint"')
417419

418420
echo "clusterIp : $clusterIP"
419421
clusterPublicIP=${clusterIP:1:-6}
@@ -454,9 +456,15 @@ EOF
454456
compartment_ocid=${compartment_id}
455457
echo "creating storage class to setup OFSS ..."
456458
echo "getting MountTarget ID"
457-
mount_target_id=`oci fs mount-target list --compartment-id=${compartment_ocid} --display-name=${clusterName}-mt --availability-domain=${availability_domain} | jq -r '.data[] | .id'`
459+
if [ "${JOB_NAME}" = "wko-oke-nightly" ]; then
460+
mount_target_id=`oci fs mount-target list --compartment-id=${compartment_ocid} --display-name=${clusterName}-mt --availability-domain=${availability_domain} | jq -r '.data[] | .id'`
461+
else
462+
mount_target_id=${MOUNT_TARGET_OCID}
463+
fi
464+
458465

459466
clusterIP=$(oci ce cluster list --compartment-id=${compartment_id} | jq '.data[] | select(."name" == '\"${CLUSTER_NAME}\"' and (."lifecycle-state" == "ACTIVE"))' | jq ' ."endpoints" | ."public-endpoint"')
467+
460468
echo "clusterIp : $clusterIP"
461469
clusterPublicIP=${clusterIP:1:-6}
462470
echo " clusterPublicIP : ${clusterPublicIP}"
@@ -479,7 +487,8 @@ EOF
479487
environment {
480488
runtime_path = "${WORKSPACE}/bin:${PATH}"
481489
clusterName = "${CLUSTER_NAME}"
482-
FSS_DIR = "/oketest1,/oketest2,/oketest3,/oketest4,/oketest5,/oketest6,/oketest7,/oketest8,/oketest9,/oketest10,/oketest11,/oketest12,/oketest13,/oketest14,/oketest15"
490+
FSS_DIR = "${env.JOB_NAME == 'wko-oke-nightly' ? '/oketest1,/oketest2,/oketest3,/oketest4,/oketest5,/oketest6,/oketest7,/oketest8,/oketest9,/oketest10,/oketest11,/oketest12,/oketest13,/oketest14,/oketest15' : '/${clusterName}oketest1,/${clusterName}oketest2'}"
491+
483492

484493
}
485494
steps {
@@ -534,8 +543,13 @@ EOF
534543
NODE_IP=`kubectl get nodes -o wide| awk '{print $7}'| head -n2 | tail -n1`
535544
echo "second node external IP ${NODE_IP}"
536545
export NODE_IP=${NODE_IP}
546+
if [ "${JOB_NAME}" = "wko-oke-nightly" ]; then
547+
echo "Mount Target setup for wko-oke-nightly"
548+
mt_privateip_id=`oci fs mount-target list --compartment-id=${compartment_ocid} --display-name=${clusterName}-mt --availability-domain=${availability_domain} | jq -r '.data[] | ."private-ip-ids"[]'`
537549

538-
mt_privateip_id=`oci fs mount-target list --compartment-id=${compartment_ocid} --display-name=${clusterName}-mt --availability-domain=${availability_domain} | jq -r '.data[] | ."private-ip-ids"[]'`
550+
else
551+
mt_privateip_id=`oci fs mount-target get --mount-target-id=${MOUNT_TARGET_OCID} | jq -r '.data| ."private-ip-ids"[]'`
552+
fi
539553
# Check if the mt_privateip_id is an array
540554
if [ "$(declare -p mt_privateip_id 2>/dev/null | grep -o 'declare -a')" == "declare -a" ]; then
541555
# Select first

integration-tests/pom.xml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -474,20 +474,6 @@
474474
<groups>oke-gate</groups>
475475
</properties>
476476
</profile>
477-
<profile>
478-
<id>oke-sequential1</id>
479-
<properties>
480-
<skipITs>false</skipITs>
481-
<groups>oke-sequential1</groups>
482-
</properties>
483-
</profile>
484-
<profile>
485-
<id>oke-parallelnew</id>
486-
<properties>
487-
<skipITs>false</skipITs>
488-
<groups>oke-parallelnew</groups>
489-
</properties>
490-
</profile>
491477
<profile>
492478
<id>oke-arm</id>
493479
<properties>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
@Tag("kind-parallel")
7373
@Tag("okd-wls-mrg")
7474
@Tag("oke-arm")
75-
@Tag("oke-parallelnew")
75+
@Tag("oke-parallel")
7676
class ItCoherenceTests {
7777

7878
// constants for Coherence

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
@Tag("kind-parallel")
4040
@Tag("olcne-mrg")
4141
@Tag("oke-arm")
42-
@Tag("oke-parallelnew")
42+
@Tag("oke-parallel")
4343
class ItConsensusLeasingValidation {
4444

4545
private static String opNamespace = null;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
@Tag("kind-parallel")
4848
@Tag("olcne-mrg")
4949
@Tag("oke-arm")
50-
@Tag("oke-parallelnew")
50+
@Tag("oke-parallel")
5151
class ItDataHomeOverride {
5252

5353
// domain constants

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
@Tag("kind-parallel")
6363
@Tag("okd-wls-mrg")
6464
@Tag("oke-arm")
65-
@Tag("oke-parallelnew")
65+
@Tag("oke-parallel")
6666
class ItDiagnosticsCompleteAvailableCondition {
6767

6868
private static final String cluster1Name = "cluster-1";

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110
@Tag("kind-parallel")
111111
@Tag("okd-wls-mrg")
112112
@Tag("oke-arm")
113-
@Tag("oke-parallelnew")
113+
@Tag("oke-parallel")
114114
class ItDiagnosticsFailedCondition {
115115

116116
private static String domainNamespace = null;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
@Tag("olcne-mrg")
102102
@Tag("kind-parallel")
103103
@Tag("okd-wls-mrg")
104-
@Tag("oke-parallelnew")
104+
@Tag("oke-parallel")
105105

106106
class ItElasticLogging {
107107

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@
113113
@Tag("olcne-mrg")
114114
@Tag("kind-parallel")
115115
@Tag("okd-wls-mrg")
116-
@Tag("oke-parallelnew")
116+
@Tag("oke-parallel")
117117
class ItElasticLoggingFluentd {
118118

119119
// constants for creating domain image using model in image

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
@IntegrationTest
5555
@Tag("olcne-mrg")
5656
@Tag("kind-parallel")
57-
@Tag("oke-parallelnew")
57+
@Tag("oke-parallel")
5858
class ItEvictedPodsCycling {
5959

6060
// constants for Domain

0 commit comments

Comments
 (0)