使用 C# 在 rally 中创建 BuildDefinition
Creating the BuildDefinition in rally using C#
我正在尝试创建构建定义。我试过如下一个。
但我确实认为下面的代码不会创建 buildDefinition。就像它在代码中要求 BuildDefinitionRef "newBuild["BuildDefinition"] = ;"我不知道到底应该放哪个参考。
RallyRestApi RestApi = new RallyRestApi("_abcd","https://rally1.rallydev.com");
String workspaceRef = "/workspace/27154845988";
String projectRef = "/project/48152113168";
DynamicJsonObject newBuild = new DynamicJsonObject();
newBuild["Workspace"] = workspaceRef;
newBuild["Duration"] = 0.75;
newBuild["Message"] = "Master 4683 Success";
//newBuild["CreationDate"] = "";
newBuild["Status"] = "FAILURE";
newBuild["Number"] = "4683";
// newBuild["Uri"] = "http://jenkins-build:8080/hudson/view/master/job/master-deploy/4683/";
// newBuild["BuildDefinition"] = ;
如果有人首先知道如何创建 BuildDefinition。
BuildDefinition 应该是 WSAPI 中的可创建类型。您只需要先创建它,然后在创建 Build 对象时只需传递已创建的 BuildDefinition 的引用:
newBuild["BuildDefinition"] = "/builddefinition/12345";
我正在尝试创建构建定义。我试过如下一个。 但我确实认为下面的代码不会创建 buildDefinition。就像它在代码中要求 BuildDefinitionRef "newBuild["BuildDefinition"] = ;"我不知道到底应该放哪个参考。
RallyRestApi RestApi = new RallyRestApi("_abcd","https://rally1.rallydev.com");
String workspaceRef = "/workspace/27154845988";
String projectRef = "/project/48152113168";
DynamicJsonObject newBuild = new DynamicJsonObject();
newBuild["Workspace"] = workspaceRef;
newBuild["Duration"] = 0.75;
newBuild["Message"] = "Master 4683 Success";
//newBuild["CreationDate"] = "";
newBuild["Status"] = "FAILURE";
newBuild["Number"] = "4683";
// newBuild["Uri"] = "http://jenkins-build:8080/hudson/view/master/job/master-deploy/4683/";
// newBuild["BuildDefinition"] = ;
如果有人首先知道如何创建 BuildDefinition。
BuildDefinition 应该是 WSAPI 中的可创建类型。您只需要先创建它,然后在创建 Build 对象时只需传递已创建的 BuildDefinition 的引用:
newBuild["BuildDefinition"] = "/builddefinition/12345";