From 73c255d649af01f2249f0693d9f62c5254ad923a Mon Sep 17 00:00:00 2001 From: Ari LiVigni Date: Tue, 29 Sep 2015 14:48:49 -0400 Subject: [PATCH] Implements: additions for OS3 plugin entry points in builders and scm Add entry points for all builder and scm entry points for the openshift3 plugin. Adds openshift-builder, openshift-build-verify, openshift-deployer, openshift-dep-verify, openshift-img-tagger, openshift-scaler, openshift-svc-verify, openshift-img-streams Change-Id: I5d08ddd7eb09241869cf56a5ffdfcce6a0671a4c --- jenkins_jobs/modules/builders.py | 337 ++++++++++++++++++ jenkins_jobs/modules/scm.py | 60 ++++ setup.cfg | 8 + .../fixtures/openshift-build-verify001.xml | 11 + .../fixtures/openshift-build-verify001.yaml | 6 + .../fixtures/openshift-build-verify002.xml | 10 + .../fixtures/openshift-build-verify002.yaml | 2 + .../fixtures/openshift-builder001.xml | 12 + .../fixtures/openshift-builder001.yaml | 7 + .../fixtures/openshift-builder002.xml | 11 + .../fixtures/openshift-builder002.yaml | 2 + .../fixtures/openshift-dep-verify001.xml | 12 + .../fixtures/openshift-dep-verify001.yaml | 7 + .../fixtures/openshift-dep-verify002.xml | 11 + .../fixtures/openshift-dep-verify002.yaml | 2 + .../fixtures/openshift-deployer001.xml | 11 + .../fixtures/openshift-deployer001.yaml | 6 + .../fixtures/openshift-deployer002.xml | 10 + .../fixtures/openshift-deployer002.yaml | 2 + .../fixtures/openshift-img-tagger001.xml | 12 + .../fixtures/openshift-img-tagger001.yaml | 7 + .../fixtures/openshift-img-tagger002.xml | 11 + .../fixtures/openshift-img-tagger002.yaml | 2 + .../builders/fixtures/openshift-scaler001.xml | 12 + .../fixtures/openshift-scaler001.yaml | 7 + .../builders/fixtures/openshift-scaler002.xml | 11 + .../fixtures/openshift-scaler002.yaml | 2 + .../fixtures/openshift-svc-verify001.xml | 11 + .../fixtures/openshift-svc-verify001.yaml | 6 + .../fixtures/openshift-svc-verify002.xml | 10 + .../fixtures/openshift-svc-verify002.yaml | 2 + .../scm/fixtures/openshift-img-streams001.xml | 10 + .../fixtures/openshift-img-streams001.yaml | 7 + .../scm/fixtures/openshift-img-streams002.xml | 9 + .../fixtures/openshift-img-streams002.yaml | 2 + 35 files changed, 648 insertions(+) create mode 100644 tests/builders/fixtures/openshift-build-verify001.xml create mode 100644 tests/builders/fixtures/openshift-build-verify001.yaml create mode 100644 tests/builders/fixtures/openshift-build-verify002.xml create mode 100644 tests/builders/fixtures/openshift-build-verify002.yaml create mode 100644 tests/builders/fixtures/openshift-builder001.xml create mode 100644 tests/builders/fixtures/openshift-builder001.yaml create mode 100644 tests/builders/fixtures/openshift-builder002.xml create mode 100644 tests/builders/fixtures/openshift-builder002.yaml create mode 100644 tests/builders/fixtures/openshift-dep-verify001.xml create mode 100644 tests/builders/fixtures/openshift-dep-verify001.yaml create mode 100644 tests/builders/fixtures/openshift-dep-verify002.xml create mode 100644 tests/builders/fixtures/openshift-dep-verify002.yaml create mode 100644 tests/builders/fixtures/openshift-deployer001.xml create mode 100644 tests/builders/fixtures/openshift-deployer001.yaml create mode 100644 tests/builders/fixtures/openshift-deployer002.xml create mode 100644 tests/builders/fixtures/openshift-deployer002.yaml create mode 100644 tests/builders/fixtures/openshift-img-tagger001.xml create mode 100644 tests/builders/fixtures/openshift-img-tagger001.yaml create mode 100644 tests/builders/fixtures/openshift-img-tagger002.xml create mode 100644 tests/builders/fixtures/openshift-img-tagger002.yaml create mode 100644 tests/builders/fixtures/openshift-scaler001.xml create mode 100644 tests/builders/fixtures/openshift-scaler001.yaml create mode 100644 tests/builders/fixtures/openshift-scaler002.xml create mode 100644 tests/builders/fixtures/openshift-scaler002.yaml create mode 100644 tests/builders/fixtures/openshift-svc-verify001.xml create mode 100644 tests/builders/fixtures/openshift-svc-verify001.yaml create mode 100644 tests/builders/fixtures/openshift-svc-verify002.xml create mode 100644 tests/builders/fixtures/openshift-svc-verify002.yaml create mode 100644 tests/scm/fixtures/openshift-img-streams001.xml create mode 100644 tests/scm/fixtures/openshift-img-streams001.yaml create mode 100644 tests/scm/fixtures/openshift-img-streams002.xml create mode 100644 tests/scm/fixtures/openshift-img-streams002.yaml diff --git a/jenkins_jobs/modules/builders.py b/jenkins_jobs/modules/builders.py index cdb33a441..a711ca088 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 + `_ + + :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 + `_ + + :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 + `_ + + :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 + `_ + + :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 + `_ + + :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 + `_ + + :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 + `_ + + :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 f3af29814..92b503e3f 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 + `_ + + :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 38c13887a..e658bd193 100644 --- a/setup.cfg +++ b/setup.cfg @@ -69,6 +69,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 @@ -227,6 +234,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 000000000..8dbf921b1 --- /dev/null +++ b/tests/builders/fixtures/openshift-build-verify001.xml @@ -0,0 +1,11 @@ + + + + + https://openshift.example.local.url/ + front + test-build + ose-key-buildv1 + + + \ 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 000000000..6fc2ad953 --- /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 000000000..300e4306e --- /dev/null +++ b/tests/builders/fixtures/openshift-build-verify002.xml @@ -0,0 +1,10 @@ + + + + + https://openshift.default.svc.cluster.local + frontend + test + + + \ 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 000000000..019cc7858 --- /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 000000000..858e108f1 --- /dev/null +++ b/tests/builders/fixtures/openshift-builder001.xml @@ -0,0 +1,12 @@ + + + + + https://openshift.example.local.url/ + front + test9 + ose-builder1 + false + + + \ 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 000000000..995c8926d --- /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 000000000..61c349879 --- /dev/null +++ b/tests/builders/fixtures/openshift-builder002.xml @@ -0,0 +1,11 @@ + + + + + https://openshift.default.svc.cluster.local + frontend + test + true + + + \ 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 000000000..3ba9dcab7 --- /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 000000000..bb4af7a46 --- /dev/null +++ b/tests/builders/fixtures/openshift-dep-verify001.xml @@ -0,0 +1,12 @@ + + + + + https://openshift.example.local.url/ + front + test6 + 4 + ose-key-dep-verify1 + + + \ 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 000000000..21e5fe300 --- /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 000000000..ce4753b55 --- /dev/null +++ b/tests/builders/fixtures/openshift-dep-verify002.xml @@ -0,0 +1,11 @@ + + + + + https://openshift.default.svc.cluster.local + frontend + test + 0 + + + \ 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 000000000..0e84a90b7 --- /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 000000000..cf1838864 --- /dev/null +++ b/tests/builders/fixtures/openshift-deployer001.xml @@ -0,0 +1,11 @@ + + + + + https://openshift.example.local.url/ + front + test3 + ose-key-deployer1 + + + \ 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 000000000..e0c2d8217 --- /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 000000000..c81078a6f --- /dev/null +++ b/tests/builders/fixtures/openshift-deployer002.xml @@ -0,0 +1,10 @@ + + + + + https://openshift.default.svc.cluster.local + frontend + test + + + \ 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 000000000..5852cbd4a --- /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 000000000..69b21ba65 --- /dev/null +++ b/tests/builders/fixtures/openshift-img-tagger001.xml @@ -0,0 +1,12 @@ + + + + + https://openshift.example.local.url/ + origin-nodejs-sample:test + origin-nodejs-sample:production + test5 + ose-key-img1 + + + \ 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 000000000..d5e066759 --- /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 000000000..bb9a86658 --- /dev/null +++ b/tests/builders/fixtures/openshift-img-tagger002.xml @@ -0,0 +1,11 @@ + + + + + https://openshift.default.svc.cluster.local + origin-nodejs-sample:latest + origin-nodejs-sample:prod + test + + + \ 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 000000000..f12d35278 --- /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 000000000..7311569d9 --- /dev/null +++ b/tests/builders/fixtures/openshift-scaler001.xml @@ -0,0 +1,12 @@ + + + + + https://openshift.example.local.url/ + front + test2 + 4 + ose-key-scaler1 + + + \ 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 000000000..f3b18c8e2 --- /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 000000000..45e365f3a --- /dev/null +++ b/tests/builders/fixtures/openshift-scaler002.xml @@ -0,0 +1,11 @@ + + + + + https://openshift.default.svc.cluster.local + frontend + test + 0 + + + \ 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 000000000..8ced65306 --- /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 000000000..cc6bde73a --- /dev/null +++ b/tests/builders/fixtures/openshift-svc-verify001.xml @@ -0,0 +1,11 @@ + + + + + https://openshift.example.local.url/ + front + test4 + ose-key-svc-verify1 + + + \ 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 000000000..0e639cf4e --- /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 000000000..494f2b27c --- /dev/null +++ b/tests/builders/fixtures/openshift-svc-verify002.xml @@ -0,0 +1,10 @@ + + + + + https://openshift.default.svc.cluster.local + frontend + test + + + \ 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 000000000..3a6aa0ba0 --- /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 000000000..3de3781de --- /dev/null +++ b/tests/scm/fixtures/openshift-img-streams001.xml @@ -0,0 +1,10 @@ + + + + nodejs-010-fedora + prod + https://openshift.example.local.url/ + test-scm + ose-key-img-streams1 + + \ 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 000000000..b8da278b7 --- /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 000000000..7dc21e6d4 --- /dev/null +++ b/tests/scm/fixtures/openshift-img-streams002.xml @@ -0,0 +1,9 @@ + + + + nodejs-010-centos7 + latest + https://openshift.default.svc.cluster.local + test + + \ 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 000000000..4973d1d21 --- /dev/null +++ b/tests/scm/fixtures/openshift-img-streams002.yaml @@ -0,0 +1,2 @@ +scm: + - openshift-img-streams \ No newline at end of file