This repository was archived by the owner on Feb 12, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 159
Expand file tree
/
Copy pathIBuildConfigs.cs
More file actions
92 lines (82 loc) · 5.14 KB
/
IBuildConfigs.cs
File metadata and controls
92 lines (82 loc) · 5.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
using System;
using System.Collections.Generic;
using System.Xml;
using TeamCitySharp.DomainEntities;
using TeamCitySharp.Locators;
namespace TeamCitySharp.ActionTypes
{
public interface IBuildConfigs
{
List<BuildConfig> All();
BuildConfig ByConfigurationName(string buildConfigName);
BuildConfig ByConfigurationId(string buildConfigId);
BuildConfig ByProjectNameAndConfigurationName(string projectName, string buildConfigName);
BuildConfig ByProjectNameAndConfigurationId(string projectName, string buildConfigId);
BuildConfig ByProjectIdAndConfigurationName(string projectId, string buildConfigName);
BuildConfig ByProjectIdAndConfigurationId(string projectId, string buildConfigId);
List<BuildConfig> ByProjectId(string projectId);
List<BuildConfig> ByProjectName(string projectName);
BuildConfig CreateConfiguration(string projectName, string configurationName);
void SetConfigurationSetting(BuildTypeLocator locator, string settingName, string settingValue);
bool GetConfigurationPauseStatus(BuildTypeLocator locator);
void SetConfigurationPauseStatus(BuildTypeLocator locator, bool isPaused);
void PostRawArtifactDependency(BuildTypeLocator locator, string rawXml);
void PostRawBuildStep(BuildTypeLocator locator, string rawXml);
void PostRawBuildTrigger(BuildTypeLocator locator, string rawXml);
void SetConfigurationParameter(BuildTypeLocator locator, string key, string value);
void PostRawAgentRequirement(BuildTypeLocator locator, string rawXml);
void DeleteBuildStep(BuildTypeLocator locator, string buildStepId);
void DeleteArtifactDependency(BuildTypeLocator locator, string artifactDependencyId);
void DeleteAgentRequirement(BuildTypeLocator locator, string agentRequirementId);
void DeleteParameter(BuildTypeLocator locator, string parameterName);
void DeleteBuildTrigger(BuildTypeLocator locator, string buildTriggerId);
/// <summary>
/// Makes a build type inherit a template.
/// </summary>
/// <param name="locatorBuildType">Locator for the build type which is to be associated with a template.</param>
/// <param name="locatorTemplate">Locator for the template.</param>
void SetBuildTypeTemplate(BuildTypeLocator locatorBuildType, BuildTypeLocator locatorTemplate);
/// <summary>
/// Deletes a snapshot dependency from a build type.
/// </summary>
/// <param name="locator">Locator for the build type.</param>
/// <param name="snapshotDependencyId">The <see cref="SnapshotDependency.Id"/> field value of the dependency to be removed.</param>
void DeleteSnapshotDependency(BuildTypeLocator locator, string snapshotDependencyId);
/// <summary>
/// <para>Adds a snapshot dependency to a build type. Have to post raw XML data which looks like this:</para>
/// <code><![CDATA[
/// <snapshot-dependency type="snapshot_dependency">
/// <properties>
/// <property name="source_buildTypeId" value="id-of-the-target-build-type"/>
/// <property name="run-build-if-dependency-failed" value="true"/>
/// <property name="run-build-on-the-same-agent" value="false"/>
/// <property name="take-started-build-with-same-revisions" value="true"/>
/// <property name="take-successful-builds-only" value="true"/>
/// </properties>
/// </snapshot-dependency>
/// ]]></code>
/// </summary>
void PostRawSnapshotDependency(BuildTypeLocator locator, string rawXml);
/// <summary>
/// <para>Locates a build type by its locator.</para>
/// <para>Essentially, it works either like <see cref="BuildConfigByConfigurationId"/> or <see cref="BuildConfigByConfigurationName"/>, whichever is defined in the locator.</para>
/// </summary>
/// <param name="locator">Locator for the build type.</param>
/// <returns>The build type with all its properties.</returns>
BuildConfig BuildType(BuildTypeLocator locator);
void DeleteConfiguration(BuildTypeLocator locator);
/// <summary>
/// Deletes all of the parameters defined locally on this build type.
/// This spares those parameters inherited from the template, you will still get them when listing all parameters.
/// </summary>
/// <since>8.0</since>
void DeleteAllBuildTypeParameters(BuildTypeLocator locator);
/// <summary>
/// Replaces all of the parameters defined locally on this build type with the new set supplied.
/// Same as calling <see cref="DeleteAllBuildTypeParameters"/> and then <see cref="SetConfigurationParameter"/> for each entry.
/// </summary>
/// <since>8.0</since>
void PutAllBuildTypeParameters(BuildTypeLocator locator, IDictionary<string, string> parameters);
void DownloadConfiguration(BuildTypeLocator locator, Action<string> downloadHandler);
}
}