Package: yagocd
IntroductionThis library is a high level python API wrapper upon ThoughtWorks GoCD REST API.
From the official documentation:Go Continuous Delivery is continuous integration/deployment server,
which helps you automate and streamline the build-test-release cycle for worry-free.Using it, you can access to internals of the Pipelines, check their statuses, download Artifacts and more.
It is designed with maximum comfort and productivity from the user perspective, so it should be very easy
to use it in your own project.
More information is available at officialdocumentationInstallation$pipinstallyagocdQuick examplefromyagocdimportYagocdgo=Yagocd(server='https://example.com',auth=('user','password'),options={'verify':False# skip verification for SSL certificates.})forpipelineingo.pipelines:# Iterate over all pipelinesforinstanceinpipeline:# Iterate over each instance of some pipelineforstageininstance:# Iterate over each stages of some pipeline instanceforjobinstage:# Iterate over each job of some pipelineforroot,folder,filesinjob.artifacts:# Iterate over artifacts like `os.walk` mannerforartifactinfiles:print(artifact.data.url)# print property of each jobforkey,valueinjob.properties.items():print("{}=>{}".format(key,value))Different implementations of GoCD APIHere is list of similar projects, that implements GoCD API:py-gocd [python]: A Python API for interacting with Go Continuous Deliverygocdapi [python]: A Python API for accessing resources and configuring Go (thoughtworks) continuous-delivery serversgomatic [python]: A Python API for configuring GoCDgoapi [ruby]: Go (http://www.go.cd) API ruby clientgocd-api [NodeJS]: Accesshttp://www.go.cdAPI via nodeJSgocd-api [GoLang]: An implementation of the gocd APILicenceMITRelease History1.0.0 (2017-04-13)Improvements- Added elastic profile support.
- Added package repositories API support.
- Added package management API support.
- Added encryption API support.
- Improvements inValueStreamMap.
- Added enumerations (constants) for stage result and state.
- Reworked artifact manager (breaking change!)
- ETag is now part of resource object (breaking change!)Miscellaneous- Added support for 16.11.0 version.
- Added support for 17.01.0 version.
- Added support for 17.02.0 version.
- Added support for 17.03.0 version.
- Refactored managers urls and parameters.0.4.4 (2016-12-01)Improvements- Client’s manager are now initialized just once, which makes possible to cache the results of their calls.0.4.3 (2016-11-23)Improvements- Improvements inValueStreamMap.
- Added possibility to programmatically disable version check inSincedecorator, usingENABLEDflag.Miscellaneous- Added support for 16.10.1 version.0.4.2 (2016-10-28)Improvements- ValueStreamMap: put dictionary instead of StageInstance.0.4.1 (2016-10-09)Improvements- Added custom exception error, which outputs error in clear format.
- Added support for pluggable SCM materials API.
- Added support for template API.
- Improvements inValueStreamMap.Miscellaneous- Documentation updated.
- Docker image updated, which used in testing.
- Added support for 16.10.0 version.0.4.0 (2016-10-01)ImprovementsAdded support for pipeline config API.Added support for version API.Added support for plugin info API.Added support for environments API.Added methods for getting different internal information (undocumented):supportandprocess_list.Added magic methods for iterating and key based access for some classes.All classes and their methods are now decorated with@sincedecorator, which adds possibility to check
at run-time whether given functionality already supported in the GoCD server and let’s dynamically select
correct headers.TestingNow tests are executed for GoCD version, running in Docker container, which add possibility
to test for any available version of the server. Also cassettes are also saved individually for
each GoCD version.Added testing for PEP8 and other checks viaflake8.0.3.2 (2016-07-26)ImprovementsAdded support ofvalue_stream_mapfunctionality.BugfixesFix return value ofArtifact.fetchmethod from text to binary.0.2.0 (2016-05-24)ImprovementsAdded support of getting server version through parsing/aboutpage.AddedConfirm: trueheader to some API calls.