Merge "Updated to support changes to openshift pipeline plugin"
This commit is contained in:
commit
b14813ba78
@ -2456,8 +2456,8 @@ def openshift_build_verify(parser, xml_parent, data):
|
|||||||
provided buildConfig key provided; once the list of builds are obtained,
|
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
|
the state of the latest build is inspected for up to a minute to see if
|
||||||
it has completed successfully.
|
it has completed successfully.
|
||||||
Requires the Jenkins `OpenShift3 Plugin
|
Requires the Jenkins :jenkins-wiki:`OpenShift
|
||||||
<https://github.com/gabemontero/openshift-jenkins-buildutils/>`_
|
Pipeline Plugin <OpenShift+Pipeline+Plugin>`.
|
||||||
|
|
||||||
:arg str api-url: this would be the value you specify if you leverage the
|
:arg str api-url: this would be the value you specify if you leverage the
|
||||||
--server option on the OpenShift `oc` command.
|
--server option on the OpenShift `oc` command.
|
||||||
@ -2469,6 +2469,8 @@ def openshift_build_verify(parser, xml_parent, data):
|
|||||||
"namespace", that is the value you want to put here. (default 'test')
|
"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
|
:arg str auth-token: The value here is what you supply with the --token
|
||||||
option when invoking the OpenShift `oc` command. (optional)
|
option when invoking the OpenShift `oc` command. (optional)
|
||||||
|
:arg str verbose: This flag is the toggle for
|
||||||
|
turning on or off detailed logging in this plug-in. (default 'false')
|
||||||
|
|
||||||
Full Example:
|
Full Example:
|
||||||
|
|
||||||
@ -2483,14 +2485,15 @@ def openshift_build_verify(parser, xml_parent, data):
|
|||||||
:language: yaml
|
:language: yaml
|
||||||
"""
|
"""
|
||||||
osb = XML.SubElement(xml_parent,
|
osb = XML.SubElement(xml_parent,
|
||||||
'com.openshift.'
|
'com.openshift.jenkins.plugins.pipeline.'
|
||||||
'openshiftjenkinsbuildutils.OpenShiftBuildVerifier')
|
'OpenShiftBuildVerifier')
|
||||||
mapping = [
|
mapping = [
|
||||||
# option, xml name, default value
|
# option, xml name, default value
|
||||||
("api-url", 'apiURL', 'https://openshift.default.svc.cluster.local'),
|
("api-url", 'apiURL', 'https://openshift.default.svc.cluster.local'),
|
||||||
("bld-cfg", 'bldCfg', 'frontend'),
|
("bld-cfg", 'bldCfg', 'frontend'),
|
||||||
("namespace", 'namespace', 'test'),
|
("namespace", 'namespace', 'test'),
|
||||||
("auth-token", 'authToken', ''),
|
("auth-token", 'authToken', ''),
|
||||||
|
("verbose", 'verbose', 'false'),
|
||||||
]
|
]
|
||||||
|
|
||||||
convert_mapping_to_xml(osb, data, mapping)
|
convert_mapping_to_xml(osb, data, mapping)
|
||||||
@ -2499,8 +2502,8 @@ def openshift_build_verify(parser, xml_parent, data):
|
|||||||
def openshift_builder(parser, xml_parent, data):
|
def openshift_builder(parser, xml_parent, data):
|
||||||
"""yaml: openshift-builder
|
"""yaml: openshift-builder
|
||||||
Perform builds in OpenShift for the job.
|
Perform builds in OpenShift for the job.
|
||||||
Requires the Jenkins `OpenShift3 Plugin
|
Requires the Jenkins :jenkins-wiki:`OpenShift
|
||||||
<https://github.com/gabemontero/openshift-jenkins-buildutils/>`_
|
Pipeline Plugin <OpenShift+Pipeline+Plugin>`.
|
||||||
|
|
||||||
:arg str api-url: this would be the value you specify if you leverage the
|
:arg str api-url: this would be the value you specify if you leverage the
|
||||||
--server option on the OpenShift `oc` command.
|
--server option on the OpenShift `oc` command.
|
||||||
@ -2512,8 +2515,17 @@ def openshift_builder(parser, xml_parent, data):
|
|||||||
"namespace", that is the value you want to put here. (default 'test')
|
"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
|
:arg str auth-token: The value here is what you supply with the --token
|
||||||
option when invoking the OpenShift `oc` command. (optional)
|
option when invoking the OpenShift `oc` command. (optional)
|
||||||
:arg bool follow-log: The equivalent of using the --follow option with the
|
:arg str commit-ID: The value here is what you supply with the
|
||||||
`oc start-build` command. (default true)
|
--commit option when invoking the
|
||||||
|
OpenShift `oc start-build` command. (optional)
|
||||||
|
:arg str verbose: This flag is the toggle for
|
||||||
|
turning on or off detailed logging in this plug-in. (default 'false')
|
||||||
|
:arg str build-name: TThe value here is what you supply with the
|
||||||
|
--from-build option when invoking the
|
||||||
|
OpenShift `oc start-build` command. (optional)
|
||||||
|
:arg str show-build-logs: Indicates whether the build logs get dumped
|
||||||
|
to the console of the Jenkins build. (default 'false')
|
||||||
|
|
||||||
|
|
||||||
Full Example:
|
Full Example:
|
||||||
|
|
||||||
@ -2526,8 +2538,8 @@ def openshift_builder(parser, xml_parent, data):
|
|||||||
:language: yaml
|
:language: yaml
|
||||||
"""
|
"""
|
||||||
osb = XML.SubElement(xml_parent,
|
osb = XML.SubElement(xml_parent,
|
||||||
'com.openshift.'
|
'com.openshift.jenkins.plugins.pipeline.'
|
||||||
'openshiftjenkinsbuildutils.OpenShiftBuilder')
|
'OpenShiftBuilder')
|
||||||
|
|
||||||
mapping = [
|
mapping = [
|
||||||
# option, xml name, default value
|
# option, xml name, default value
|
||||||
@ -2535,7 +2547,58 @@ def openshift_builder(parser, xml_parent, data):
|
|||||||
("bld-cfg", 'bldCfg', 'frontend'),
|
("bld-cfg", 'bldCfg', 'frontend'),
|
||||||
("namespace", 'namespace', 'test'),
|
("namespace", 'namespace', 'test'),
|
||||||
("auth-token", 'authToken', ''),
|
("auth-token", 'authToken', ''),
|
||||||
("follow-log", 'followLog', 'true'),
|
("commit-ID", 'commitID', ''),
|
||||||
|
("verbose", 'verbose', 'false'),
|
||||||
|
("build-name", 'buildName', ''),
|
||||||
|
("show-build-logs", 'showBuildLogs', 'false'),
|
||||||
|
]
|
||||||
|
|
||||||
|
convert_mapping_to_xml(osb, data, mapping)
|
||||||
|
|
||||||
|
|
||||||
|
def openshift_creator(parser, xml_parent, data):
|
||||||
|
"""yaml: openshift-creator
|
||||||
|
Performs the equivalent of an oc create command invocation;
|
||||||
|
this build step takes in the provided JSON or YAML text, and if it
|
||||||
|
conforms to OpenShift schema, creates whichever
|
||||||
|
OpenShift resources are specified.
|
||||||
|
Requires the Jenkins :jenkins-wiki:`OpenShift
|
||||||
|
Pipeline Plugin <OpenShift+Pipeline+Plugin>`.
|
||||||
|
|
||||||
|
: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 jsonyaml: The JSON or YAML formatted text that conforms to
|
||||||
|
the schema for defining the various OpenShift resources. (optional)
|
||||||
|
: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 str verbose: This flag is the toggle for
|
||||||
|
turning on or off detailed logging in this plug-in. (default 'false')
|
||||||
|
|
||||||
|
Full Example:
|
||||||
|
|
||||||
|
.. literalinclude::
|
||||||
|
../../tests/builders/fixtures/openshift-creator001.yaml
|
||||||
|
:language: yaml
|
||||||
|
|
||||||
|
Minimal Example:
|
||||||
|
|
||||||
|
.. literalinclude::
|
||||||
|
../../tests/builders/fixtures/openshift-creator002.yaml
|
||||||
|
:language: yaml
|
||||||
|
"""
|
||||||
|
osb = XML.SubElement(xml_parent,
|
||||||
|
'com.openshift.jenkins.plugins.pipeline.'
|
||||||
|
'OpenShiftCreator')
|
||||||
|
mapping = [
|
||||||
|
# option, xml name, default value
|
||||||
|
("api-url", 'apiURL', 'https://openshift.default.svc.cluster.local'),
|
||||||
|
("jsonyaml", 'jsonyaml', ''),
|
||||||
|
("namespace", 'namespace', 'test'),
|
||||||
|
("auth-token", 'authToken', ''),
|
||||||
|
("verbose", 'verbose', 'false'),
|
||||||
]
|
]
|
||||||
|
|
||||||
convert_mapping_to_xml(osb, data, mapping)
|
convert_mapping_to_xml(osb, data, mapping)
|
||||||
@ -2546,8 +2609,8 @@ def openshift_dep_verify(parser, xml_parent, data):
|
|||||||
Determines whether the expected set of DeploymentConfig's,
|
Determines whether the expected set of DeploymentConfig's,
|
||||||
ReplicationController's, and active replicas are present based on prior
|
ReplicationController's, and active replicas are present based on prior
|
||||||
use of the scaler (2) and deployer (3) steps
|
use of the scaler (2) and deployer (3) steps
|
||||||
Requires the Jenkins `OpenShift3 Plugin
|
Requires the Jenkins :jenkins-wiki:`OpenShift
|
||||||
<https://github.com/gabemontero/openshift-jenkins-buildutils/>`_
|
Pipeline Plugin <OpenShift+Pipeline+Plugin>`._
|
||||||
|
|
||||||
:arg str api-url: this would be the value you specify if you leverage the
|
:arg str api-url: this would be the value you specify if you leverage the
|
||||||
--server option on the OpenShift `oc` command.
|
--server option on the OpenShift `oc` command.
|
||||||
@ -2561,6 +2624,8 @@ def openshift_dep_verify(parser, xml_parent, data):
|
|||||||
of pods you want started for the deployment. (default 0)
|
of pods you want started for the deployment. (default 0)
|
||||||
:arg str auth-token: The value here is what you supply with the --token
|
:arg str auth-token: The value here is what you supply with the --token
|
||||||
option when invoking the OpenShift `oc` command. (optional)
|
option when invoking the OpenShift `oc` command. (optional)
|
||||||
|
:arg str verbose: This flag is the toggle for
|
||||||
|
turning on or off detailed logging in this plug-in. (default 'false')
|
||||||
|
|
||||||
Full Example:
|
Full Example:
|
||||||
|
|
||||||
@ -2575,8 +2640,7 @@ def openshift_dep_verify(parser, xml_parent, data):
|
|||||||
:language: yaml
|
:language: yaml
|
||||||
"""
|
"""
|
||||||
osb = XML.SubElement(xml_parent,
|
osb = XML.SubElement(xml_parent,
|
||||||
'com.openshift.'
|
'com.openshift.jenkins.plugins.pipeline.'
|
||||||
'openshiftjenkinsbuildutils.'
|
|
||||||
'OpenShiftDeploymentVerifier')
|
'OpenShiftDeploymentVerifier')
|
||||||
|
|
||||||
mapping = [
|
mapping = [
|
||||||
@ -2586,6 +2650,7 @@ def openshift_dep_verify(parser, xml_parent, data):
|
|||||||
("namespace", 'namespace', 'test'),
|
("namespace", 'namespace', 'test'),
|
||||||
("replica-count", 'replicaCount', 0),
|
("replica-count", 'replicaCount', 0),
|
||||||
("auth-token", 'authToken', ''),
|
("auth-token", 'authToken', ''),
|
||||||
|
("verbose", 'verbose', 'false'),
|
||||||
]
|
]
|
||||||
|
|
||||||
convert_mapping_to_xml(osb, data, mapping)
|
convert_mapping_to_xml(osb, data, mapping)
|
||||||
@ -2594,8 +2659,8 @@ def openshift_dep_verify(parser, xml_parent, data):
|
|||||||
def openshift_deployer(parser, xml_parent, data):
|
def openshift_deployer(parser, xml_parent, data):
|
||||||
"""yaml: openshift-deployer
|
"""yaml: openshift-deployer
|
||||||
Start a deployment in OpenShift for the job.
|
Start a deployment in OpenShift for the job.
|
||||||
Requires the Jenkins `OpenShift3 Plugin
|
Requires the Jenkins :jenkins-wiki:`OpenShift
|
||||||
<https://github.com/gabemontero/openshift-jenkins-buildutils/>`_
|
Pipeline Plugin <OpenShift+Pipeline+Plugin>`.
|
||||||
|
|
||||||
:arg str api-url: this would be the value you specify if you leverage the
|
:arg str api-url: this would be the value you specify if you leverage the
|
||||||
--server option on the OpenShift `oc` command.
|
--server option on the OpenShift `oc` command.
|
||||||
@ -2607,6 +2672,8 @@ def openshift_deployer(parser, xml_parent, data):
|
|||||||
"namespace", that is the value you want to put here. (default 'test')
|
"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
|
:arg str auth-token: The value here is what you supply with the --token
|
||||||
option when invoking the OpenShift `oc` command. (optional)
|
option when invoking the OpenShift `oc` command. (optional)
|
||||||
|
:arg str verbose: This flag is the toggle for
|
||||||
|
turning on or off detailed logging in this plug-in. (default 'false')
|
||||||
|
|
||||||
Full Example:
|
Full Example:
|
||||||
|
|
||||||
@ -2621,8 +2688,8 @@ def openshift_deployer(parser, xml_parent, data):
|
|||||||
:language: yaml
|
:language: yaml
|
||||||
"""
|
"""
|
||||||
osb = XML.SubElement(xml_parent,
|
osb = XML.SubElement(xml_parent,
|
||||||
'com.openshift.'
|
'com.openshift.jenkins.plugins.pipeline.'
|
||||||
'openshiftjenkinsbuildutils.OpenShiftDeployer')
|
'OpenShiftDeployer')
|
||||||
|
|
||||||
mapping = [
|
mapping = [
|
||||||
# option, xml name, default value
|
# option, xml name, default value
|
||||||
@ -2630,6 +2697,7 @@ def openshift_deployer(parser, xml_parent, data):
|
|||||||
("dep-cfg", 'depCfg', 'frontend'),
|
("dep-cfg", 'depCfg', 'frontend'),
|
||||||
("namespace", 'namespace', 'test'),
|
("namespace", 'namespace', 'test'),
|
||||||
("auth-token", 'authToken', ''),
|
("auth-token", 'authToken', ''),
|
||||||
|
("verbose", 'verbose', 'false'),
|
||||||
]
|
]
|
||||||
|
|
||||||
convert_mapping_to_xml(osb, data, mapping)
|
convert_mapping_to_xml(osb, data, mapping)
|
||||||
@ -2639,8 +2707,8 @@ def openshift_img_tagger(parser, xml_parent, data):
|
|||||||
"""yaml: openshift-img-tagger
|
"""yaml: openshift-img-tagger
|
||||||
Performs the equivalent of an oc tag command invocation in order to
|
Performs the equivalent of an oc tag command invocation in order to
|
||||||
manipulate tags for images in OpenShift ImageStream's
|
manipulate tags for images in OpenShift ImageStream's
|
||||||
Requires the Jenkins `OpenShift3 Plugin
|
Requires the Jenkins :jenkins-wiki:`OpenShift
|
||||||
<https://github.com/gabemontero/openshift-jenkins-buildutils/>`_
|
Pipeline Plugin <OpenShift+Pipeline+Plugin>`.
|
||||||
|
|
||||||
:arg str api-url: this would be the value you specify if you leverage the
|
:arg str api-url: this would be the value you specify if you leverage the
|
||||||
--server option on the OpenShift `oc` command.
|
--server option on the OpenShift `oc` command.
|
||||||
@ -2655,6 +2723,8 @@ def openshift_img_tagger(parser, xml_parent, data):
|
|||||||
"namespace", that is the value you want to put here. (default 'test')
|
"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
|
:arg str auth-token: The value here is what you supply with the --token
|
||||||
option when invoking the OpenShift `oc` command. (optional)
|
option when invoking the OpenShift `oc` command. (optional)
|
||||||
|
:arg str verbose: This flag is the toggle for
|
||||||
|
turning on or off detailed logging in this plug-in. (default 'false')
|
||||||
|
|
||||||
Full Example:
|
Full Example:
|
||||||
|
|
||||||
@ -2669,8 +2739,8 @@ def openshift_img_tagger(parser, xml_parent, data):
|
|||||||
:language: yaml
|
:language: yaml
|
||||||
"""
|
"""
|
||||||
osb = XML.SubElement(xml_parent,
|
osb = XML.SubElement(xml_parent,
|
||||||
'com.openshift.'
|
'com.openshift.jenkins.plugins.pipeline.'
|
||||||
'openshiftjenkinsbuildutils.OpenShiftImageTagger')
|
'OpenShiftImageTagger')
|
||||||
|
|
||||||
mapping = [
|
mapping = [
|
||||||
# option, xml name, default value
|
# option, xml name, default value
|
||||||
@ -2679,6 +2749,7 @@ def openshift_img_tagger(parser, xml_parent, data):
|
|||||||
("prod-tag", 'prodTag', 'origin-nodejs-sample:prod'),
|
("prod-tag", 'prodTag', 'origin-nodejs-sample:prod'),
|
||||||
("namespace", 'namespace', 'test'),
|
("namespace", 'namespace', 'test'),
|
||||||
("auth-token", 'authToken', ''),
|
("auth-token", 'authToken', ''),
|
||||||
|
("verbose", 'verbose', 'false'),
|
||||||
]
|
]
|
||||||
|
|
||||||
convert_mapping_to_xml(osb, data, mapping)
|
convert_mapping_to_xml(osb, data, mapping)
|
||||||
@ -2687,8 +2758,8 @@ def openshift_img_tagger(parser, xml_parent, data):
|
|||||||
def openshift_scaler(parser, xml_parent, data):
|
def openshift_scaler(parser, xml_parent, data):
|
||||||
"""yaml: openshift-scaler
|
"""yaml: openshift-scaler
|
||||||
Scale deployments in OpenShift for the job.
|
Scale deployments in OpenShift for the job.
|
||||||
Requires the Jenkins `OpenShift3 Plugin
|
Requires the Jenkins :jenkins-wiki:`OpenShift
|
||||||
<https://github.com/gabemontero/openshift-jenkins-buildutils/>`_
|
Pipeline Plugin <OpenShift+Pipeline+Plugin>`.
|
||||||
|
|
||||||
:arg str api-url: this would be the value you specify if you leverage the
|
:arg str api-url: this would be the value you specify if you leverage the
|
||||||
--server option on the OpenShift `oc` command.
|
--server option on the OpenShift `oc` command.
|
||||||
@ -2702,6 +2773,8 @@ def openshift_scaler(parser, xml_parent, data):
|
|||||||
of pods you want started for the deployment. (default 0)
|
of pods you want started for the deployment. (default 0)
|
||||||
:arg str auth-token: The value here is what you supply with the --token
|
:arg str auth-token: The value here is what you supply with the --token
|
||||||
option when invoking the OpenShift `oc` command. (optional)
|
option when invoking the OpenShift `oc` command. (optional)
|
||||||
|
:arg str verbose: This flag is the toggle for
|
||||||
|
turning on or off detailed logging in this plug-in. (default 'false')
|
||||||
|
|
||||||
Full Example:
|
Full Example:
|
||||||
|
|
||||||
@ -2714,8 +2787,8 @@ def openshift_scaler(parser, xml_parent, data):
|
|||||||
:language: yaml
|
:language: yaml
|
||||||
"""
|
"""
|
||||||
osb = XML.SubElement(xml_parent,
|
osb = XML.SubElement(xml_parent,
|
||||||
'com.openshift.'
|
'com.openshift.jenkins.plugins.pipeline.'
|
||||||
'openshiftjenkinsbuildutils.OpenShiftScaler')
|
'OpenShiftScaler')
|
||||||
|
|
||||||
mapping = [
|
mapping = [
|
||||||
# option, xml name, default value
|
# option, xml name, default value
|
||||||
@ -2724,6 +2797,7 @@ def openshift_scaler(parser, xml_parent, data):
|
|||||||
("namespace", 'namespace', 'test'),
|
("namespace", 'namespace', 'test'),
|
||||||
("replica-count", 'replicaCount', 0),
|
("replica-count", 'replicaCount', 0),
|
||||||
("auth-token", 'authToken', ''),
|
("auth-token", 'authToken', ''),
|
||||||
|
("verbose", 'verbose', 'false'),
|
||||||
]
|
]
|
||||||
|
|
||||||
convert_mapping_to_xml(osb, data, mapping)
|
convert_mapping_to_xml(osb, data, mapping)
|
||||||
@ -2732,8 +2806,8 @@ def openshift_scaler(parser, xml_parent, data):
|
|||||||
def openshift_svc_verify(parser, xml_parent, data):
|
def openshift_svc_verify(parser, xml_parent, data):
|
||||||
"""yaml: openshift-svc-verify
|
"""yaml: openshift-svc-verify
|
||||||
Verify a service is up in OpenShift for the job.
|
Verify a service is up in OpenShift for the job.
|
||||||
Requires the Jenkins `OpenShift3 Plugin
|
Requires the Jenkins :jenkins-wiki:`OpenShift
|
||||||
<https://github.com/gabemontero/openshift-jenkins-buildutils/>`_
|
Pipeline Plugin <OpenShift+Pipeline+Plugin>`.
|
||||||
|
|
||||||
:arg str api-url: this would be the value you specify if you leverage the
|
:arg str api-url: this would be the value you specify if you leverage the
|
||||||
--server option on the OpenShift `oc` command.
|
--server option on the OpenShift `oc` command.
|
||||||
@ -2744,6 +2818,8 @@ def openshift_svc_verify(parser, xml_parent, data):
|
|||||||
"namespace", that is the value you want to put here. (default 'test')
|
"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
|
:arg str auth-token: The value here is what you supply with the --token
|
||||||
option when invoking the OpenShift `oc` command. (optional)
|
option when invoking the OpenShift `oc` command. (optional)
|
||||||
|
:arg str verbose: This flag is the toggle for
|
||||||
|
turning on or off detailed logging in this plug-in. (default 'false')
|
||||||
|
|
||||||
Full Example:
|
Full Example:
|
||||||
|
|
||||||
@ -2758,8 +2834,8 @@ def openshift_svc_verify(parser, xml_parent, data):
|
|||||||
:language: yaml
|
:language: yaml
|
||||||
"""
|
"""
|
||||||
osb = XML.SubElement(xml_parent,
|
osb = XML.SubElement(xml_parent,
|
||||||
'com.openshift.'
|
'com.openshift.jenkins.plugins.pipeline.'
|
||||||
'openshiftjenkinsbuildutils.OpenShiftServiceVerifier')
|
'OpenShiftServiceVerifier')
|
||||||
|
|
||||||
mapping = [
|
mapping = [
|
||||||
# option, xml name, default value
|
# option, xml name, default value
|
||||||
@ -2767,6 +2843,7 @@ def openshift_svc_verify(parser, xml_parent, data):
|
|||||||
("svc-name", 'svcName', 'frontend'),
|
("svc-name", 'svcName', 'frontend'),
|
||||||
("namespace", 'namespace', 'test'),
|
("namespace", 'namespace', 'test'),
|
||||||
("auth-token", 'authToken', ''),
|
("auth-token", 'authToken', ''),
|
||||||
|
("verbose", 'verbose', 'false'),
|
||||||
]
|
]
|
||||||
|
|
||||||
convert_mapping_to_xml(osb, data, mapping)
|
convert_mapping_to_xml(osb, data, mapping)
|
||||||
|
@ -37,6 +37,7 @@ from jenkins_jobs.errors import InvalidAttributeError
|
|||||||
from jenkins_jobs.errors import JenkinsJobsException
|
from jenkins_jobs.errors import JenkinsJobsException
|
||||||
from jenkins_jobs.errors import MissingAttributeError
|
from jenkins_jobs.errors import MissingAttributeError
|
||||||
import jenkins_jobs.modules.base
|
import jenkins_jobs.modules.base
|
||||||
|
from jenkins_jobs.modules import hudson_model
|
||||||
from jenkins_jobs.modules.helpers import artifactory_common_details
|
from jenkins_jobs.modules.helpers import artifactory_common_details
|
||||||
from jenkins_jobs.modules.helpers import artifactory_deployment_patterns
|
from jenkins_jobs.modules.helpers import artifactory_deployment_patterns
|
||||||
from jenkins_jobs.modules.helpers import artifactory_env_vars_patterns
|
from jenkins_jobs.modules.helpers import artifactory_env_vars_patterns
|
||||||
@ -48,7 +49,7 @@ from jenkins_jobs.modules.helpers import cloudformation_stack
|
|||||||
from jenkins_jobs.modules.helpers import config_file_provider_settings
|
from jenkins_jobs.modules.helpers import config_file_provider_settings
|
||||||
from jenkins_jobs.modules.helpers import findbugs_settings
|
from jenkins_jobs.modules.helpers import findbugs_settings
|
||||||
from jenkins_jobs.modules.helpers import get_value_from_yaml_or_config_file
|
from jenkins_jobs.modules.helpers import get_value_from_yaml_or_config_file
|
||||||
from jenkins_jobs.modules import hudson_model
|
from jenkins_jobs.modules.helpers import convert_mapping_to_xml
|
||||||
|
|
||||||
|
|
||||||
def archive(parser, xml_parent, data):
|
def archive(parser, xml_parent, data):
|
||||||
@ -5561,6 +5562,107 @@ def phabricator(parser, xml_parent, data):
|
|||||||
data.get('comment-with-console-link-on-failure')).lower()
|
data.get('comment-with-console-link-on-failure')).lower()
|
||||||
|
|
||||||
|
|
||||||
|
def openshift_build_canceller(parser, xml_parent, data):
|
||||||
|
"""yaml: openshift-build-canceller
|
||||||
|
This action is intended to provide cleanup for a Jenkins job which failed
|
||||||
|
because a build is hung (instead of terminating with a failure code);
|
||||||
|
this step will allow you to perform the equivalent of a oc cancel-build
|
||||||
|
for the provided build config; any builds under that build config which
|
||||||
|
are not previously terminated (either successfully or unsuccessfully)
|
||||||
|
or cancelled will be cancelled.
|
||||||
|
Requires the Jenkins :jenkins-wiki:`OpenShift
|
||||||
|
Pipeline Plugin <OpenShift+Pipeline+Plugin>`.
|
||||||
|
|
||||||
|
: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 str verbose: This flag is the toggle for
|
||||||
|
turning on or off detailed logging in this plug-in. (default 'false')
|
||||||
|
|
||||||
|
Full Example:
|
||||||
|
|
||||||
|
.. literalinclude::
|
||||||
|
../../tests/publishers/fixtures/openshift-build-canceller001.yaml
|
||||||
|
:language: yaml
|
||||||
|
|
||||||
|
Minimal Example:
|
||||||
|
|
||||||
|
.. literalinclude::
|
||||||
|
../../tests/publishers/fixtures/openshift-build-canceller002.yaml
|
||||||
|
:language: yaml
|
||||||
|
"""
|
||||||
|
|
||||||
|
osb = XML.SubElement(xml_parent,
|
||||||
|
'com.openshift.jenkins.plugins.pipeline.'
|
||||||
|
'OpenShiftBuildCanceller')
|
||||||
|
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', ''),
|
||||||
|
("verbose", 'verbose', 'false'),
|
||||||
|
]
|
||||||
|
|
||||||
|
convert_mapping_to_xml(osb, data, mapping)
|
||||||
|
|
||||||
|
|
||||||
|
def openshift_deploy_canceller(parser, xml_parent, data):
|
||||||
|
"""yaml: openshift-deploy-canceller
|
||||||
|
This action is intended to provide cleanup for any OpenShift deployments
|
||||||
|
left running when the Job completes; this step will allow you to perform
|
||||||
|
the equivalent of a oc deploy --cancel for the provided deployment config.
|
||||||
|
Requires the Jenkins :jenkins-wiki:`OpenShift
|
||||||
|
Pipeline Plugin <OpenShift+Pipeline+Plugin>`.
|
||||||
|
|
||||||
|
: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)
|
||||||
|
:arg str verbose: This flag is the toggle for
|
||||||
|
turning on or off detailed logging in this plug-in. (default 'false')
|
||||||
|
|
||||||
|
Full Example:
|
||||||
|
|
||||||
|
.. literalinclude::
|
||||||
|
../../tests/publishers/fixtures/openshift-deploy-canceller001.yaml
|
||||||
|
:language: yaml
|
||||||
|
|
||||||
|
Minimal Example:
|
||||||
|
|
||||||
|
.. literalinclude::
|
||||||
|
../../tests/publishers/fixtures/openshift-deploy-canceller002.yaml
|
||||||
|
:language: yaml
|
||||||
|
"""
|
||||||
|
|
||||||
|
osb = XML.SubElement(xml_parent,
|
||||||
|
'com.openshift.jenkins.plugins.pipeline.'
|
||||||
|
'OpenShiftDeployCanceller')
|
||||||
|
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', ''),
|
||||||
|
("verbose", 'verbose', 'false'),
|
||||||
|
]
|
||||||
|
|
||||||
|
convert_mapping_to_xml(osb, data, mapping)
|
||||||
|
|
||||||
|
|
||||||
class Publishers(jenkins_jobs.modules.base.Base):
|
class Publishers(jenkins_jobs.modules.base.Base):
|
||||||
sequence = 70
|
sequence = 70
|
||||||
|
|
||||||
|
@ -1058,8 +1058,8 @@ def openshift_img_streams(parser, xml_parent, data):
|
|||||||
OpenShift ImageStreams (which are abstractions of Docker repositories)
|
OpenShift ImageStreams (which are abstractions of Docker repositories)
|
||||||
and SCMs - versions / commit IDs of related artifacts
|
and SCMs - versions / commit IDs of related artifacts
|
||||||
(images vs. programmatics files)
|
(images vs. programmatics files)
|
||||||
Requires the Jenkins `OpenShift3 Plugin
|
Requires the Jenkins :jenkins-wiki:`OpenShift
|
||||||
<https://github.com/gabemontero/openshift-jenkins-buildutils/>`_
|
Pipeline Plugin <OpenShift+Pipeline+Plugin>`._
|
||||||
|
|
||||||
:arg str image-stream-name: The name of the ImageStream is what shows up
|
: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
|
in the NAME column if you dump all the ImageStream's with the
|
||||||
@ -1074,6 +1074,8 @@ def openshift_img_streams(parser, xml_parent, data):
|
|||||||
a Build on. (default: test)
|
a Build on. (default: test)
|
||||||
:arg str auth-token: The value here is what you supply with the --token
|
:arg str auth-token: The value here is what you supply with the --token
|
||||||
option when invoking the OpenShift `oc` command. (optional)
|
option when invoking the OpenShift `oc` command. (optional)
|
||||||
|
:arg str verbose: This flag is the toggle for
|
||||||
|
turning on or off detailed logging in this plug-in. (optional)
|
||||||
|
|
||||||
Full Example:
|
Full Example:
|
||||||
|
|
||||||
@ -1089,7 +1091,7 @@ def openshift_img_streams(parser, xml_parent, data):
|
|||||||
"""
|
"""
|
||||||
scm = XML.SubElement(xml_parent,
|
scm = XML.SubElement(xml_parent,
|
||||||
'scm', {'class':
|
'scm', {'class':
|
||||||
'com.openshift.openshiftjenkinsbuildutils.'
|
'com.openshift.jenkins.plugins.pipeline.'
|
||||||
'OpenShiftImageStreams'})
|
'OpenShiftImageStreams'})
|
||||||
mapping = [
|
mapping = [
|
||||||
# option, xml name, default value
|
# option, xml name, default value
|
||||||
@ -1098,6 +1100,7 @@ def openshift_img_streams(parser, xml_parent, data):
|
|||||||
("api-url", 'apiURL', 'https://openshift.default.svc.cluster.local'),
|
("api-url", 'apiURL', 'https://openshift.default.svc.cluster.local'),
|
||||||
("namespace", 'namespace', 'test'),
|
("namespace", 'namespace', 'test'),
|
||||||
("auth-token", 'authToken', ''),
|
("auth-token", 'authToken', ''),
|
||||||
|
("verbose", 'verbose', ''),
|
||||||
]
|
]
|
||||||
|
|
||||||
convert_mapping_to_xml(scm, data, mapping)
|
convert_mapping_to_xml(scm, data, mapping)
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<project>
|
<project>
|
||||||
<builders>
|
<builders>
|
||||||
<com.openshift.openshiftjenkinsbuildutils.OpenShiftBuildVerifier>
|
<com.openshift.jenkins.plugins.pipeline.OpenShiftBuildVerifier>
|
||||||
<apiURL>https://openshift.example.local.url/</apiURL>
|
<apiURL>https://openshift.example.local.url/</apiURL>
|
||||||
<bldCfg>front</bldCfg>
|
<bldCfg>front</bldCfg>
|
||||||
<namespace>test-build</namespace>
|
<namespace>test-build</namespace>
|
||||||
<authToken>ose-key-buildv1</authToken>
|
<authToken>ose-key-buildv1</authToken>
|
||||||
</com.openshift.openshiftjenkinsbuildutils.OpenShiftBuildVerifier>
|
<verbose>true</verbose>
|
||||||
|
</com.openshift.jenkins.plugins.pipeline.OpenShiftBuildVerifier>
|
||||||
</builders>
|
</builders>
|
||||||
</project>
|
</project>
|
@ -3,4 +3,5 @@ builders:
|
|||||||
api-url: https://openshift.example.local.url/
|
api-url: https://openshift.example.local.url/
|
||||||
bld-cfg: front
|
bld-cfg: front
|
||||||
namespace: test-build
|
namespace: test-build
|
||||||
auth-token: ose-key-buildv1
|
auth-token: ose-key-buildv1
|
||||||
|
verbose: true
|
@ -1,11 +1,12 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<project>
|
<project>
|
||||||
<builders>
|
<builders>
|
||||||
<com.openshift.openshiftjenkinsbuildutils.OpenShiftBuildVerifier>
|
<com.openshift.jenkins.plugins.pipeline.OpenShiftBuildVerifier>
|
||||||
<apiURL>https://openshift.default.svc.cluster.local</apiURL>
|
<apiURL>https://openshift.default.svc.cluster.local</apiURL>
|
||||||
<bldCfg>frontend</bldCfg>
|
<bldCfg>frontend</bldCfg>
|
||||||
<namespace>test</namespace>
|
<namespace>test</namespace>
|
||||||
<authToken/>
|
<authToken/>
|
||||||
</com.openshift.openshiftjenkinsbuildutils.OpenShiftBuildVerifier>
|
<verbose>false</verbose>
|
||||||
|
</com.openshift.jenkins.plugins.pipeline.OpenShiftBuildVerifier>
|
||||||
</builders>
|
</builders>
|
||||||
</project>
|
</project>
|
@ -1,12 +1,15 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<project>
|
<project>
|
||||||
<builders>
|
<builders>
|
||||||
<com.openshift.openshiftjenkinsbuildutils.OpenShiftBuilder>
|
<com.openshift.jenkins.plugins.pipeline.OpenShiftBuilder>
|
||||||
<apiURL>https://openshift.example.local.url/</apiURL>
|
<apiURL>https://openshift.example.local.url/</apiURL>
|
||||||
<bldCfg>front</bldCfg>
|
<bldCfg>front</bldCfg>
|
||||||
<namespace>test9</namespace>
|
<namespace>test9</namespace>
|
||||||
<authToken>ose-builder1</authToken>
|
<authToken>ose-builder1</authToken>
|
||||||
<followLog>false</followLog>
|
<commitID>ae489f7d</commitID>
|
||||||
</com.openshift.openshiftjenkinsbuildutils.OpenShiftBuilder>
|
<verbose>true</verbose>
|
||||||
|
<buildName>ose-test-build</buildName>
|
||||||
|
<showBuildLogs>true</showBuildLogs>
|
||||||
|
</com.openshift.jenkins.plugins.pipeline.OpenShiftBuilder>
|
||||||
</builders>
|
</builders>
|
||||||
</project>
|
</project>
|
@ -4,4 +4,7 @@ builders:
|
|||||||
bld-cfg: front
|
bld-cfg: front
|
||||||
namespace: test9
|
namespace: test9
|
||||||
auth-token: ose-builder1
|
auth-token: ose-builder1
|
||||||
follow-log: false
|
commit-ID: ae489f7d
|
||||||
|
verbose: true
|
||||||
|
build-name: ose-test-build
|
||||||
|
show-build-logs: true
|
@ -1,12 +1,15 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<project>
|
<project>
|
||||||
<builders>
|
<builders>
|
||||||
<com.openshift.openshiftjenkinsbuildutils.OpenShiftBuilder>
|
<com.openshift.jenkins.plugins.pipeline.OpenShiftBuilder>
|
||||||
<apiURL>https://openshift.default.svc.cluster.local</apiURL>
|
<apiURL>https://openshift.default.svc.cluster.local</apiURL>
|
||||||
<bldCfg>frontend</bldCfg>
|
<bldCfg>frontend</bldCfg>
|
||||||
<namespace>test</namespace>
|
<namespace>test</namespace>
|
||||||
<authToken/>
|
<authToken/>
|
||||||
<followLog>true</followLog>
|
<commitID/>
|
||||||
</com.openshift.openshiftjenkinsbuildutils.OpenShiftBuilder>
|
<verbose>false</verbose>
|
||||||
|
<buildName/>
|
||||||
|
<showBuildLogs>false</showBuildLogs>
|
||||||
|
</com.openshift.jenkins.plugins.pipeline.OpenShiftBuilder>
|
||||||
</builders>
|
</builders>
|
||||||
</project>
|
</project>
|
12
tests/builders/fixtures/openshift-creator001.xml
Normal file
12
tests/builders/fixtures/openshift-creator001.xml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<project>
|
||||||
|
<builders>
|
||||||
|
<com.openshift.jenkins.plugins.pipeline.OpenShiftCreator>
|
||||||
|
<apiURL>https://openshift.example.local.url/</apiURL>
|
||||||
|
<jsonyaml>front: back</jsonyaml>
|
||||||
|
<namespace>test6</namespace>
|
||||||
|
<authToken>ose-key-creator1</authToken>
|
||||||
|
<verbose>true</verbose>
|
||||||
|
</com.openshift.jenkins.plugins.pipeline.OpenShiftCreator>
|
||||||
|
</builders>
|
||||||
|
</project>
|
7
tests/builders/fixtures/openshift-creator001.yaml
Normal file
7
tests/builders/fixtures/openshift-creator001.yaml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
builders:
|
||||||
|
- openshift-creator:
|
||||||
|
api-url: https://openshift.example.local.url/
|
||||||
|
jsonyaml: 'front: back'
|
||||||
|
namespace: test6
|
||||||
|
auth-token: ose-key-creator1
|
||||||
|
verbose: true
|
12
tests/builders/fixtures/openshift-creator002.xml
Normal file
12
tests/builders/fixtures/openshift-creator002.xml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<project>
|
||||||
|
<builders>
|
||||||
|
<com.openshift.jenkins.plugins.pipeline.OpenShiftCreator>
|
||||||
|
<apiURL>https://openshift.default.svc.cluster.local</apiURL>
|
||||||
|
<jsonyaml/>
|
||||||
|
<namespace>test</namespace>
|
||||||
|
<authToken/>
|
||||||
|
<verbose>false</verbose>
|
||||||
|
</com.openshift.jenkins.plugins.pipeline.OpenShiftCreator>
|
||||||
|
</builders>
|
||||||
|
</project>
|
2
tests/builders/fixtures/openshift-creator002.yaml
Normal file
2
tests/builders/fixtures/openshift-creator002.yaml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
builders:
|
||||||
|
- openshift-creator
|
@ -1,12 +1,13 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<project>
|
<project>
|
||||||
<builders>
|
<builders>
|
||||||
<com.openshift.openshiftjenkinsbuildutils.OpenShiftDeploymentVerifier>
|
<com.openshift.jenkins.plugins.pipeline.OpenShiftDeploymentVerifier>
|
||||||
<apiURL>https://openshift.example.local.url/</apiURL>
|
<apiURL>https://openshift.example.local.url/</apiURL>
|
||||||
<depCfg>front</depCfg>
|
<depCfg>front</depCfg>
|
||||||
<namespace>test6</namespace>
|
<namespace>test6</namespace>
|
||||||
<replicaCount>4</replicaCount>
|
<replicaCount>4</replicaCount>
|
||||||
<authToken>ose-key-dep-verify1</authToken>
|
<authToken>ose-key-dep-verify1</authToken>
|
||||||
</com.openshift.openshiftjenkinsbuildutils.OpenShiftDeploymentVerifier>
|
<verbose>true</verbose>
|
||||||
|
</com.openshift.jenkins.plugins.pipeline.OpenShiftDeploymentVerifier>
|
||||||
</builders>
|
</builders>
|
||||||
</project>
|
</project>
|
@ -4,4 +4,5 @@ builders:
|
|||||||
dep-cfg: front
|
dep-cfg: front
|
||||||
namespace: test6
|
namespace: test6
|
||||||
replica-count: 4
|
replica-count: 4
|
||||||
auth-token: ose-key-dep-verify1
|
auth-token: ose-key-dep-verify1
|
||||||
|
verbose: true
|
@ -1,12 +1,13 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<project>
|
<project>
|
||||||
<builders>
|
<builders>
|
||||||
<com.openshift.openshiftjenkinsbuildutils.OpenShiftDeploymentVerifier>
|
<com.openshift.jenkins.plugins.pipeline.OpenShiftDeploymentVerifier>
|
||||||
<apiURL>https://openshift.default.svc.cluster.local</apiURL>
|
<apiURL>https://openshift.default.svc.cluster.local</apiURL>
|
||||||
<depCfg>frontend</depCfg>
|
<depCfg>frontend</depCfg>
|
||||||
<namespace>test</namespace>
|
<namespace>test</namespace>
|
||||||
<replicaCount>0</replicaCount>
|
<replicaCount>0</replicaCount>
|
||||||
<authToken/>
|
<authToken/>
|
||||||
</com.openshift.openshiftjenkinsbuildutils.OpenShiftDeploymentVerifier>
|
<verbose>false</verbose>
|
||||||
|
</com.openshift.jenkins.plugins.pipeline.OpenShiftDeploymentVerifier>
|
||||||
</builders>
|
</builders>
|
||||||
</project>
|
</project>
|
@ -1,11 +1,12 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<project>
|
<project>
|
||||||
<builders>
|
<builders>
|
||||||
<com.openshift.openshiftjenkinsbuildutils.OpenShiftDeployer>
|
<com.openshift.jenkins.plugins.pipeline.OpenShiftDeployer>
|
||||||
<apiURL>https://openshift.example.local.url/</apiURL>
|
<apiURL>https://openshift.example.local.url/</apiURL>
|
||||||
<depCfg>front</depCfg>
|
<depCfg>front</depCfg>
|
||||||
<namespace>test3</namespace>
|
<namespace>test3</namespace>
|
||||||
<authToken>ose-key-deployer1</authToken>
|
<authToken>ose-key-deployer1</authToken>
|
||||||
</com.openshift.openshiftjenkinsbuildutils.OpenShiftDeployer>
|
<verbose>true</verbose>
|
||||||
|
</com.openshift.jenkins.plugins.pipeline.OpenShiftDeployer>
|
||||||
</builders>
|
</builders>
|
||||||
</project>
|
</project>
|
@ -3,4 +3,5 @@ builders:
|
|||||||
api-url: https://openshift.example.local.url/
|
api-url: https://openshift.example.local.url/
|
||||||
dep-cfg: front
|
dep-cfg: front
|
||||||
namespace: test3
|
namespace: test3
|
||||||
auth-token: ose-key-deployer1
|
auth-token: ose-key-deployer1
|
||||||
|
verbose: true
|
@ -1,11 +1,12 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<project>
|
<project>
|
||||||
<builders>
|
<builders>
|
||||||
<com.openshift.openshiftjenkinsbuildutils.OpenShiftDeployer>
|
<com.openshift.jenkins.plugins.pipeline.OpenShiftDeployer>
|
||||||
<apiURL>https://openshift.default.svc.cluster.local</apiURL>
|
<apiURL>https://openshift.default.svc.cluster.local</apiURL>
|
||||||
<depCfg>frontend</depCfg>
|
<depCfg>frontend</depCfg>
|
||||||
<namespace>test</namespace>
|
<namespace>test</namespace>
|
||||||
<authToken/>
|
<authToken/>
|
||||||
</com.openshift.openshiftjenkinsbuildutils.OpenShiftDeployer>
|
<verbose>false</verbose>
|
||||||
|
</com.openshift.jenkins.plugins.pipeline.OpenShiftDeployer>
|
||||||
</builders>
|
</builders>
|
||||||
</project>
|
</project>
|
@ -1,12 +1,13 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<project>
|
<project>
|
||||||
<builders>
|
<builders>
|
||||||
<com.openshift.openshiftjenkinsbuildutils.OpenShiftImageTagger>
|
<com.openshift.jenkins.plugins.pipeline.OpenShiftImageTagger>
|
||||||
<apiURL>https://openshift.example.local.url/</apiURL>
|
<apiURL>https://openshift.example.local.url/</apiURL>
|
||||||
<testTag>origin-nodejs-sample:test</testTag>
|
<testTag>origin-nodejs-sample:test</testTag>
|
||||||
<prodTag>origin-nodejs-sample:production</prodTag>
|
<prodTag>origin-nodejs-sample:production</prodTag>
|
||||||
<namespace>test5</namespace>
|
<namespace>test5</namespace>
|
||||||
<authToken>ose-key-img1</authToken>
|
<authToken>ose-key-img1</authToken>
|
||||||
</com.openshift.openshiftjenkinsbuildutils.OpenShiftImageTagger>
|
<verbose>true</verbose>
|
||||||
|
</com.openshift.jenkins.plugins.pipeline.OpenShiftImageTagger>
|
||||||
</builders>
|
</builders>
|
||||||
</project>
|
</project>
|
@ -4,4 +4,5 @@ builders:
|
|||||||
test-tag: origin-nodejs-sample:test
|
test-tag: origin-nodejs-sample:test
|
||||||
prod-tag: origin-nodejs-sample:production
|
prod-tag: origin-nodejs-sample:production
|
||||||
namespace: test5
|
namespace: test5
|
||||||
auth-token: ose-key-img1
|
auth-token: ose-key-img1
|
||||||
|
verbose: true
|
@ -1,12 +1,13 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<project>
|
<project>
|
||||||
<builders>
|
<builders>
|
||||||
<com.openshift.openshiftjenkinsbuildutils.OpenShiftImageTagger>
|
<com.openshift.jenkins.plugins.pipeline.OpenShiftImageTagger>
|
||||||
<apiURL>https://openshift.default.svc.cluster.local</apiURL>
|
<apiURL>https://openshift.default.svc.cluster.local</apiURL>
|
||||||
<testTag>origin-nodejs-sample:latest</testTag>
|
<testTag>origin-nodejs-sample:latest</testTag>
|
||||||
<prodTag>origin-nodejs-sample:prod</prodTag>
|
<prodTag>origin-nodejs-sample:prod</prodTag>
|
||||||
<namespace>test</namespace>
|
<namespace>test</namespace>
|
||||||
<authToken/>
|
<authToken/>
|
||||||
</com.openshift.openshiftjenkinsbuildutils.OpenShiftImageTagger>
|
<verbose>false</verbose>
|
||||||
|
</com.openshift.jenkins.plugins.pipeline.OpenShiftImageTagger>
|
||||||
</builders>
|
</builders>
|
||||||
</project>
|
</project>
|
@ -1,12 +1,13 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<project>
|
<project>
|
||||||
<builders>
|
<builders>
|
||||||
<com.openshift.openshiftjenkinsbuildutils.OpenShiftScaler>
|
<com.openshift.jenkins.plugins.pipeline.OpenShiftScaler>
|
||||||
<apiURL>https://openshift.example.local.url/</apiURL>
|
<apiURL>https://openshift.example.local.url/</apiURL>
|
||||||
<depCfg>front</depCfg>
|
<depCfg>front</depCfg>
|
||||||
<namespace>test2</namespace>
|
<namespace>test2</namespace>
|
||||||
<replicaCount>4</replicaCount>
|
<replicaCount>4</replicaCount>
|
||||||
<authToken>ose-key-scaler1</authToken>
|
<authToken>ose-key-scaler1</authToken>
|
||||||
</com.openshift.openshiftjenkinsbuildutils.OpenShiftScaler>
|
<verbose>true</verbose>
|
||||||
|
</com.openshift.jenkins.plugins.pipeline.OpenShiftScaler>
|
||||||
</builders>
|
</builders>
|
||||||
</project>
|
</project>
|
@ -4,4 +4,5 @@ builders:
|
|||||||
dep-cfg: front
|
dep-cfg: front
|
||||||
namespace: test2
|
namespace: test2
|
||||||
replica-count: 4
|
replica-count: 4
|
||||||
auth-token: ose-key-scaler1
|
auth-token: ose-key-scaler1
|
||||||
|
verbose: true
|
@ -1,12 +1,13 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<project>
|
<project>
|
||||||
<builders>
|
<builders>
|
||||||
<com.openshift.openshiftjenkinsbuildutils.OpenShiftScaler>
|
<com.openshift.jenkins.plugins.pipeline.OpenShiftScaler>
|
||||||
<apiURL>https://openshift.default.svc.cluster.local</apiURL>
|
<apiURL>https://openshift.default.svc.cluster.local</apiURL>
|
||||||
<depCfg>frontend</depCfg>
|
<depCfg>frontend</depCfg>
|
||||||
<namespace>test</namespace>
|
<namespace>test</namespace>
|
||||||
<replicaCount>0</replicaCount>
|
<replicaCount>0</replicaCount>
|
||||||
<authToken/>
|
<authToken/>
|
||||||
</com.openshift.openshiftjenkinsbuildutils.OpenShiftScaler>
|
<verbose>false</verbose>
|
||||||
|
</com.openshift.jenkins.plugins.pipeline.OpenShiftScaler>
|
||||||
</builders>
|
</builders>
|
||||||
</project>
|
</project>
|
@ -1,11 +1,12 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<project>
|
<project>
|
||||||
<builders>
|
<builders>
|
||||||
<com.openshift.openshiftjenkinsbuildutils.OpenShiftServiceVerifier>
|
<com.openshift.jenkins.plugins.pipeline.OpenShiftServiceVerifier>
|
||||||
<apiURL>https://openshift.example.local.url/</apiURL>
|
<apiURL>https://openshift.example.local.url/</apiURL>
|
||||||
<svcName>front</svcName>
|
<svcName>front</svcName>
|
||||||
<namespace>test4</namespace>
|
<namespace>test4</namespace>
|
||||||
<authToken>ose-key-svc-verify1</authToken>
|
<authToken>ose-key-svc-verify1</authToken>
|
||||||
</com.openshift.openshiftjenkinsbuildutils.OpenShiftServiceVerifier>
|
<verbose>true</verbose>
|
||||||
|
</com.openshift.jenkins.plugins.pipeline.OpenShiftServiceVerifier>
|
||||||
</builders>
|
</builders>
|
||||||
</project>
|
</project>
|
@ -3,4 +3,5 @@ builders:
|
|||||||
api-url: https://openshift.example.local.url/
|
api-url: https://openshift.example.local.url/
|
||||||
svc-name: front
|
svc-name: front
|
||||||
namespace: test4
|
namespace: test4
|
||||||
auth-token: ose-key-svc-verify1
|
auth-token: ose-key-svc-verify1
|
||||||
|
verbose: true
|
@ -1,11 +1,12 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<project>
|
<project>
|
||||||
<builders>
|
<builders>
|
||||||
<com.openshift.openshiftjenkinsbuildutils.OpenShiftServiceVerifier>
|
<com.openshift.jenkins.plugins.pipeline.OpenShiftServiceVerifier>
|
||||||
<apiURL>https://openshift.default.svc.cluster.local</apiURL>
|
<apiURL>https://openshift.default.svc.cluster.local</apiURL>
|
||||||
<svcName>frontend</svcName>
|
<svcName>frontend</svcName>
|
||||||
<namespace>test</namespace>
|
<namespace>test</namespace>
|
||||||
<authToken/>
|
<authToken/>
|
||||||
</com.openshift.openshiftjenkinsbuildutils.OpenShiftServiceVerifier>
|
<verbose>false</verbose>
|
||||||
|
</com.openshift.jenkins.plugins.pipeline.OpenShiftServiceVerifier>
|
||||||
</builders>
|
</builders>
|
||||||
</project>
|
</project>
|
12
tests/publishers/fixtures/openshift-build-canceller001.xml
Normal file
12
tests/publishers/fixtures/openshift-build-canceller001.xml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<project>
|
||||||
|
<publishers>
|
||||||
|
<com.openshift.jenkins.plugins.pipeline.OpenShiftBuildCanceller>
|
||||||
|
<apiURL>https://openshift.example.local.url/</apiURL>
|
||||||
|
<bldCfg>front</bldCfg>
|
||||||
|
<namespace>test-build</namespace>
|
||||||
|
<authToken>ose-key-canceller1</authToken>
|
||||||
|
<verbose>true</verbose>
|
||||||
|
</com.openshift.jenkins.plugins.pipeline.OpenShiftBuildCanceller>
|
||||||
|
</publishers>
|
||||||
|
</project>
|
@ -0,0 +1,7 @@
|
|||||||
|
publishers:
|
||||||
|
- openshift-build-canceller:
|
||||||
|
api-url: https://openshift.example.local.url/
|
||||||
|
bld-cfg: front
|
||||||
|
namespace: test-build
|
||||||
|
auth-token: ose-key-canceller1
|
||||||
|
verbose: true
|
12
tests/publishers/fixtures/openshift-build-canceller002.xml
Normal file
12
tests/publishers/fixtures/openshift-build-canceller002.xml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<project>
|
||||||
|
<publishers>
|
||||||
|
<com.openshift.jenkins.plugins.pipeline.OpenShiftBuildCanceller>
|
||||||
|
<apiURL>https://openshift.default.svc.cluster.local</apiURL>
|
||||||
|
<bldCfg>frontend</bldCfg>
|
||||||
|
<namespace>test</namespace>
|
||||||
|
<authToken/>
|
||||||
|
<verbose>false</verbose>
|
||||||
|
</com.openshift.jenkins.plugins.pipeline.OpenShiftBuildCanceller>
|
||||||
|
</publishers>
|
||||||
|
</project>
|
@ -0,0 +1,2 @@
|
|||||||
|
publishers:
|
||||||
|
- openshift-build-canceller
|
12
tests/publishers/fixtures/openshift-deploy-canceller001.xml
Normal file
12
tests/publishers/fixtures/openshift-deploy-canceller001.xml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<project>
|
||||||
|
<publishers>
|
||||||
|
<com.openshift.jenkins.plugins.pipeline.OpenShiftDeployCanceller>
|
||||||
|
<apiURL>https://openshift.example.local.url/</apiURL>
|
||||||
|
<depCfg>front</depCfg>
|
||||||
|
<namespace>test6</namespace>
|
||||||
|
<authToken>ose-key-dep-canceller1</authToken>
|
||||||
|
<verbose>true</verbose>
|
||||||
|
</com.openshift.jenkins.plugins.pipeline.OpenShiftDeployCanceller>
|
||||||
|
</publishers>
|
||||||
|
</project>
|
@ -0,0 +1,7 @@
|
|||||||
|
publishers:
|
||||||
|
- openshift-deploy-canceller:
|
||||||
|
api-url: https://openshift.example.local.url/
|
||||||
|
dep-cfg: front
|
||||||
|
namespace: test6
|
||||||
|
auth-token: ose-key-dep-canceller1
|
||||||
|
verbose: true
|
12
tests/publishers/fixtures/openshift-deploy-canceller002.xml
Normal file
12
tests/publishers/fixtures/openshift-deploy-canceller002.xml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<project>
|
||||||
|
<publishers>
|
||||||
|
<com.openshift.jenkins.plugins.pipeline.OpenShiftDeployCanceller>
|
||||||
|
<apiURL>https://openshift.default.svc.cluster.local</apiURL>
|
||||||
|
<depCfg>frontend</depCfg>
|
||||||
|
<namespace>test</namespace>
|
||||||
|
<authToken/>
|
||||||
|
<verbose>false</verbose>
|
||||||
|
</com.openshift.jenkins.plugins.pipeline.OpenShiftDeployCanceller>
|
||||||
|
</publishers>
|
||||||
|
</project>
|
@ -0,0 +1,2 @@
|
|||||||
|
publishers:
|
||||||
|
- openshift-deploy-canceller
|
@ -1,10 +1,11 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<project>
|
<project>
|
||||||
<scm class="com.openshift.openshiftjenkinsbuildutils.OpenShiftImageStreams">
|
<scm class="com.openshift.jenkins.plugins.pipeline.OpenShiftImageStreams">
|
||||||
<imageStreamName>nodejs-010-fedora</imageStreamName>
|
<imageStreamName>nodejs-010-fedora</imageStreamName>
|
||||||
<tag>prod</tag>
|
<tag>prod</tag>
|
||||||
<apiURL>https://openshift.example.local.url/</apiURL>
|
<apiURL>https://openshift.example.local.url/</apiURL>
|
||||||
<namespace>test-scm</namespace>
|
<namespace>test-scm</namespace>
|
||||||
<authToken>ose-key-img-streams1</authToken>
|
<authToken>ose-key-img-streams1</authToken>
|
||||||
|
<verbose>true</verbose>
|
||||||
</scm>
|
</scm>
|
||||||
</project>
|
</project>
|
@ -4,4 +4,5 @@ scm:
|
|||||||
tag: prod
|
tag: prod
|
||||||
api-url: https://openshift.example.local.url/
|
api-url: https://openshift.example.local.url/
|
||||||
namespace: test-scm
|
namespace: test-scm
|
||||||
auth-token: ose-key-img-streams1
|
auth-token: ose-key-img-streams1
|
||||||
|
verbose: true
|
@ -1,10 +1,11 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<project>
|
<project>
|
||||||
<scm class="com.openshift.openshiftjenkinsbuildutils.OpenShiftImageStreams">
|
<scm class="com.openshift.jenkins.plugins.pipeline.OpenShiftImageStreams">
|
||||||
<imageStreamName>nodejs-010-centos7</imageStreamName>
|
<imageStreamName>nodejs-010-centos7</imageStreamName>
|
||||||
<tag>latest</tag>
|
<tag>latest</tag>
|
||||||
<apiURL>https://openshift.default.svc.cluster.local</apiURL>
|
<apiURL>https://openshift.default.svc.cluster.local</apiURL>
|
||||||
<namespace>test</namespace>
|
<namespace>test</namespace>
|
||||||
<authToken/>
|
<authToken/>
|
||||||
|
<verbose/>
|
||||||
</scm>
|
</scm>
|
||||||
</project>
|
</project>
|
Loading…
Reference in New Issue
Block a user