class BuildsJob(ScrollphatJob): def __init__(self, options): self.tc = TeamCity('dashing', 'l,sA-j2s9a', 'https://ci.avidity.se/httpAuth/app/rest/') def run(self): print(self.tc.get_projects())
# data = tc.get_build_statistics_by_build_id(73450) # print(json.dumps(data, indent=4)) # data = tc.get_build_tags_by_build_id(73450) # print(json.dumps(data, indent=4)) # data = tc.get_change_by_change_id(16884) # print(json.dumps(data, indent=4)) # data = tc.get_all_changes() # print(json.dumps(data, indent=4)) # data = tc.get_build_by_build_id(73450) # print(json.dumps(data, indent=4)) data = tc.get_projects() print(json.dumps(data, indent=4)) # data = tc.get_agents() # print(json.dumps(data, indent=4)) # data = tc.get_agent_by_agent_id(41) # print(json.dumps(data, indent=4)) # data = tc.get_build_type(build_type_id='Teamcity_TriggerFullBackup') # print(json.dumps(data, indent=4)) # data = tc.get_all_builds_by_build_type_id( # build_type_id='Teamcity_TriggerFullBackup', start=0, count=3) # print(json.dumps(data, indent=4))
from pyteamcity import TeamCity import requests import config # Testing teamcity server = TeamCity(server=config.SERVER_HOST, port=config.SERVER_PORT, username=config.SERVER_USER, password=config.SERVER_PASSWORD) print("Current Jobs", server.get_projects()) builds = server.get_builds('MavenProject_Build') print(builds) # Build Job server.trigger_build('MavenProject_Build')