From 7c0f59ad8f0021de2d5dfdd2515fc78ee6666288 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Fri, 20 Mar 2015 15:26:50 +0200 Subject: 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 --- README.rst | 13 +++++++++++++ jenkins_jobs_linaro/__init__.py | 0 jenkins_jobs_linaro/modules/__init__.py | 0 jenkins_jobs_linaro/modules/linaro.py | 31 +++++++++++++++++++++++++++++++ setup.cfg | 33 +++++++++++++++++++++++++++++++++ setup.py | 19 +++++++++++++++++++ 6 files changed, 96 insertions(+) create mode 100644 README.rst create mode 100644 jenkins_jobs_linaro/__init__.py create mode 100644 jenkins_jobs_linaro/modules/__init__.py create mode 100644 jenkins_jobs_linaro/modules/linaro.py create mode 100644 setup.cfg create mode 100644 setup.py 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 diff --git a/jenkins_jobs_linaro/modules/__init__.py b/jenkins_jobs_linaro/modules/__init__.py new file mode 100644 index 0000000..e69de29 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) -- cgit v1.2.3