Merge "Implements: additions for OS3 plugin entry points in builders and scm"
This commit is contained in:
commit
556deebe25
@ -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)
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
11
tests/builders/fixtures/openshift-build-verify001.xml
Normal file
11
tests/builders/fixtures/openshift-build-verify001.xml
Normal file
@ -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>
|
6
tests/builders/fixtures/openshift-build-verify001.yaml
Normal file
6
tests/builders/fixtures/openshift-build-verify001.yaml
Normal file
@ -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
|
10
tests/builders/fixtures/openshift-build-verify002.xml
Normal file
10
tests/builders/fixtures/openshift-build-verify002.xml
Normal file
@ -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>
|
2
tests/builders/fixtures/openshift-build-verify002.yaml
Normal file
2
tests/builders/fixtures/openshift-build-verify002.yaml
Normal file
@ -0,0 +1,2 @@
|
||||
builders:
|
||||
- openshift-build-verify
|
12
tests/builders/fixtures/openshift-builder001.xml
Normal file
12
tests/builders/fixtures/openshift-builder001.xml
Normal file
@ -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>
|
7
tests/builders/fixtures/openshift-builder001.yaml
Normal file
7
tests/builders/fixtures/openshift-builder001.yaml
Normal file
@ -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
|
11
tests/builders/fixtures/openshift-builder002.xml
Normal file
11
tests/builders/fixtures/openshift-builder002.xml
Normal file
@ -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>
|
2
tests/builders/fixtures/openshift-builder002.yaml
Normal file
2
tests/builders/fixtures/openshift-builder002.yaml
Normal file
@ -0,0 +1,2 @@
|
||||
builders:
|
||||
- openshift-builder
|
12
tests/builders/fixtures/openshift-dep-verify001.xml
Normal file
12
tests/builders/fixtures/openshift-dep-verify001.xml
Normal file
@ -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>
|
7
tests/builders/fixtures/openshift-dep-verify001.yaml
Normal file
7
tests/builders/fixtures/openshift-dep-verify001.yaml
Normal file
@ -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
|
11
tests/builders/fixtures/openshift-dep-verify002.xml
Normal file
11
tests/builders/fixtures/openshift-dep-verify002.xml
Normal file
@ -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>
|
2
tests/builders/fixtures/openshift-dep-verify002.yaml
Normal file
2
tests/builders/fixtures/openshift-dep-verify002.yaml
Normal file
@ -0,0 +1,2 @@
|
||||
builders:
|
||||
- openshift-dep-verify
|
11
tests/builders/fixtures/openshift-deployer001.xml
Normal file
11
tests/builders/fixtures/openshift-deployer001.xml
Normal file
@ -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>
|
6
tests/builders/fixtures/openshift-deployer001.yaml
Normal file
6
tests/builders/fixtures/openshift-deployer001.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
builders:
|
||||
- openshift-deployer:
|
||||
api-url: https://openshift.example.local.url/
|
||||
dep-cfg: front
|
||||
namespace: test3
|
||||
auth-token: ose-key-deployer1
|
10
tests/builders/fixtures/openshift-deployer002.xml
Normal file
10
tests/builders/fixtures/openshift-deployer002.xml
Normal file
@ -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>
|
2
tests/builders/fixtures/openshift-deployer002.yaml
Normal file
2
tests/builders/fixtures/openshift-deployer002.yaml
Normal file
@ -0,0 +1,2 @@
|
||||
builders:
|
||||
- openshift-deployer
|
12
tests/builders/fixtures/openshift-img-tagger001.xml
Normal file
12
tests/builders/fixtures/openshift-img-tagger001.xml
Normal file
@ -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>
|
7
tests/builders/fixtures/openshift-img-tagger001.yaml
Normal file
7
tests/builders/fixtures/openshift-img-tagger001.yaml
Normal file
@ -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
|
11
tests/builders/fixtures/openshift-img-tagger002.xml
Normal file
11
tests/builders/fixtures/openshift-img-tagger002.xml
Normal file
@ -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>
|
2
tests/builders/fixtures/openshift-img-tagger002.yaml
Normal file
2
tests/builders/fixtures/openshift-img-tagger002.yaml
Normal file
@ -0,0 +1,2 @@
|
||||
builders:
|
||||
- openshift-img-tagger
|
12
tests/builders/fixtures/openshift-scaler001.xml
Normal file
12
tests/builders/fixtures/openshift-scaler001.xml
Normal file
@ -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>
|
7
tests/builders/fixtures/openshift-scaler001.yaml
Normal file
7
tests/builders/fixtures/openshift-scaler001.yaml
Normal file
@ -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
|
11
tests/builders/fixtures/openshift-scaler002.xml
Normal file
11
tests/builders/fixtures/openshift-scaler002.xml
Normal file
@ -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>
|
2
tests/builders/fixtures/openshift-scaler002.yaml
Normal file
2
tests/builders/fixtures/openshift-scaler002.yaml
Normal file
@ -0,0 +1,2 @@
|
||||
builders:
|
||||
- openshift-scaler
|
11
tests/builders/fixtures/openshift-svc-verify001.xml
Normal file
11
tests/builders/fixtures/openshift-svc-verify001.xml
Normal file
@ -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>
|
6
tests/builders/fixtures/openshift-svc-verify001.yaml
Normal file
6
tests/builders/fixtures/openshift-svc-verify001.yaml
Normal file
@ -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
|
10
tests/builders/fixtures/openshift-svc-verify002.xml
Normal file
10
tests/builders/fixtures/openshift-svc-verify002.xml
Normal file
@ -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>
|
2
tests/builders/fixtures/openshift-svc-verify002.yaml
Normal file
2
tests/builders/fixtures/openshift-svc-verify002.yaml
Normal file
@ -0,0 +1,2 @@
|
||||
builders:
|
||||
- openshift-svc-verify
|
10
tests/scm/fixtures/openshift-img-streams001.xml
Normal file
10
tests/scm/fixtures/openshift-img-streams001.xml
Normal file
@ -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>
|
7
tests/scm/fixtures/openshift-img-streams001.yaml
Normal file
7
tests/scm/fixtures/openshift-img-streams001.yaml
Normal file
@ -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
|
9
tests/scm/fixtures/openshift-img-streams002.xml
Normal file
9
tests/scm/fixtures/openshift-img-streams002.xml
Normal file
@ -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>
|
2
tests/scm/fixtures/openshift-img-streams002.yaml
Normal file
2
tests/scm/fixtures/openshift-img-streams002.yaml
Normal file
@ -0,0 +1,2 @@
|
||||
scm:
|
||||
- openshift-img-streams
|
Loading…
Reference in New Issue
Block a user