aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Sokolovsky <paul.sokolovsky@linaro.org>2015-03-20 15:26:50 +0200
committerPaul Sokolovsky <paul.sokolovsky@linaro.org>2015-03-20 19:04:04 +0200
commit7c0f59ad8f0021de2d5dfdd2515fc78ee6666288 (patch)
tree6ca1ad3ba3130e1067aa5b96c943a5163acbcf22
parentf89d43fa5d9ab44528473763b15cff90747b6202 (diff)
downloadjjb-linaro-plugin-7c0f59ad8f0021de2d5dfdd2515fc78ee6666288.tar.gz
Add "linaro-publish-token" build step to get a token for Linaro PubAPI.
Build step doesn't require any params (so far), should be first step in build process. Change-Id: I5a9cfaad56175dfc0ad33861aec1d70b2358b39d
-rw-r--r--README.rst13
-rw-r--r--jenkins_jobs_linaro/__init__.py0
-rw-r--r--jenkins_jobs_linaro/modules/__init__.py0
-rw-r--r--jenkins_jobs_linaro/modules/linaro.py31
-rw-r--r--setup.cfg33
-rw-r--r--setup.py19
6 files changed, 96 insertions, 0 deletions
diff --git a/README.rst b/README.rst
new file mode 100644
index 0000000..2121deb
--- /dev/null
+++ b/README.rst
@@ -0,0 +1,13 @@
+README
+======
+
+This is plugin for Jenkins Job Builder for Linaro-specific plugins and
+features. Jenkins Job Builder should be installed first.
+
+To install::
+
+ $ sudo python setup.py install
+
+Online documentation:
+
+* http://ci.openstack.org/jenkins-job-builder/
diff --git a/jenkins_jobs_linaro/__init__.py b/jenkins_jobs_linaro/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/jenkins_jobs_linaro/__init__.py
diff --git a/jenkins_jobs_linaro/modules/__init__.py b/jenkins_jobs_linaro/modules/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/jenkins_jobs_linaro/modules/__init__.py
diff --git a/jenkins_jobs_linaro/modules/linaro.py b/jenkins_jobs_linaro/modules/linaro.py
new file mode 100644
index 0000000..860eb3d
--- /dev/null
+++ b/jenkins_jobs_linaro/modules/linaro.py
@@ -0,0 +1,31 @@
+# Copyright 2015 Linaro
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+
+
+"""
+Support for Linaro specific features.
+"""
+
+
+import xml.etree.ElementTree as XML
+import logging
+
+
+def linaro_pub_token(parser, xml_parent, data):
+ """yaml: linaro-publish-token
+ Get one-time publishing token for Linaro Publishing API.
+ Requires the Jenkins Linaro Publishing API plugin.
+ """
+ XML.SubElement(xml_parent,
+ 'linaro.pubapi.LinaroPubAPIKey')
diff --git a/setup.cfg b/setup.cfg
new file mode 100644
index 0000000..a93890e
--- /dev/null
+++ b/setup.cfg
@@ -0,0 +1,33 @@
+[metadata]
+name = jjb-linaro
+author = Linaro
+author_email = systems@linaro.org
+summary = Linaro-specific extensions for Jenkins Job Builder
+description-file = README.rst
+license = Apache License, Version 2.0
+home-page = http://ci.openstack.org/jjb.html
+classifier =
+ Topic :: Utilities
+ Environment :: Console
+ Intended Audience :: Developers
+ Intended Audience :: Information Technology
+ Intended Audience :: System Administrators
+ License :: OSI Approved :: Apache Software License
+ Operating System :: OS Independent
+ Programming Language :: Python
+ Programming Language :: Python :: 2
+ Programming Language :: Python :: 2.6
+ Programming Language :: Python :: 2.7
+ Programming Language :: Python :: 3
+ Programming Language :: Python :: 3.3
+
+[files]
+packages =
+ jenkins_jobs_linaro
+
+[pbr]
+warnerrors = True
+
+[entry_points]
+jenkins_jobs.builders =
+ linaro-publish-token=jenkins_jobs_linaro.modules.linaro:linaro_pub_token
diff --git a/setup.py b/setup.py
new file mode 100644
index 0000000..a5af70f
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,19 @@
+# Copyright 2012 Hewlett-Packard Development Company, L.P.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+
+import setuptools
+
+setuptools.setup(
+ setup_requires=['pbr'],
+ pbr=True)