Configuring TeamCity to run Python tests when scheduled. TeamCity can be configured to invoke our test suite and collect results in a scheduled interval. These steps will prepare us for this recipe by starting up TeamCity and having some code ready for testing. There is a Nose plugin that automatically detects when tests are being run from inside the TeamCity. This conveniently captures test results and communicates them with TeamCity. With this recipe, we will explore how to setup a CI job inside TeamCity that runs our tests and then manually invokes that job.
Latest versionReleased:
Use the TeamCity REST API from Python
Project description
PyTeamCity
Python interface to the RESTAPI ofTeamCity
New API work-in-progress
Note that I am working on a new API currently calledpyteamcity.future(initially added in#37).
Goal here is to create a brand new API that is much more flexible and tohave nicer code that is easier to work with. The old code encouragesadding a zillion methods for different ways of filtering. The new codehas an API with a smaller number of methods that are more consistent andmore flexible in terms of filtering. It is modeled after the Django ORMAPI.
There’s no formal docs for this API yet, but you should be able tofigure out how to use it by looking at the unittests.
I am probably not going to merge PRs that add things to the old API,because I see the new API as the future. I of course am very interestedin PRs that add things to the new API!
Examples
Connect to server
or specify no parameters and it will read settings from environmentvariables:
- TEAMCITY_USER
- TEAMCITY_PASSWORD
- TEAMCITY_HOST
- TEAMCITY_PORT (Defaults to 80 if not set)
Getting data
You can also look atsample.pyortest_legacy.py
Acknowledgements
This is a heavily-modified fork ofhttps://github.com/yotamoron/teamcity-python-rest-client so many thanksare due to Yotam Oron
Changes
0.1.1 (2016-11-09)
Project details
Release historyRelease notifications | RSS feed
0.1.1
0.1.0
0.0.1
0.0.0
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size pyteamcity-0.1.1-py2-none-any.whl (12.5 kB) | File type Wheel | Python version 2.7 | Upload date | Hashes |
Filename, size pyteamcity-0.1.1.tar.gz (35.0 kB) | File type Source | Python version None | Upload date | Hashes |
Hashes for pyteamcity-0.1.1-py2-none-any.whl
Algorithm | Hash digest |
---|---|
SHA256 | 43a5c91e62590259321dec37cfd0dc297905e92d9d2026030a016acf3d0e8cf7 |
MD5 | df1d124c1bbddb3af017cbae5ae657bd |
BLAKE2-256 | f3ccc4e598e5c1a9250ec7088c239732bb4ac195f0439336f6b55389286f179e |
Teamcity Python Runners
Hashes for pyteamcity-0.1.1.tar.gz
1:32youtube.comRunning A Simple Python Script
Algorithm | Hash digest |
---|---|
SHA256 | 3d9f97fff7f397f2c2484acd5acda7bb48681ec1ff9ed80443a7c374613b0fe1 |
MD5 | 7aa97fd86a151d3243ed1e31f79852cd |
BLAKE2-256 | 075b18104c49d8bb77a8f4ddd80822b223edbbd8e49ffcf539018b686b6b6e4f |