summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2015-10-08 16:53:35 +0000
committerGerrit Code Review <review@openstack.org>2015-10-08 16:53:35 +0000
commit556deebe25e4a03d2d1b22d54ba6e41fadde8804 (patch)
tree49954f666eb6d132b07363092a39a2ddc421580c
parent3f0ff2dff6f60c5b9c098be0d03c64366e5b99d3 (diff)
parent73c255d649af01f2249f0693d9f62c5254ad923a (diff)
downloadpython-jenkins-job-builder-556deebe25e4a03d2d1b22d54ba6e41fadde8804.tar.gz
python-jenkins-job-builder-556deebe25e4a03d2d1b22d54ba6e41fadde8804.tar.xz
python-jenkins-job-builder-556deebe25e4a03d2d1b22d54ba6e41fadde8804.zip
Merge "Implements: additions for OS3 plugin entry points in builders and scm"
-rw-r--r--jenkins_jobs/modules/builders.py337
-rw-r--r--jenkins_jobs/modules/scm.py60
-rw-r--r--setup.cfg8
-rw-r--r--tests/builders/fixtures/openshift-build-verify001.xml11
-rw-r--r--tests/builders/fixtures/openshift-build-verify001.yaml6
-rw-r--r--tests/builders/fixtures/openshift-build-verify002.xml10
-rw-r--r--tests/builders/fixtures/openshift-build-verify002.yaml2
-rw-r--r--tests/builders/fixtures/openshift-builder001.xml12
-rw-r--r--tests/builders/fixtures/openshift-builder001.yaml7
-rw-r--r--tests/builders/fixtures/openshift-builder002.xml11
-rw-r--r--tests/builders/fixtures/openshift-builder002.yaml2
-rw-r--r--tests/builders/fixtures/openshift-dep-verify001.xml12
-rw-r--r--tests/builders/fixtures/openshift-dep-verify001.yaml7
-rw-r--r--tests/builders/fixtures/openshift-dep-verify002.xml11
-rw-r--r--tests/builders/fixtures/openshift-dep-verify002.yaml2
-rw-r--r--tests/builders/fixtures/openshift-deployer001.xml11
-rw-r--r--tests/builders/fixtures/openshift-deployer001.yaml6
-rw-r--r--tests/builders/fixtures/openshift-deployer002.xml10
-rw-r--r--tests/builders/fixtures/openshift-deployer002.yaml2
-rw-r--r--tests/builders/fixtures/openshift-img-tagger001.xml12
-rw-r--r--tests/builders/fixtures/openshift-img-tagger001.yaml7
-rw-r--r--tests/builders/fixtures/openshift-img-tagger002.xml11
-rw-r--r--tests/builders/fixtures/openshift-img-tagger002.yaml2
-rw-r--r--tests/builders/fixtures/openshift-scaler001.xml12
-rw-r--r--tests/builders/fixtures/openshift-scaler001.yaml7
-rw-r--r--tests/builders/fixtures/openshift-scaler002.xml11
-rw-r--r--tests/builders/fixtures/openshift-scaler002.yaml2
-rw-r--r--tests/builders/fixtures/openshift-svc-verify001.xml11
-rw-r--r--tests/builders/fixtures/openshift-svc-verify001.yaml6
-rw-r--r--tests/builders/fixtures/openshift-svc-verify002.xml10
-rw-r--r--tests/builders/fixtures/openshift-svc-verify002.yaml2
-rw-r--r--tests/scm/fixtures/openshift-img-streams001.xml10
-rw-r--r--tests/scm/fixtures/openshift-img-streams001.yaml7
-rw-r--r--tests/scm/fixtures/openshift-img-streams002.xml9
-rw-r--r--tests/scm/fixtures/openshift-img-streams002.yaml2
35 files changed, 648 insertions, 0 deletions
diff --git a/jenkins_jobs/modules/builders.py b/jenkins_jobs/modules/builders.py
index cdb33a44..a711ca08 100644
--- a/jenkins_jobs/modules/builders.py
+++ b/jenkins_jobs/modules/builders.py
@@ -2405,3 +2405,340 @@ def cloudformation(parser, xml_parent, data):
for stack in data:
cloudformation_stack(xml_parent, stack, 'PostBuildStackBean', stacks,
region_dict)
+
+
+def _openshift_common(osb, data, mapping):
+
+ for elem in mapping:
+ (optname, xmlname, val) = elem
+ val = data.get(optname, val)
+ # Skip adding xml entry if default is empty string
+ # and no value given
+ if not val and elem[2] is '':
+ continue
+ if str(val).lower() == 'true' or str(val).lower() == 'false':
+ val = str(val).lower()
+ xe = XML.SubElement(osb, xmlname)
+ xe.text = str(val)
+
+
+def openshift_build_verify(parser, xml_parent, data):
+ """yaml: openshift-build-verify
+ Performs the equivalent of an 'oc get builds` command invocation for the
+ provided buildConfig key provided; once the list of builds are obtained,
+ the state of the latest build is inspected for up to a minute to see if
+ it has completed successfully.
+ Requires the Jenkins `OpenShift3 Plugin
+ <https://github.com/gabemontero/openshift-jenkins-buildutils/>`_
+
+ :arg str api-url: this would be the value you specify if you leverage the
+ --server option on the OpenShift `oc` command.
+ (default: \https://openshift.default.svc.cluster.local\)
+ :arg str bld-cfg: The value here should be whatever was the output
+ form `oc project` when you created the BuildConfig you
+ want to run a Build on (default: frontend)
+ :arg str namespace: If you run `oc get bc` for the project listed in
+ "namespace", that is the value you want to put here. (default: test)
+ :arg str auth-token: The value here is what you supply with the --token
+ option when invoking the OpenShift `oc` command. (optional)
+
+ Full Example:
+
+ .. literalinclude::
+ ../../tests/builders/fixtures/openshift-build-verify001.yaml
+ :language: yaml
+
+ Minimal Example:
+
+ .. literalinclude::
+ ../../tests/builders/fixtures/openshift-build-verify002.yaml
+ :language: yaml
+ """
+ osb = XML.SubElement(xml_parent,
+ 'com.openshift.'
+ 'openshiftjenkinsbuildutils.OpenShiftBuildVerifier')
+ mapping = [
+ # option, xml name, default value
+ ("api-url", 'apiURL', 'https://openshift.default.svc.cluster.local'),
+ ("bld-cfg", 'bldCfg', 'frontend'),
+ ("namespace", 'namespace', 'test'),
+ ("auth-token", 'authToken', ''),
+ ]
+
+ _openshift_common(osb, data, mapping)
+
+
+def openshift_builder(parser, xml_parent, data):
+ """yaml: openshift-builder
+ Perform builds in OpenShift for the job.
+ Requires the Jenkins `OpenShift3 Plugin
+ <https://github.com/gabemontero/openshift-jenkins-buildutils/>`_
+
+ :arg str api-url: this would be the value you specify if you leverage the
+ --server option on the OpenShift `oc` command.
+ (default: \https://openshift.default.svc.cluster.local\)
+ :arg str bld-cfg: The value here should be whatever was the output
+ form `oc project` when you created the BuildConfig you want to run a
+ Build on (default: frontend)
+ :arg str namespace: If you run `oc get bc` for the project listed in
+ "namespace", that is the value you want to put here. (default: test)
+ :arg str auth-token: The value here is what you supply with the --token
+ option when invoking the OpenShift `oc` command. (optional)
+ :arg bool follow-log: The equivalent of using the --follow option with the
+ `oc start-build` command. (default: true)
+
+ Full Example:
+
+ .. literalinclude:: ../../tests/builders/fixtures/openshift-builder001.yaml
+ :language: yaml
+
+ Minimal Example:
+
+ .. literalinclude:: ../../tests/builders/fixtures/openshift-builder002.yaml
+ :language: yaml
+ """
+ osb = XML.SubElement(xml_parent,
+ 'com.openshift.'
+ 'openshiftjenkinsbuildutils.OpenShiftBuilder')
+
+ mapping = [
+ # option, xml name, default value
+ ("api-url", 'apiURL', 'https://openshift.default.svc.cluster.local'),
+ ("bld-cfg", 'bldCfg', 'frontend'),
+ ("namespace", 'namespace', 'test'),
+ ("auth-token", 'authToken', ''),
+ ("follow-log", 'followLog', 'true'),
+ ]
+
+ _openshift_common(osb, data, mapping)
+
+
+def openshift_dep_verify(parser, xml_parent, data):
+ """yaml: openshift-dep-verify
+ Determines whether the expected set of DeploymentConfig's,
+ ReplicationController's, and active replicas are present based on prior
+ use of the scaler (2) and deployer (3) steps
+ Requires the Jenkins `OpenShift3 Plugin
+ <https://github.com/gabemontero/openshift-jenkins-buildutils/>`_
+
+ :arg str api-url: this would be the value you specify if you leverage the
+ --server option on the OpenShift `oc` command.
+ (default: \https://openshift.default.svc.cluster.local\)
+ :arg str dep-cfg: The value here should be whatever was the output
+ form `oc project` when you created the BuildConfig you want to run a
+ Build on (default: frontend)
+ :arg str namespace: If you run `oc get bc` for the project listed in
+ "namespace", that is the value you want to put here. (default: test)
+ :arg str replica-count: The value here should be whatever the number
+ of pods you want started for the deployment. (default: 0)
+ :arg str auth-token: The value here is what you supply with the --token
+ option when invoking the OpenShift `oc` command. (optional)
+
+ Full Example:
+
+ .. literalinclude::
+ ../../tests/builders/fixtures/openshift-dep-verify001.yaml
+ :language: yaml
+
+ Minimal Example:
+
+ .. literalinclude::
+ ../../tests/builders/fixtures/openshift-dep-verify002.yaml
+ :language: yaml
+ """
+ osb = XML.SubElement(xml_parent,
+ 'com.openshift.'
+ 'openshiftjenkinsbuildutils.'
+ 'OpenShiftDeploymentVerifier')
+
+ mapping = [
+ # option, xml name, default value
+ ("api-url", 'apiURL', 'https://openshift.default.svc.cluster.local'),
+ ("dep-cfg", 'depCfg', 'frontend'),
+ ("namespace", 'namespace', 'test'),
+ ("replica-count", 'replicaCount', 0),
+ ("auth-token", 'authToken', ''),
+ ]
+
+ _openshift_common(osb, data, mapping)
+
+
+def openshift_deployer(parser, xml_parent, data):
+ """yaml: openshift-deployer
+ Start a deployment in OpenShift for the job.
+ Requires the Jenkins `OpenShift3 Plugin
+ <https://github.com/gabemontero/openshift-jenkins-buildutils/>`_
+
+ :arg str api-url: this would be the value you specify if you leverage the
+ --server option on the OpenShift `oc` command.
+ (default: \https://openshift.default.svc.cluster.local\)
+ :arg str dep-cfg: The value here should be whatever was the output
+ form `oc project` when you created the BuildConfig you want to run a
+ Build on (default: frontend)
+ :arg str namespace: If you run `oc get bc` for the project listed in
+ "namespace", that is the value you want to put here. (default: test)
+ :arg str auth-token: The value here is what you supply with the --token
+ option when invoking the OpenShift `oc` command. (optional)
+
+ Full Example:
+
+ .. literalinclude::
+ ../../tests/builders/fixtures/openshift-deployer001.yaml
+ :language: yaml
+
+ Minimal Example:
+
+ .. literalinclude::
+ ../../tests/builders/fixtures/openshift-deployer002.yaml
+ :language: yaml
+ """
+ osb = XML.SubElement(xml_parent,
+ 'com.openshift.'
+ 'openshiftjenkinsbuildutils.OpenShiftDeployer')
+
+ mapping = [
+ # option, xml name, default value
+ ("api-url", 'apiURL', 'https://openshift.default.svc.cluster.local'),
+ ("dep-cfg", 'depCfg', 'frontend'),
+ ("namespace", 'namespace', 'test'),
+ ("auth-token", 'authToken', ''),
+ ]
+
+ _openshift_common(osb, data, mapping)
+
+
+def openshift_img_tagger(parser, xml_parent, data):
+ """yaml: openshift-img-tagger
+ Performs the equivalent of an oc tag command invocation in order to
+ manipulate tags for images in OpenShift ImageStream's
+ Requires the Jenkins `OpenShift3 Plugin
+ <https://github.com/gabemontero/openshift-jenkins-buildutils/>`_
+
+ :arg str api-url: this would be the value you specify if you leverage the
+ --server option on the OpenShift `oc` command.
+ (default: \https://openshift.default.svc.cluster.local\)
+ :arg str test-tag: The equivalent to the name supplied to a
+ `oc get service` command line invocation.
+ (default: origin-nodejs-sample:latest)
+ :arg str prod-tag: The equivalent to the name supplied to a
+ `oc get service` command line invocation.
+ (default: origin-nodejs-sample:prod)
+ :arg str namespace: If you run `oc get bc` for the project listed in
+ "namespace", that is the value you want to put here. (default: test)
+ :arg str auth-token: The value here is what you supply with the --token
+ option when invoking the OpenShift `oc` command. (optional)
+
+ Full Example:
+
+ .. literalinclude::
+ ../../tests/builders/fixtures/openshift-img-tagger001.yaml
+ :language: yaml
+
+ Minimal Example:
+
+ .. literalinclude::
+ ../../tests/builders/fixtures/openshift-img-tagger002.yaml
+ :language: yaml
+ """
+ osb = XML.SubElement(xml_parent,
+ 'com.openshift.'
+ 'openshiftjenkinsbuildutils.OpenShiftImageTagger')
+
+ mapping = [
+ # option, xml name, default value
+ ("api-url", 'apiURL', 'https://openshift.default.svc.cluster.local'),
+ ("test-tag", 'testTag', 'origin-nodejs-sample:latest'),
+ ("prod-tag", 'prodTag', 'origin-nodejs-sample:prod'),
+ ("namespace", 'namespace', 'test'),
+ ("auth-token", 'authToken', ''),
+ ]
+
+ _openshift_common(osb, data, mapping)
+
+
+def openshift_scaler(parser, xml_parent, data):
+ """yaml: openshift-scaler
+ Scale deployments in OpenShift for the job.
+ Requires the Jenkins `OpenShift3 Plugin
+ <https://github.com/gabemontero/openshift-jenkins-buildutils/>`_
+
+ :arg str api-url: this would be the value you specify if you leverage the
+ --server option on the OpenShift `oc` command.
+ (default \https://openshift.default.svc.cluster.local\)
+ :arg str dep-cfg: The value here should be whatever was the output
+ form `oc project` when you created the BuildConfig you want to run a
+ Build on (default: frontend)
+ :arg str namespace: If you run `oc get bc` for the project listed in
+ "namespace", that is the value you want to put here. (default: test)
+ :arg str replica-count: The value here should be whatever the number
+ of pods you want started for the deployment. (default: 0)
+ :arg str auth-token: The value here is what you supply with the --token
+ option when invoking the OpenShift `oc` command. (optional)
+
+ Full Example:
+
+ .. literalinclude:: ../../tests/builders/fixtures/openshift-scaler001.yaml
+ :language: yaml
+
+ Minimal Example:
+
+ .. literalinclude:: ../../tests/builders/fixtures/openshift-scaler002.yaml
+ :language: yaml
+ """
+ osb = XML.SubElement(xml_parent,
+ 'com.openshift.'
+ 'openshiftjenkinsbuildutils.OpenShiftScaler')
+
+ mapping = [
+ # option, xml name, default value
+ ("api-url", 'apiURL', 'https://openshift.default.svc.cluster.local'),
+ ("dep-cfg", 'depCfg', 'frontend'),
+ ("namespace", 'namespace', 'test'),
+ ("replica-count", 'replicaCount', 0),
+ ("auth-token", 'authToken', ''),
+ ]
+
+ _openshift_common(osb, data, mapping)
+
+
+def openshift_svc_verify(parser, xml_parent, data):
+ """yaml: openshift-svc-verify
+ Verify a service is up in OpenShift for the job.
+ Requires the Jenkins `OpenShift3 Plugin
+ <https://github.com/gabemontero/openshift-jenkins-buildutils/>`_
+
+ :arg str api-url: this would be the value you specify if you leverage the
+ --server option on the OpenShift `oc` command.
+ (default: \https://openshift.default.svc.cluster.local\)
+ :arg str svc-name: The equivalent to the name supplied to a
+ `oc get service` command line invocation. (default: frontend)
+ :arg str namespace: If you run `oc get bc` for the project listed in
+ "namespace", that is the value you want to put here. (default: test)
+ :arg str auth-token: The value here is what you supply with the --token
+ option when invoking the OpenShift `oc` command. (optional)
+
+ Full Example:
+
+ .. literalinclude::
+ ../../tests/builders/fixtures/openshift-svc-verify001.yaml
+ :language: yaml
+
+ Minimal Example:
+
+ .. literalinclude::
+ ../../tests/builders/fixtures/openshift-svc-verify002.yaml
+ :language: yaml
+ """
+ osb = XML.SubElement(xml_parent,
+ 'com.openshift.'
+ 'openshiftjenkinsbuildutils.OpenShiftServiceVerifier')
+
+ mapping = [
+ # option, xml name, default value
+ ("api-url", 'apiURL', 'https://openshift.default.svc.cluster.local'),
+ ("svc-name", 'svcName', 'frontend'),
+ ("namespace", 'namespace', 'test'),
+ ("auth-token", 'authToken', ''),
+ ]
+
+ _openshift_common(osb, data, mapping)
diff --git a/jenkins_jobs/modules/scm.py b/jenkins_jobs/modules/scm.py
index f3af2981..92b503e3 100644
--- a/jenkins_jobs/modules/scm.py
+++ b/jenkins_jobs/modules/scm.py
@@ -1046,6 +1046,66 @@ def hg(self, xml_parent, data):
"with browser.")
+def openshift_img_streams(parser, xml_parent, data):
+ """yaml: openshift-img-streams
+ Rather than a Build step extension plugin, this is an extension of the
+ Jenkins SCM plugin, where this baked-in polling mechanism provided by
+ Jenkins is leveraged by exposing some of the common semantics between
+ OpenShift ImageStreams (which are abstractions of Docker repositories)
+ and SCMs - versions / commit IDs of related artifacts
+ (images vs. programmatics files)
+ Requires the Jenkins `OpenShift3 Plugin
+ <https://github.com/gabemontero/openshift-jenkins-buildutils/>`_
+
+ :arg str image-stream-name: The name of the ImageStream is what shows up
+ in the NAME column if you dump all the ImageStream's with the
+ `oc get is` command invocation. (default: nodejs-010-centos7)
+ :arg str tag: The specific image tag within the ImageStream to monitor.
+ (default: latest)
+ :arg str api-url: This would be the value you specify if you leverage the
+ --server option on the OpenShift `oc` command.
+ (default: \https://openshift.default.svc.cluster.local\)
+ :arg str namespace: The value here should be whatever was the output
+ form `oc project` when you created the BuildConfig you want to run
+ a Build on. (default: test)
+ :arg str auth-token: The value here is what you supply with the --token
+ option when invoking the OpenShift `oc` command. (optional)
+
+ Full Example:
+
+ .. literalinclude::
+ ../../tests/scm/fixtures/openshift-img-streams001.yaml
+ :language: yaml
+
+ Minimal Example:
+
+ .. literalinclude::
+ ../../tests/scm/fixtures/openshift-img-streams002.yaml
+ :language: yaml
+ """
+ scm = XML.SubElement(xml_parent,
+ 'scm', {'class':
+ 'com.openshift.openshiftjenkinsbuildutils.'
+ 'OpenShiftImageStreams'})
+ mapping = [
+ # option, xml name, default value
+ ("image-stream-name", 'imageStreamName', 'nodejs-010-centos7'),
+ ("tag", 'tag', 'latest'),
+ ("api-url", 'apiURL', 'https://openshift.default.svc.cluster.local'),
+ ("namespace", 'namespace', 'test'),
+ ("auth-token", 'authToken', ''),
+ ]
+
+ for elem in mapping:
+ (optname, xmlname, val) = elem
+ val = data.get(optname, val)
+ # Skip adding xml entry if default is empty string and no value given
+ if not val and elem[2] is '':
+ continue
+ xe = XML.SubElement(scm, xmlname)
+ xe.text = str(val)
+
+
class SCM(jenkins_jobs.modules.base.Base):
sequence = 30
diff --git a/setup.cfg b/setup.cfg
index a714e6e2..cb2ab759 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -68,6 +68,13 @@ jenkins_jobs.builders =
maven-target=jenkins_jobs.modules.builders:maven_target
msbuild=jenkins_jobs.modules.builders:msbuild
multijob=jenkins_jobs.modules.builders:multijob
+ openshift-builder=jenkins_jobs.modules.builders:openshift_builder
+ openshift-build-verify=jenkins_jobs.modules.builders:openshift_build_verify
+ openshift-deployer=jenkins_jobs.modules.builders:openshift_deployer
+ openshift-dep-verify=jenkins_jobs.modules.builders:openshift_dep_verify
+ openshift-img-tagger=jenkins_jobs.modules.builders:openshift_img_tagger
+ openshift-scaler=jenkins_jobs.modules.builders:openshift_scaler
+ openshift-svc-verify=jenkins_jobs.modules.builders:openshift_svc_verify
powershell=jenkins_jobs.modules.builders:powershell
python=jenkins_jobs.modules.builders:python
raw=jenkins_jobs.modules.general:raw
@@ -228,6 +235,7 @@ jenkins_jobs.scm =
cvs=jenkins_jobs.modules.scm:cvs
git=jenkins_jobs.modules.scm:git
hg=jenkins_jobs.modules.scm:hg
+ openshift-img-streams=jenkins_jobs.modules.scm:openshift_img_streams
raw=jenkins_jobs.modules.general:raw
repo=jenkins_jobs.modules.scm:repo
store=jenkins_jobs.modules.scm:store
diff --git a/tests/builders/fixtures/openshift-build-verify001.xml b/tests/builders/fixtures/openshift-build-verify001.xml
new file mode 100644
index 00000000..8dbf921b
--- /dev/null
+++ b/tests/builders/fixtures/openshift-build-verify001.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<project>
+ <builders>
+ <com.openshift.openshiftjenkinsbuildutils.OpenShiftBuildVerifier>
+ <apiURL>https://openshift.example.local.url/</apiURL>
+ <bldCfg>front</bldCfg>
+ <namespace>test-build</namespace>
+ <authToken>ose-key-buildv1</authToken>
+ </com.openshift.openshiftjenkinsbuildutils.OpenShiftBuildVerifier>
+ </builders>
+</project> \ No newline at end of file
diff --git a/tests/builders/fixtures/openshift-build-verify001.yaml b/tests/builders/fixtures/openshift-build-verify001.yaml
new file mode 100644
index 00000000..6fc2ad95
--- /dev/null
+++ b/tests/builders/fixtures/openshift-build-verify001.yaml
@@ -0,0 +1,6 @@
+builders:
+ - openshift-build-verify:
+ api-url: https://openshift.example.local.url/
+ bld-cfg: front
+ namespace: test-build
+ auth-token: ose-key-buildv1 \ No newline at end of file
diff --git a/tests/builders/fixtures/openshift-build-verify002.xml b/tests/builders/fixtures/openshift-build-verify002.xml
new file mode 100644
index 00000000..300e4306
--- /dev/null
+++ b/tests/builders/fixtures/openshift-build-verify002.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<project>
+ <builders>
+ <com.openshift.openshiftjenkinsbuildutils.OpenShiftBuildVerifier>
+ <apiURL>https://openshift.default.svc.cluster.local</apiURL>
+ <bldCfg>frontend</bldCfg>
+ <namespace>test</namespace>
+ </com.openshift.openshiftjenkinsbuildutils.OpenShiftBuildVerifier>
+ </builders>
+</project> \ No newline at end of file
diff --git a/tests/builders/fixtures/openshift-build-verify002.yaml b/tests/builders/fixtures/openshift-build-verify002.yaml
new file mode 100644
index 00000000..019cc785
--- /dev/null
+++ b/tests/builders/fixtures/openshift-build-verify002.yaml
@@ -0,0 +1,2 @@
+builders:
+ - openshift-build-verify \ No newline at end of file
diff --git a/tests/builders/fixtures/openshift-builder001.xml b/tests/builders/fixtures/openshift-builder001.xml
new file mode 100644
index 00000000..858e108f
--- /dev/null
+++ b/tests/builders/fixtures/openshift-builder001.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<project>
+ <builders>
+ <com.openshift.openshiftjenkinsbuildutils.OpenShiftBuilder>
+ <apiURL>https://openshift.example.local.url/</apiURL>
+ <bldCfg>front</bldCfg>
+ <namespace>test9</namespace>
+ <authToken>ose-builder1</authToken>
+ <followLog>false</followLog>
+ </com.openshift.openshiftjenkinsbuildutils.OpenShiftBuilder>
+ </builders>
+</project> \ No newline at end of file
diff --git a/tests/builders/fixtures/openshift-builder001.yaml b/tests/builders/fixtures/openshift-builder001.yaml
new file mode 100644
index 00000000..995c8926
--- /dev/null
+++ b/tests/builders/fixtures/openshift-builder001.yaml
@@ -0,0 +1,7 @@
+builders:
+ - openshift-builder:
+ api-url: https://openshift.example.local.url/
+ bld-cfg: front
+ namespace: test9
+ auth-token: ose-builder1
+ follow-log: false \ No newline at end of file
diff --git a/tests/builders/fixtures/openshift-builder002.xml b/tests/builders/fixtures/openshift-builder002.xml
new file mode 100644
index 00000000..61c34987
--- /dev/null
+++ b/tests/builders/fixtures/openshift-builder002.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<project>
+ <builders>
+ <com.openshift.openshiftjenkinsbuildutils.OpenShiftBuilder>
+ <apiURL>https://openshift.default.svc.cluster.local</apiURL>
+ <bldCfg>frontend</bldCfg>
+ <namespace>test</namespace>
+ <followLog>true</followLog>
+ </com.openshift.openshiftjenkinsbuildutils.OpenShiftBuilder>
+ </builders>
+</project> \ No newline at end of file
diff --git a/tests/builders/fixtures/openshift-builder002.yaml b/tests/builders/fixtures/openshift-builder002.yaml
new file mode 100644
index 00000000..3ba9dcab
--- /dev/null
+++ b/tests/builders/fixtures/openshift-builder002.yaml
@@ -0,0 +1,2 @@
+builders:
+ - openshift-builder \ No newline at end of file
diff --git a/tests/builders/fixtures/openshift-dep-verify001.xml b/tests/builders/fixtures/openshift-dep-verify001.xml
new file mode 100644
index 00000000..bb4af7a4
--- /dev/null
+++ b/tests/builders/fixtures/openshift-dep-verify001.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<project>
+ <builders>
+ <com.openshift.openshiftjenkinsbuildutils.OpenShiftDeploymentVerifier>
+ <apiURL>https://openshift.example.local.url/</apiURL>
+ <depCfg>front</depCfg>
+ <namespace>test6</namespace>
+ <replicaCount>4</replicaCount>
+ <authToken>ose-key-dep-verify1</authToken>
+ </com.openshift.openshiftjenkinsbuildutils.OpenShiftDeploymentVerifier>
+ </builders>
+</project> \ No newline at end of file
diff --git a/tests/builders/fixtures/openshift-dep-verify001.yaml b/tests/builders/fixtures/openshift-dep-verify001.yaml
new file mode 100644
index 00000000..21e5fe30
--- /dev/null
+++ b/tests/builders/fixtures/openshift-dep-verify001.yaml
@@ -0,0 +1,7 @@
+builders:
+ - openshift-dep-verify:
+ api-url: https://openshift.example.local.url/
+ dep-cfg: front
+ namespace: test6
+ replica-count: 4
+ auth-token: ose-key-dep-verify1 \ No newline at end of file
diff --git a/tests/builders/fixtures/openshift-dep-verify002.xml b/tests/builders/fixtures/openshift-dep-verify002.xml
new file mode 100644
index 00000000..ce4753b5
--- /dev/null
+++ b/tests/builders/fixtures/openshift-dep-verify002.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<project>
+ <builders>
+ <com.openshift.openshiftjenkinsbuildutils.OpenShiftDeploymentVerifier>
+ <apiURL>https://openshift.default.svc.cluster.local</apiURL>
+ <depCfg>frontend</depCfg>
+ <namespace>test</namespace>
+ <replicaCount>0</replicaCount>
+ </com.openshift.openshiftjenkinsbuildutils.OpenShiftDeploymentVerifier>
+ </builders>
+</project> \ No newline at end of file
diff --git a/tests/builders/fixtures/openshift-dep-verify002.yaml b/tests/builders/fixtures/openshift-dep-verify002.yaml
new file mode 100644
index 00000000..0e84a90b
--- /dev/null
+++ b/tests/builders/fixtures/openshift-dep-verify002.yaml
@@ -0,0 +1,2 @@
+builders:
+ - openshift-dep-verify \ No newline at end of file
diff --git a/tests/builders/fixtures/openshift-deployer001.xml b/tests/builders/fixtures/openshift-deployer001.xml
new file mode 100644
index 00000000..cf183886
--- /dev/null
+++ b/tests/builders/fixtures/openshift-deployer001.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<project>
+ <builders>
+ <com.openshift.openshiftjenkinsbuildutils.OpenShiftDeployer>
+ <apiURL>https://openshift.example.local.url/</apiURL>
+ <depCfg>front</depCfg>
+ <namespace>test3</namespace>
+ <authToken>ose-key-deployer1</authToken>
+ </com.openshift.openshiftjenkinsbuildutils.OpenShiftDeployer>
+ </builders>
+</project> \ No newline at end of file
diff --git a/tests/builders/fixtures/openshift-deployer001.yaml b/tests/builders/fixtures/openshift-deployer001.yaml
new file mode 100644
index 00000000..e0c2d821
--- /dev/null
+++ b/tests/builders/fixtures/openshift-deployer001.yaml
@@ -0,0 +1,6 @@
+builders:
+ - openshift-deployer:
+ api-url: https://openshift.example.local.url/
+ dep-cfg: front
+ namespace: test3
+ auth-token: ose-key-deployer1 \ No newline at end of file
diff --git a/tests/builders/fixtures/openshift-deployer002.xml b/tests/builders/fixtures/openshift-deployer002.xml
new file mode 100644
index 00000000..c81078a6
--- /dev/null
+++ b/tests/builders/fixtures/openshift-deployer002.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<project>
+ <builders>
+ <com.openshift.openshiftjenkinsbuildutils.OpenShiftDeployer>
+ <apiURL>https://openshift.default.svc.cluster.local</apiURL>
+ <depCfg>frontend</depCfg>
+ <namespace>test</namespace>
+ </com.openshift.openshiftjenkinsbuildutils.OpenShiftDeployer>
+ </builders>
+</project> \ No newline at end of file
diff --git a/tests/builders/fixtures/openshift-deployer002.yaml b/tests/builders/fixtures/openshift-deployer002.yaml
new file mode 100644
index 00000000..5852cbd4
--- /dev/null
+++ b/tests/builders/fixtures/openshift-deployer002.yaml
@@ -0,0 +1,2 @@
+builders:
+ - openshift-deployer \ No newline at end of file
diff --git a/tests/builders/fixtures/openshift-img-tagger001.xml b/tests/builders/fixtures/openshift-img-tagger001.xml
new file mode 100644
index 00000000..69b21ba6
--- /dev/null
+++ b/tests/builders/fixtures/openshift-img-tagger001.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<project>
+ <builders>
+ <com.openshift.openshiftjenkinsbuildutils.OpenShiftImageTagger>
+ <apiURL>https://openshift.example.local.url/</apiURL>
+ <testTag>origin-nodejs-sample:test</testTag>
+ <prodTag>origin-nodejs-sample:production</prodTag>
+ <namespace>test5</namespace>
+ <authToken>ose-key-img1</authToken>
+ </com.openshift.openshiftjenkinsbuildutils.OpenShiftImageTagger>
+ </builders>
+</project> \ No newline at end of file
diff --git a/tests/builders/fixtures/openshift-img-tagger001.yaml b/tests/builders/fixtures/openshift-img-tagger001.yaml
new file mode 100644
index 00000000..d5e06675
--- /dev/null
+++ b/tests/builders/fixtures/openshift-img-tagger001.yaml
@@ -0,0 +1,7 @@
+builders:
+ - openshift-img-tagger:
+ api-url: https://openshift.example.local.url/
+ test-tag: origin-nodejs-sample:test
+ prod-tag: origin-nodejs-sample:production
+ namespace: test5
+ auth-token: ose-key-img1 \ No newline at end of file
diff --git a/tests/builders/fixtures/openshift-img-tagger002.xml b/tests/builders/fixtures/openshift-img-tagger002.xml
new file mode 100644
index 00000000..bb9a8665
--- /dev/null
+++ b/tests/builders/fixtures/openshift-img-tagger002.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<project>
+ <builders>
+ <com.openshift.openshiftjenkinsbuildutils.OpenShiftImageTagger>
+ <apiURL>https://openshift.default.svc.cluster.local</apiURL>
+ <testTag>origin-nodejs-sample:latest</testTag>
+ <prodTag>origin-nodejs-sample:prod</prodTag>
+ <namespace>test</namespace>
+ </com.openshift.openshiftjenkinsbuildutils.OpenShiftImageTagger>
+ </builders>
+</project> \ No newline at end of file
diff --git a/tests/builders/fixtures/openshift-img-tagger002.yaml b/tests/builders/fixtures/openshift-img-tagger002.yaml
new file mode 100644
index 00000000..f12d3527
--- /dev/null
+++ b/tests/builders/fixtures/openshift-img-tagger002.yaml
@@ -0,0 +1,2 @@
+builders:
+ - openshift-img-tagger \ No newline at end of file
diff --git a/tests/builders/fixtures/openshift-scaler001.xml b/tests/builders/fixtures/openshift-scaler001.xml
new file mode 100644
index 00000000..7311569d
--- /dev/null
+++ b/tests/builders/fixtures/openshift-scaler001.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<project>
+ <builders>
+ <com.openshift.openshiftjenkinsbuildutils.OpenShiftScaler>
+ <apiURL>https://openshift.example.local.url/</apiURL>
+ <depCfg>front</depCfg>
+ <namespace>test2</namespace>
+ <replicaCount>4</replicaCount>
+ <authToken>ose-key-scaler1</authToken>
+ </com.openshift.openshiftjenkinsbuildutils.OpenShiftScaler>
+ </builders>
+</project> \ No newline at end of file
diff --git a/tests/builders/fixtures/openshift-scaler001.yaml b/tests/builders/fixtures/openshift-scaler001.yaml
new file mode 100644
index 00000000..f3b18c8e
--- /dev/null
+++ b/tests/builders/fixtures/openshift-scaler001.yaml
@@ -0,0 +1,7 @@
+builders:
+ - openshift-scaler:
+ api-url: https://openshift.example.local.url/
+ dep-cfg: front
+ namespace: test2
+ replica-count: 4
+ auth-token: ose-key-scaler1 \ No newline at end of file
diff --git a/tests/builders/fixtures/openshift-scaler002.xml b/tests/builders/fixtures/openshift-scaler002.xml
new file mode 100644
index 00000000..45e365f3
--- /dev/null
+++ b/tests/builders/fixtures/openshift-scaler002.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<project>
+ <builders>
+ <com.openshift.openshiftjenkinsbuildutils.OpenShiftScaler>
+ <apiURL>https://openshift.default.svc.cluster.local</apiURL>
+ <depCfg>frontend</depCfg>
+ <namespace>test</namespace>
+ <replicaCount>0</replicaCount>
+ </com.openshift.openshiftjenkinsbuildutils.OpenShiftScaler>
+ </builders>
+</project> \ No newline at end of file
diff --git a/tests/builders/fixtures/openshift-scaler002.yaml b/tests/builders/fixtures/openshift-scaler002.yaml
new file mode 100644
index 00000000..8ced6530
--- /dev/null
+++ b/tests/builders/fixtures/openshift-scaler002.yaml
@@ -0,0 +1,2 @@
+builders:
+ - openshift-scaler \ No newline at end of file
diff --git a/tests/builders/fixtures/openshift-svc-verify001.xml b/tests/builders/fixtures/openshift-svc-verify001.xml
new file mode 100644
index 00000000..cc6bde73
--- /dev/null
+++ b/tests/builders/fixtures/openshift-svc-verify001.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<project>
+ <builders>
+ <com.openshift.openshiftjenkinsbuildutils.OpenShiftServiceVerifier>
+ <apiURL>https://openshift.example.local.url/</apiURL>
+ <svcName>front</svcName>
+ <namespace>test4</namespace>
+ <authToken>ose-key-svc-verify1</authToken>
+ </com.openshift.openshiftjenkinsbuildutils.OpenShiftServiceVerifier>
+ </builders>
+</project> \ No newline at end of file
diff --git a/tests/builders/fixtures/openshift-svc-verify001.yaml b/tests/builders/fixtures/openshift-svc-verify001.yaml
new file mode 100644
index 00000000..0e639cf4
--- /dev/null
+++ b/tests/builders/fixtures/openshift-svc-verify001.yaml
@@ -0,0 +1,6 @@
+builders:
+ - openshift-svc-verify:
+ api-url: https://openshift.example.local.url/
+ svc-name: front
+ namespace: test4
+ auth-token: ose-key-svc-verify1 \ No newline at end of file
diff --git a/tests/builders/fixtures/openshift-svc-verify002.xml b/tests/builders/fixtures/openshift-svc-verify002.xml
new file mode 100644
index 00000000..494f2b27
--- /dev/null
+++ b/tests/builders/fixtures/openshift-svc-verify002.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<project>
+ <builders>
+ <com.openshift.openshiftjenkinsbuildutils.OpenShiftServiceVerifier>
+ <apiURL>https://openshift.default.svc.cluster.local</apiURL>
+ <svcName>frontend</svcName>
+ <namespace>test</namespace>
+ </com.openshift.openshiftjenkinsbuildutils.OpenShiftServiceVerifier>
+ </builders>
+</project> \ No newline at end of file
diff --git a/tests/builders/fixtures/openshift-svc-verify002.yaml b/tests/builders/fixtures/openshift-svc-verify002.yaml
new file mode 100644
index 00000000..3a6aa0ba
--- /dev/null
+++ b/tests/builders/fixtures/openshift-svc-verify002.yaml
@@ -0,0 +1,2 @@
+builders:
+ - openshift-svc-verify \ No newline at end of file
diff --git a/tests/scm/fixtures/openshift-img-streams001.xml b/tests/scm/fixtures/openshift-img-streams001.xml
new file mode 100644
index 00000000..3de3781d
--- /dev/null
+++ b/tests/scm/fixtures/openshift-img-streams001.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<project>
+ <scm class="com.openshift.openshiftjenkinsbuildutils.OpenShiftImageStreams">
+ <imageStreamName>nodejs-010-fedora</imageStreamName>
+ <tag>prod</tag>
+ <apiURL>https://openshift.example.local.url/</apiURL>
+ <namespace>test-scm</namespace>
+ <authToken>ose-key-img-streams1</authToken>
+ </scm>
+</project> \ No newline at end of file
diff --git a/tests/scm/fixtures/openshift-img-streams001.yaml b/tests/scm/fixtures/openshift-img-streams001.yaml
new file mode 100644
index 00000000..b8da278b
--- /dev/null
+++ b/tests/scm/fixtures/openshift-img-streams001.yaml
@@ -0,0 +1,7 @@
+scm:
+ - openshift-img-streams:
+ image-stream-name: nodejs-010-fedora
+ tag: prod
+ api-url: https://openshift.example.local.url/
+ namespace: test-scm
+ auth-token: ose-key-img-streams1 \ No newline at end of file
diff --git a/tests/scm/fixtures/openshift-img-streams002.xml b/tests/scm/fixtures/openshift-img-streams002.xml
new file mode 100644
index 00000000..7dc21e6d
--- /dev/null
+++ b/tests/scm/fixtures/openshift-img-streams002.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<project>
+ <scm class="com.openshift.openshiftjenkinsbuildutils.OpenShiftImageStreams">
+ <imageStreamName>nodejs-010-centos7</imageStreamName>
+ <tag>latest</tag>
+ <apiURL>https://openshift.default.svc.cluster.local</apiURL>
+ <namespace>test</namespace>
+ </scm>
+</project> \ No newline at end of file
diff --git a/tests/scm/fixtures/openshift-img-streams002.yaml b/tests/scm/fixtures/openshift-img-streams002.yaml
new file mode 100644
index 00000000..4973d1d2
--- /dev/null
+++ b/tests/scm/fixtures/openshift-img-streams002.yaml
@@ -0,0 +1,2 @@
+scm:
+ - openshift-img-streams \ No newline at end of file