TeamCity REST API:使用自定义工件依赖性触发构建



我正在尝试使用TeamCity 8.1 REST API触发自定义构建(请参阅https://confluence.jetbrains.com/display/display/tcd8/rest papipi papipipi #restapi#restapi-triggeringabuild)。我的构建运行正常,我可以在没有问题的情况下指定自定义分支和属性。我的目标现在是指定我要触发的构建的自定义工件依赖。

我在创建构建时收到的响应类似于以下内容:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
  <build taskId="1234" buildTypeId="buildConfig1" state="queued" ...>
  <buildType id="buildConfig1" name="Build Config Name"  ... />
  ...
  <properties count="1">
    <property name="testParam" value="Test 123" own="true" />
  </properties>
  <custom-artifact-dependencies />
</build>

此回复中的"自定义依赖性依赖性"标签使我相信有一种指定自定义依赖性的方法,但是我在Teamcity文档,TeamCity论坛或Google中尚未找到任何内容可以完成。我在这里忽略了一些事情,还是另一种实现这一目标的方式?


将以下内容添加到"构建"标签的孩子中会导致"伪像依赖性"类型'trifact_depentency'。错误:

<custom-artifact-dependencies>
 <artifact-dependency buildId="5432" buildTypeId="parentBuildConfig"/>
</custom-artifact-dependencies>

服务器可能会使我的意图与用于设置和查看伪影依赖关系的构建配置API(例如http://teamcity:8111/httpauth/httpauth/app/reast/rest/buildtypes/&buildTypes/buildTypees/buildtypelocator&gt;/artifact依赖性依赖性依赖性依赖性依赖性依赖性

我也有同样的问题这对我有用:

    <build>
      <triggeringOptions queueAtTop="true"/>
      <buildType id="buildConfig1"/>
      <custom-artifact-dependencies count="1">
       <artifact-dependency id="0" type="artifact_dependency">
        <properties>
         <property name="pathRules" value="Artifacts_1.zip
Artifacts_2.zip
Artifacts_To_Unzip.zip!/**
"/>
         <property name="cleanDestinationDirectory" value="true"/>
         <property name="revisionName" value="buildId"/>
         <property name="revisionValue" value="5432"/>
        </properties>
        <source-buildType id="parentBuildConfig" />
       </artifact-dependency>
      </custom-artifact-dependencies>
    </build>

如果" ParentBuildConfig"构建仍在运行

最新更新