Package: gocdapi
gocdapiAbout this libraryGo is a continuous delivery system -http://www.go.cd/The goal of this python library is to be an easy interface for the Go server.This project was inspirated in the jenkinsapi library -https://github.com/salimfadhley/jenkinsapiThis library can help you:to list Go Agentsto enable/disable/delete a Go Agentto see a job run history of an Go Agentto list Go Pipelines Groups and their Pipelinesto schedule/release lock/pause/unpause a Go Pipelineto create and delete Go Pipelines from a XML config or delete Go Pipelinesto create and delete Go Pipelines Groupsto cancel a Go Stage run or see it’s historyPython versionsThe project have been tested and working on 2.7Known bugsCurrently compatible with Go version 14.3.0-1186.
No know bugs at the moment.Important LinksGo Continuous Delivery -http://www.go.cd/Project source code: github:https://github.com/joaogbcravo/gocdapiInstallationUsing PipRun the command:pipinstallgocdapiInstaling from the sourceYou can clone the repository and install:gitclonehttps://github.com/joaogbcravo/gocdapi.gitpythonsetup.pyinstallExamplegocdAPI is intended to map the objects in Go (e.g. Pipeline Groups, Pipelines, Agents) into easily managed Python
objects:>>>fromgocdapi.goimportGo>>>go_server=Go("http://localhost:8153/")>>>>>>foruuid,agentingo_server.agents:...printuuid," - ",agent...a8b7c2b4-3986-476a-a797-abb3a065587e-Agent@http://localhost:8153/>>>>>>agent=go_server.agents["a8b7c2b4-3986-476a-a797-abb3a065587e"]>>>agent.enable()>>>printagent.statusIdle>>>>>>agent.disable()>>>printagent.statusDisabled>>>>>>forname,pipeline_groupingo_server.pipeline_groups:...printname," - ",pipeline_group...Development-Pipeline@http://localhost:8153/>>>>>>pipeline_group=go_server.pipeline_groups["Development"]>>>forname,pipelineinpipeline_group:...printname," - ",pipeline...Web_Services_QA-Pipeline@http://localhost:8153/Deploy_Web_Services-Pipeline@http://localhost:8153/>>>TestingAfter the installation of the test dependencies on your system, run the command:pythonsetup.pynosetestsNose need a Go Server and Agent to run, so when you execute nosetests it will start a new Go Server and Agent, and it
will shutdown them after all the test run. If you haven’t the executable in the gocdapi_tests/systests folder it will
download them. This process can be slow, so you can start by yourself a Go Server and Agent and run nosetests in the
following way:pythonnosetests-s--nologcapture--tc=static_instances:trueTo make a source code analysis, you can run pep8 and pylint:pep8--ignore=E501gocdapi/*.pypylint--rcfile=pylintrcgocdapi/*.pyProject ContributorsJoao Cravo (joaogbcravo@gmail.com)Please do not contact these contributors directly for support questions! Use the GitHub tracker instead.LicenseThe MIT License (MIT)Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the “Software”), to deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
Software.THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.