使用C#在集会中创建BuildDefinition

时间:2016-03-30 07:56:50

标签: c# rally agile

我试图创建一个构建定义。我尝试如下。 但我确实认为下面的代码不会创建buildDefinition。就像它在代码“newBuild [”BuildDefinition“] =;中要求BuildDefinitionRef一样我无法知道究竟是什么引用了什么。

     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。

1 个答案:

答案 0 :(得分:0)

BuildDefinition应该是WSAPI中的可创建类型。你只需要先创建它,然后当你创建Build对象时,只需传递创建的BuildDefinition的ref:

<plugin>
   <groupId>org.apache.maven.plugins</groupId>
   <artifactId>maven-surefire-plugin</artifactId>
   <configuration>
       <redirectTestOutputToFile>true</redirectTestOutputToFile>
   </configuration>
</plugin>