Skip to content

Commit 94c8ba2

Browse files
marinakogrjeberhard
authored andcommitted
Fix for running external Jenkins Job for OKE with current image path changes
1 parent 34a424b commit 94c8ba2

File tree

10 files changed

+46
-20
lines changed

10 files changed

+46
-20
lines changed

Jenkinsfile.oke

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,16 @@ pipeline {
6161

6262
string(name: 'KUBE_VERSION',
6363
description: 'kube version for oke cluster',
64-
defaultValue: '1.25.4'
64+
defaultValue: '1.26.2'
6565
)
6666
string(name: 'IMAGE_ID',
6767
description: 'oci image id for node pool, find image OCID for your region from https://docs.oracle.com/iaas/images/',
6868
//defaultValue7.6: 'ocid1.image.oc1.phx.aaaaaaaancucg25pze6m52agxwxmmfszvsdnhp3kvim53pts2tw6mik4xtha'
69-
defaultValue: 'ocid1.image.oc1.phx.aaaaaaaancq36l7q4fqwznqhnp626wuekkq7twk2em5ysyd65bd4xho72tmq'
69+
defaultValue: 'ocid1.image.oc1.phx.aaaaaaaanubtknjwx3bra4zvi3kuwgkpiku2brdjjzj5eiv7pimmzfjka4dq'
7070
)
7171
string(name: 'KUBECTL_VERSION',
7272
description: 'kubectl version',
73-
defaultValue: '1.25.4'
73+
defaultValue: '1.26.2'
7474
)
7575
string(name: 'HELM_VERSION',
7676
description: 'Helm version',
@@ -113,25 +113,33 @@ pipeline {
113113
description: '',
114114
defaultValue: 'phx.ocir.io'
115115
)
116+
string(name: 'NODE_SHAPE',
117+
description: '',
118+
defaultValue: 'VM.Standard.E3.Flex'
119+
)
120+
string(name: 'BRANCH',
121+
description: '',
122+
defaultValue: 'okeextfix'
123+
)
116124
string(name: 'WEBLOGIC_IMAGE_NAME',
117125
description: 'WebLogic base image name. Default is the image name in OCIR. Use middleware/weblogic for OCR.',
118-
defaultValue: 'weblogick8s/test-images/weblogic'
126+
defaultValue: 'test-images/weblogic'
119127
)
120128
string(name: 'WEBLOGIC_IMAGE_TAG',
121129
description: '12.2.1.3 (12.2.1.3-ol7) , 12.2.1.3-dev (12.2.1.3-dev-ol7), 12.2.1.3-ol8, 12.2.1.3-dev-ol8, 12.2.1.4, 12.2.1.4-dev(12.2.1.4-dev-ol7) , 12.2.1.4-slim(12.2.1.4-slim-ol7), 12.2.1.4-ol8, 12.2.1.4-dev-ol8, 12.2.1.4-slim-ol8, 14.1.1.0-11-ol7, 14.1.1.0-dev-11-ol7, 14.1.1.0-slim-11-ol7, 14.1.1.0-8-ol7, 14.1.1.0-dev-8-ol7, 14.1.1.0-slim-8-ol7, 14.1.1.0-11-ol8, 14.1.1.0-dev-11-ol8, 14.1.1.0-slim-11-ol8, 14.1.1.0-8-ol8, 14.1.1.0-dev-8-ol8, 14.1.1.0-slim-8-ol8',
122130
defaultValue: '12.2.1.4'
123131
)
124132
string(name: 'FMWINFRA_IMAGE_NAME',
125133
description: 'FWM Infra image name. Default is the image name in OCIR. Use middleware/fmw-infrastructure for OCR.',
126-
defaultValue: 'weblogick8s/test-images/fmw-infrastructure'
134+
defaultValue: 'test-images/fmw-infrastructure'
127135
)
128136
string(name: 'FMWINFRA_IMAGE_TAG',
129137
description: 'FWM Infra image tag',
130138
defaultValue: '12.2.1.4'
131139
)
132140
string(name: 'DB_IMAGE_NAME',
133141
description: 'Oracle DB image name. Default is the image name in OCIR, use database/enterprise for OCR.',
134-
defaultValue: 'weblogick8s/test-images/database/enterprise'
142+
defaultValue: 'test-images/database/enterprise'
135143
)
136144
string(name: 'DB_IMAGE_TAG',
137145
description: 'Oracle DB image tag',
@@ -205,7 +213,7 @@ pipeline {
205213
stage('Setup terraform property file ') {
206214
environment {
207215
OKE_CLUSTER_NAME="${CLUSTER_NAME}"
208-
NODE_SHAPE="VM.Standard2.24"
216+
NODE_SHAPE="${NODE_SHAPE}"
209217
IMAGE_ID="${IMAGE_ID}"
210218
OCI_PROP_FILE="${WORKSPACE}/terraform/oci.prop"
211219
TVARS_FILE = credentials("${terraform_property_file}")

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,13 @@
5555
import static oracle.weblogic.kubernetes.TestConstants.ADMIN_USERNAME_DEFAULT;
5656
import static oracle.weblogic.kubernetes.TestConstants.ADMIN_USERNAME_PATCH;
5757
import static oracle.weblogic.kubernetes.TestConstants.DOMAIN_API_VERSION;
58+
import static oracle.weblogic.kubernetes.TestConstants.DOMAIN_IMAGES_PREFIX;
5859
import static oracle.weblogic.kubernetes.TestConstants.DOMAIN_IMAGES_REPO;
5960
import static oracle.weblogic.kubernetes.TestConstants.DOMAIN_STATUS_CONDITION_ROLLING_TYPE;
6061
import static oracle.weblogic.kubernetes.TestConstants.IMAGE_PULL_POLICY;
6162
import static oracle.weblogic.kubernetes.TestConstants.K8S_NODEPORT_HOST;
6263
import static oracle.weblogic.kubernetes.TestConstants.KIND_REPO;
6364
import static oracle.weblogic.kubernetes.TestConstants.KUBERNETES_CLI;
64-
import static oracle.weblogic.kubernetes.TestConstants.TEST_IMAGES_REPO;
6565
import static oracle.weblogic.kubernetes.TestConstants.WEBLOGIC_IMAGE_NAME;
6666
import static oracle.weblogic.kubernetes.TestConstants.WEBLOGIC_IMAGE_NAME_DEFAULT;
6767
import static oracle.weblogic.kubernetes.TestConstants.WEBLOGIC_IMAGE_TO_USE_IN_SPEC;
@@ -727,7 +727,7 @@ void testUpdateImageName() {
727727
logger.info("WEBLOGIC_IMAGE_NAME {0}", WEBLOGIC_IMAGE_NAME);
728728

729729
String kindWlsImage = KIND_REPO + WEBLOGIC_IMAGE_NAME_DEFAULT;
730-
String testWlsImage = TEST_IMAGES_REPO + "/" + WEBLOGIC_IMAGE_NAME_DEFAULT;
730+
String testWlsImage = DOMAIN_IMAGES_PREFIX + WEBLOGIC_IMAGE_NAME_DEFAULT;
731731
//change image name to imageUpdate
732732
String imageTag = CommonTestUtils.getDateAndTimeStamp();
733733
String imageUpdate = KIND_REPO != null

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ public static void initAll(@Namespaces(4) List<String> namespaces) {
204204
// this secret is used only for non-kind cluster
205205
createBaseRepoSecret(fmwDomainNamespace);
206206
createBaseRepoSecret(wlsDomainNamespace);
207-
207+
createTestRepoSecret(wlsDomainNamespace);
208208
// create PV, PVC for logs/data
209209
createPV(pvName, wlsDomainUid, ItIstioDBOperator.class.getSimpleName());
210210
createPVC(pvName, pvcName, wlsDomainUid, wlsDomainNamespace);
@@ -406,7 +406,6 @@ void testIstioWlsModelInImageWithDbOperator() {
406406

407407
// Create the repo secret to pull the image
408408
// this secret is used only for non-kind cluster
409-
createTestRepoSecret(wlsDomainNamespace);
410409

411410
// create secret for admin credentials
412411
logger.info("Create secret for admin credentials");

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131

3232
import static oracle.weblogic.kubernetes.TestConstants.ADMIN_PASSWORD_DEFAULT;
3333
import static oracle.weblogic.kubernetes.TestConstants.ADMIN_USERNAME_DEFAULT;
34+
import static oracle.weblogic.kubernetes.TestConstants.DOMAIN_IMAGES_PREFIX;
3435
import static oracle.weblogic.kubernetes.TestConstants.DOMAIN_STATUS_CONDITION_FAILED_TYPE;
3536
import static oracle.weblogic.kubernetes.TestConstants.DOMAIN_VERSION;
3637
import static oracle.weblogic.kubernetes.TestConstants.IMAGE_PULL_POLICY;
@@ -401,7 +402,7 @@ void testUpdateBaseImageName() {
401402
String imageTag = getDateAndTimeStamp();
402403
String imageUpdate = KIND_REPO != null ? KIND_REPO
403404
+ (WEBLOGIC_IMAGE_NAME_DEFAULT + ":" + imageTag).substring(TestConstants.BASE_IMAGES_REPO.length() + 1)
404-
: TEST_IMAGES_REPO + "/" + WEBLOGIC_IMAGE_NAME_DEFAULT + ":" + imageTag;
405+
: DOMAIN_IMAGES_PREFIX + TEST_IMAGES_REPO + "/" + WEBLOGIC_IMAGE_NAME_DEFAULT + ":" + imageTag;
405406
imageTag(imageName, imageUpdate);
406407
imageRepoLoginAndPushImageToRegistry(imageUpdate);
407408

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
import static oracle.weblogic.kubernetes.TestConstants.ADMIN_PASSWORD_DEFAULT;
4040
import static oracle.weblogic.kubernetes.TestConstants.ADMIN_USERNAME_DEFAULT;
4141
import static oracle.weblogic.kubernetes.TestConstants.BASE_IMAGES_REPO_SECRET_NAME;
42-
import static oracle.weblogic.kubernetes.TestConstants.DOMAIN_IMAGES_REPO;
42+
import static oracle.weblogic.kubernetes.TestConstants.DOMAIN_IMAGES_PREFIX;
4343
import static oracle.weblogic.kubernetes.TestConstants.DOMAIN_VERSION;
4444
import static oracle.weblogic.kubernetes.TestConstants.FSS_DIR;
4545
import static oracle.weblogic.kubernetes.TestConstants.K8S_NODEPORT_HOST;
@@ -217,7 +217,7 @@ void testSampleDomainInImage(String model) {
217217
String domainName = model.split(":")[1];
218218
String script = model.split(":")[0];
219219

220-
String imageName = DOMAIN_IMAGES_REPO + diiImageNameBase + "-" + script + ":" + diiImageTag;
220+
String imageName = DOMAIN_IMAGES_PREFIX + diiImageNameBase + "-" + script + ":" + diiImageTag;
221221
Path testSamplePath = get(WORK_DIR, "wls-sample-testing", "domainInImage", domainName, script);
222222
//copy the samples directory to a temporary location
223223
setupSample(testSamplePath);

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

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -852,8 +852,12 @@ public static String createOracleDBUsingOperator(String dbName, String sysPasswo
852852
replaceStringInFile(dbYaml.toString(), "secretKey:", "secretKey: " + secretKey);
853853
replaceStringInFile(dbYaml.toString(), "pullFrom:", "pullFrom: " + DB_IMAGE_19C);
854854
replaceStringInFile(dbYaml.toString(), "pullSecrets:", "pullSecrets: " + BASE_IMAGES_REPO_SECRET_NAME);
855+
String storageClass = "weblogic-domain-storage-class";
856+
if (OKE_CLUSTER) {
857+
storageClass = "oci-fss";
858+
}
855859
replaceStringInFile(dbYaml.toString(), "storageClass: \"oci-bv\"",
856-
"storageClass: \"weblogic-domain-storage-class\"");
860+
"storageClass: \"" + storageClass + "\"");
857861
replaceStringInFile(dbYaml.toString(), "accessMode: \"ReadWriteOnce\"", "accessMode: \"ReadWriteMany\"");
858862
replaceStringInFile(dbYaml.toString(), "volumeName: \"\"", "volumeName: \"" + pvName + "\"");
859863

@@ -935,8 +939,12 @@ public static String createOraclePrebuiltDBUsingOperator(String dbName, String s
935939
replaceStringInFile(dbYaml.toString(), "pullFrom: container-registry.oracle.com/database/express:latest",
936940
"pullFrom: " + DB_PREBUILT_IMAGE);
937941
replaceStringInFile(dbYaml.toString(), "pullSecrets:", "pullSecrets: " + BASE_IMAGES_REPO_SECRET_NAME);
942+
String storageClass = "weblogic-domain-storage-class";
943+
if (OKE_CLUSTER) {
944+
storageClass = "oci-fss";
945+
}
938946
replaceStringInFile(dbYaml.toString(), "storageClass: \"oci-bv\"",
939-
"storageClass: \"weblogic-domain-storage-class\"");
947+
"storageClass: \"" + storageClass + "\"");
940948
replaceStringInFile(dbYaml.toString(), "accessMode: \"ReadWriteOnce\"", "accessMode: \"ReadWriteMany\"");
941949
replaceStringInFile(dbYaml.toString(), "volumeName: \"\"", "volumeName: \"" + pvName + "\"");
942950

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ public static String createImageAndPushToRepo(String dockerFileDir, String baseI
589589
// create unique image name with date
590590
final String imageTag = getDateAndTimeStamp();
591591
// Add repository name in image name for Jenkins runs
592-
final String imageName = DOMAIN_IMAGES_REPO + baseImageName;
592+
final String imageName = DOMAIN_IMAGES_PREFIX + baseImageName;
593593

594594
final String image = imageName + ":" + imageTag;
595595
LoggingFacade logger = getLogger();

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import static oracle.weblogic.kubernetes.TestConstants.BASE_IMAGES_REPO_SECRET_NAME;
2121
import static oracle.weblogic.kubernetes.TestConstants.DB_IMAGE_TAG;
2222
import static oracle.weblogic.kubernetes.TestConstants.DB_IMAGE_TO_USE_IN_SPEC;
23-
import static oracle.weblogic.kubernetes.TestConstants.DOMAIN_IMAGES_REPO;
23+
import static oracle.weblogic.kubernetes.TestConstants.DOMAIN_IMAGES_PREFIX;
2424
import static oracle.weblogic.kubernetes.TestConstants.FMWINFRA_IMAGE_TAG;
2525
import static oracle.weblogic.kubernetes.TestConstants.FMWINFRA_IMAGE_TO_USE_IN_SPEC;
2626
import static oracle.weblogic.kubernetes.TestConstants.K8S_NODEPORT_HOST;
@@ -80,7 +80,7 @@ public enum ImageType {
8080
}
8181

8282
private String getModelImageName(String suffix) {
83-
return new StringBuffer(DOMAIN_IMAGES_REPO)
83+
return new StringBuffer(DOMAIN_IMAGES_PREFIX)
8484
.append("mii-")
8585
.append(suffix).toString();
8686
}

integration-tests/src/test/resources/oke/terraform/node-pool.tf

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ resource "oci_containerengine_node_pool" "tfsample_node_pool" {
2929
source_type = "image"
3030
boot_volume_size_in_gbs = "200"
3131
}
32-
32+
node_shape_config {
33+
#Optional
34+
memory_in_gbs = 192.0
35+
ocpus = 3.0
36+
}
3337
# Optional
3438
initial_node_labels {
3539
key = "name"

kubernetes/samples/scripts/terraform/cluster.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,12 @@ resource "oci_containerengine_node_pool" "tfsample_node_pool" {
100100
create = "60m"
101101
delete = "2h"
102102
}
103+
node_shape_config {
104+
#Optional
105+
memory_in_gbs = 200.0
106+
ocpus = 3.0
107+
}
108+
103109

104110
#Optional
105111
quantity_per_subnet = var.node_pool_quantity_per_subnet

0 commit comments

Comments
 (0)