11
11
import static oracle .weblogic .kubernetes .utils .CommonTestUtils .getDateAndTimeStamp ;
12
12
import static oracle .weblogic .kubernetes .utils .CommonTestUtils .getDomainImagePrefix ;
13
13
import static oracle .weblogic .kubernetes .utils .CommonTestUtils .getEnvironmentProperty ;
14
+ import static oracle .weblogic .kubernetes .utils .CommonTestUtils .getImageRepoFromImageName ;
14
15
import static oracle .weblogic .kubernetes .utils .CommonTestUtils .getKindRepoImageForSpec ;
15
16
import static oracle .weblogic .kubernetes .utils .CommonTestUtils .getKindRepoValue ;
16
17
import static oracle .weblogic .kubernetes .utils .CommonTestUtils .getNonEmptySystemProperty ;
@@ -60,11 +61,15 @@ public interface TestConstants {
60
61
// kind constants
61
62
public static final String KIND_REPO = getKindRepoValue ("wko.it.kind.repo" );
62
63
64
+ // crio pipeline constants
65
+ public static final String CRIO_PIPELINE_IMAGE = System .getProperty ("wko.it.crio.pipeline.image" );
66
+
63
67
// BASE_IMAGES_REPO represents the repository from where all the base WebLogic
64
68
// and InfraStructure images are pulled
65
- //
66
- public static final String BASE_IMAGES_REPO = System .getProperty ("wko.it.base.images.repo" );
69
+ public static final String BASE_IMAGES_REPO = Optional . ofNullable ( getImageRepoFromImageName ( CRIO_PIPELINE_IMAGE ))
70
+ . orElse ( System .getProperty ("wko.it.base.images.repo" ) );
67
71
public static final String BASE_IMAGES_TENANCY = System .getProperty ("wko.it.base.images.tenancy" );
72
+ public static final String BASE_IMAGES_PREFIX = getDomainImagePrefix (BASE_IMAGES_REPO , BASE_IMAGES_TENANCY );
68
73
69
74
public static final String BASE_IMAGES_REPO_USERNAME = System .getenv ("BASE_IMAGES_REPO_USERNAME" );
70
75
public static final String BASE_IMAGES_REPO_PASSWORD = System .getenv ("BASE_IMAGES_REPO_PASSWORD" );
@@ -75,7 +80,8 @@ public interface TestConstants {
75
80
// images such as nginx,elasticsearch,Oracle DB operator (b) all test domain
76
81
// images to be pushed into it.
77
82
//
78
- public static final String TEST_IMAGES_REPO = System .getProperty ("wko.it.test.images.repo" );
83
+ public static final String TEST_IMAGES_REPO = Optional .ofNullable (getImageRepoFromImageName (CRIO_PIPELINE_IMAGE ))
84
+ .orElse (System .getProperty ("wko.it.test.images.repo" ));
79
85
public static final String TEST_IMAGES_TENANCY = System .getProperty ("wko.it.test.images.tenancy" );
80
86
81
87
public static final String TEST_IMAGES_REPO_USERNAME = System .getenv ("TEST_IMAGES_REPO_USERNAME" );
@@ -106,21 +112,21 @@ public interface TestConstants {
106
112
// Get WEBLOGIC_IMAGE_NAME/WEBLOGIC_IMAGE_TAG from env var,
107
113
// if its not provided use OCIR default image values
108
114
//
109
- public static final String WEBLOGIC_IMAGE_NAME = BASE_IMAGES_REPO + "/" + BASE_IMAGES_TENANCY + "/"
115
+ public static final String WEBLOGIC_IMAGE_NAME = BASE_IMAGES_PREFIX
110
116
+ getNonEmptySystemProperty ("wko.it.weblogic.image.name" , WEBLOGIC_IMAGE_NAME_DEFAULT );
111
117
public static final String WEBLOGIC_IMAGE_TAG = getNonEmptySystemProperty ("wko.it.weblogic.image.tag" ,
112
118
WEBLOGIC_IMAGE_TAG_DEFAULT );
113
119
114
120
// Get FMWINFRA_IMAGE_NAME/FMWINFRA_IMAGE_TAG from env var, if its not
115
121
// provided and if base images repo is OCIR use OCIR default image values
116
- public static final String FMWINFRA_IMAGE_NAME = BASE_IMAGES_REPO + "/" + BASE_IMAGES_TENANCY + "/"
122
+ public static final String FMWINFRA_IMAGE_NAME = BASE_IMAGES_PREFIX
117
123
+ getNonEmptySystemProperty ("wko.it.fmwinfra.image.name" , FMWINFRA_IMAGE_NAME_DEFAULT );
118
124
public static final String FMWINFRA_IMAGE_TAG = getNonEmptySystemProperty ("wko.it.fmwinfra.image.tag" ,
119
125
FMWINFRA_IMAGE_TAG_DEFAULT );
120
126
121
127
// Get DB_IMAGE_NAME/DB_IMAGE_TAG from env var, if its not provided and
122
128
// if base images repo is OCIR use OCIR default image values
123
- public static final String DB_IMAGE_NAME = BASE_IMAGES_REPO + "/" + BASE_IMAGES_TENANCY + "/"
129
+ public static final String DB_IMAGE_NAME = BASE_IMAGES_PREFIX
124
130
+ getNonEmptySystemProperty ("wko.it.db.image.name" , DB_IMAGE_NAME_DEFAULT );
125
131
public static final String DB_IMAGE_TAG = getNonEmptySystemProperty ("wko.it.db.image.tag" , DB_IMAGE_TAG_DEFAULT );
126
132
@@ -201,7 +207,7 @@ public interface TestConstants {
201
207
public static final String APACHE_IMAGE_TAG_DEFAULT = "12.2.1.4" ;
202
208
203
209
// Get APACHE_IMAGE_NAME/APACHE_IMAGE_TAG from env var, if it is not provided use OCIR default image values
204
- public static final String APACHE_IMAGE_NAME = BASE_IMAGES_REPO + "/" + BASE_IMAGES_TENANCY + "/"
210
+ public static final String APACHE_IMAGE_NAME = BASE_IMAGES_PREFIX
205
211
+ getNonEmptySystemProperty ("wko.it.apache.image.name" , APACHE_IMAGE_NAME_DEFAULT );
206
212
public static final String APACHE_IMAGE_TAG =
207
213
getNonEmptySystemProperty ("wko.it.apache.image.tag" , APACHE_IMAGE_TAG_DEFAULT );
@@ -402,8 +408,7 @@ public interface TestConstants {
402
408
public static final String ORACLE_DB_OPERATOR_RELEASE_LATEST = "release/0.2.0" ;
403
409
public static final String ORACLE_DB_OPERATOR_RELEASE =
404
410
getNonEmptySystemProperty ("wko.it.oracle.db.operator.release" , ORACLE_DB_OPERATOR_RELEASE_LATEST );
405
- public static final String DB_OPERATOR_IMAGE = BASE_IMAGES_REPO + "/" + BASE_IMAGES_TENANCY
406
- + "/test-images/database/operator:0.2.0" ;
411
+ public static final String DB_OPERATOR_IMAGE = BASE_IMAGES_PREFIX + "test-images/database/operator:0.2.0" ;
407
412
public static final String CERT_MANAGER
408
413
= "https://github.com/jetstack/cert-manager/releases/latest/download/cert-manager.yaml" ;
409
414
public static final String DB_OPERATOR_YAML_URL = "https://raw.githubusercontent.com/"
0 commit comments