を考慮すると、あなたは、動的に展開するためのターゲットリポジトリを制御するための要件を持っています
1)Artifactory Jenkinsプラグインのpipeline supportを使用してください。あなたが定義することができますArtifactory Maven pluginを使用)
rtMaven.deployer.addProperty("status", "in-qa").addProperty("compatibility", "1", "2", "3")
2:
def rtMaven = Artifactory.newMavenBuild()
rtMaven.resolver server: server, releaseRepo: 'libs-release', snapshotRepo: 'libs-snapshot'
rtMaven.deployer server: server, releaseRepo: 'libs-release-local', snapshotRepo: 'libs-snapshot-local'
とプロパティを追加します:パイプラインDSLを使用すると、動的にあなたが例えば、Maven解像度/展開に使用しているリポジトリを制御することができます解決/展開とプロパティをpom.xmlから取得します。また、environment variables or system propertiesを利用して動的な方法でそれらを定義することもできます。たとえば :
<build>
<plugins>
...
<plugin>
<groupId>org.jfrog.buildinfo</groupId>
<artifactId>artifactory-maven-plugin</artifactId>
<version>2.6.1</version>
<inherited>false</inherited>
<executions>
<execution>
<id>build-info</id>
<goals>
<goal>publish</goal>
</goals>
<configuration>
<deployProperties>
<build.name>{{BUILD_NAME}}</build.name>
</deployProperties>
<publisher>
<contextUrl>https://artifactory.mycompany.com</contextUrl>
<username>deployer</username>
<password>******</password>
<repoKey>{{RELEASE_REPO}}</repoKey>
<snapshotRepoKey>{{SNAPSHOT_REPO}}</snapshotRepoKey>
</publisher>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
3)すでに@viniciusarturによって答えとして、あなたは別のアーティファクトリポジトリは、私の視点が異なるartifactoryサーバ音から意味をなす性質を有する
を定義するために、リポジトリURLにmatrix parametersを使用することができます違う...? – khmarbaise
私のケースでは、私は異なるアーティファクトリポジトリとアーティファクトサーバの両方を持つことができます。したがって、プロジェクトのpom.xmlによれば、成果物は異なるサーバーに配備できます。 –
なぜJenkins Artifactoryプラグインを使用しないのですか? https://wiki.jenkins-ci.org/display/JENKINS/Artifactory+Plugin – Ariel