@@ -12,6 +12,7 @@ properties([
1212 string(name: 'PIPELINE_OPERATOR_IMAGE', defaultValue: "cp/runtime-component-operator", description: 'namespace to push image to in registry'),
1313 string(name: 'RELEASE_TARGET', defaultValue: "main", description: 'release branch to use'),
1414 string(name: 'PIPELINE_PRODUCTION_IMAGE', defaultValue: "icr.io/cpopen/runtime-component-operator", description: 'namespace in prod registry'),
15+ string(name: 'PIPELINE_TYPE', defaultValue: "1pipeline", description: 'Type of pipeline running'),
1516 string(name: 'REDHAT_BASE_IMAGE', defaultValue: "registry.redhat.io/openshift4/ose-operator-registry", description: 'base image for operator'),
1617 string(name: 'REDHAT_REGISTRY', defaultValue: "registry.redhat.io", description: 'RH registry used for docker login'),
1718 string(name: 'PIPELINE_REGISTRY', defaultValue: "cp.stg.icr.io", description: 'staging registry to push images to'),
@@ -82,19 +83,29 @@ timestamps {
8283
8384// Clone the git repo and stash it, so that the jenkins agent machine can grab it later
8485def gitCloneAndStash() {
85- dir('runtime-component-operator') {
86- git branch: "main", url: "
[email protected] :${scriptOrg}/runtime-component-operator.git"
87- sh "git checkout ${RELEASE_TARGET}"
88- }
89- dir('operators') {
90- git branch: "main", url: "
[email protected] :websphere/operators.git"
91- sh "git checkout ${COMMON_OPERATORS_BRANCH}"
92- }
93- sh "cp -rf operators runtime-component-operator/"
94- dir('runtime-component-operator') {
95- stash(name: 'runtime-component-operator')
96- }
97- sh "ls -l"
86+ dir('runtime-component-operator') {
87+ git branch: "main", url: "
[email protected] :${scriptOrg}/runtime-component-operator.git"
88+ sh "git checkout ${RELEASE_TARGET}"
89+ }
90+ if (params.PIPELINE_TYPE == "SPS") {
91+ dir('runtime-component-operator-sps-config') {
92+ git branch: "main", url: "
[email protected] :websphere-operators-sps/websphere-liberty-operator-sps-config.git"
93+ sh "git checkout ${COMMON_OPERATORS_BRANCH}"
94+ }
95+ sh "mkdir runtime-component-operator/operators"
96+ sh "cp -rf websphere-liberty-operator-sps-config/scripts runtime-component-operator/operators/scripts"
97+ }
98+ else {
99+ dir('operators') {
100+ git branch: "main", url: "
[email protected] :websphere/operators.git"
101+ sh "git checkout ${COMMON_OPERATORS_BRANCH}"
102+ }
103+ sh "cp -rf operators runtime-component-operator/"
104+ }
105+ dir('runtime-component-operator') {
106+ stash(name: 'runtime-component-operator')
107+ }
108+ sh "ls -l"
98109}
99110
100111// Job Specific Functions
@@ -141,4 +152,4 @@ def void ebcCleanup(){
141152 sh "./ebc_complete.sh"
142153 }
143154 }
144- }
155+ }
0 commit comments