diff --git a/src/main/webapp/help/ArtifactoryBuilder/help-url.html b/src/main/webapp/help/ArtifactoryBuilder/help-artifactory-url.html
similarity index 100%
rename from src/main/webapp/help/ArtifactoryBuilder/help-url.html
rename to src/main/webapp/help/ArtifactoryBuilder/help-artifactory-url.html
diff --git a/src/main/webapp/help/ArtifactoryBuilder/help-platform-url.html b/src/main/webapp/help/ArtifactoryBuilder/help-platform-url.html
new file mode 100644
index 000000000..e719d0440
--- /dev/null
+++ b/src/main/webapp/help/ArtifactoryBuilder/help-platform-url.html
@@ -0,0 +1,4 @@
+
+ Specify the JFrog platform URL, like http://repo.jfrog.org/ .
+ By default, Artifactory URL will be set to *PlatformUrl*/artifactory if not configured, e.g. http://repo.jfrog.org/artifactory
+
\ No newline at end of file
diff --git a/src/main/webapp/help/ArtifactoryBuilder/help-serverId.html b/src/main/webapp/help/ArtifactoryBuilder/help-serverId.html
index ed9c3ce5a..9cb138472 100644
--- a/src/main/webapp/help/ArtifactoryBuilder/help-serverId.html
+++ b/src/main/webapp/help/ArtifactoryBuilder/help-serverId.html
@@ -1,3 +1,3 @@
- Server unique identifier.
+ Instance unique identifier.
\ No newline at end of file
diff --git a/src/test/java/org/jfrog/hudson/pipeline/integration/CommonITestsPipeline.java b/src/test/java/org/jfrog/hudson/pipeline/integration/CommonITestsPipeline.java
index ed4965301..66653db57 100644
--- a/src/test/java/org/jfrog/hudson/pipeline/integration/CommonITestsPipeline.java
+++ b/src/test/java/org/jfrog/hudson/pipeline/integration/CommonITestsPipeline.java
@@ -191,11 +191,11 @@ void downloadByShaAndBuildNameTest(String buildName) throws Exception {
}
}
- void uploadTest(String buildName) throws Exception {
+ void uploadTest(String buildName, String pipelineName) throws Exception {
Set expectedArtifacts = getTestFilesNamesByLayer(0);
String buildNumber = "3";
- runPipeline("upload", false);
+ runPipeline(pipelineName, false);
try {
expectedArtifacts.forEach(artifactName ->
assertTrue(artifactName + " doesn't exist in Artifactory", isExistInArtifactory(artifactoryClient, getRepoKey(TestRepository.LOCAL_REPO1), artifactName)));
@@ -717,7 +717,7 @@ public void buildTriggerGlobalServerTest() throws Exception {
ArtifactoryTrigger artifactoryTrigger = checkArtifactoryTrigger(run);
// Change something in Artifactory server
- ArtifactoryServer server = RepositoriesUtils.getArtifactoryServer("LOCAL", RepositoriesUtils.getArtifactoryServers());
+ ArtifactoryServer server = RepositoriesUtils.getArtifactoryServer("LOCAL");
server.setConnectionRetry(4);
// Make sure the change took place
diff --git a/src/test/java/org/jfrog/hudson/pipeline/integration/DeclarativeITest.java b/src/test/java/org/jfrog/hudson/pipeline/integration/DeclarativeITest.java
index 33e18e6be..b502bb42f 100644
--- a/src/test/java/org/jfrog/hudson/pipeline/integration/DeclarativeITest.java
+++ b/src/test/java/org/jfrog/hudson/pipeline/integration/DeclarativeITest.java
@@ -48,7 +48,12 @@ public void downloadByShaAndBuildNameTest() throws Exception {
@Test
public void uploadTest() throws Exception {
- super.uploadTest("declarative:upload test");
+ super.uploadTest("declarative:upload test","upload");
+ }
+
+ @Test
+ public void platformUploadTest() throws Exception {
+ super.uploadTest("declarative:upload test","uploadUsingPlatformConfig");
}
@Test
diff --git a/src/test/java/org/jfrog/hudson/pipeline/integration/ITestUtils.java b/src/test/java/org/jfrog/hudson/pipeline/integration/ITestUtils.java
index 63b12d24e..3439114de 100644
--- a/src/test/java/org/jfrog/hudson/pipeline/integration/ITestUtils.java
+++ b/src/test/java/org/jfrog/hudson/pipeline/integration/ITestUtils.java
@@ -333,7 +333,7 @@ static ArtifactoryTrigger checkArtifactoryTrigger(WorkflowRun run) {
assertNotNull(artifactoryTrigger);
ArtifactoryServer server = artifactoryTrigger.getArtifactoryServer();
assertNotNull(server);
- assertTrue(artifactoryTrigger.getArtifactoryServers().contains(server));
+ assertTrue(artifactoryTrigger.getJfrogInstances().stream().anyMatch(s -> s.getArtifactoryServer().getServerId().equals(server.getServerId())));
assertEquals("libs-release-local", artifactoryTrigger.getPaths());
assertEquals("* * * * *", artifactoryTrigger.getSpec());
return artifactoryTrigger;
diff --git a/src/test/java/org/jfrog/hudson/pipeline/integration/PipelineTestBase.java b/src/test/java/org/jfrog/hudson/pipeline/integration/PipelineTestBase.java
index f87e0e166..57f0390f4 100644
--- a/src/test/java/org/jfrog/hudson/pipeline/integration/PipelineTestBase.java
+++ b/src/test/java/org/jfrog/hudson/pipeline/integration/PipelineTestBase.java
@@ -23,6 +23,7 @@
import org.jfrog.hudson.ArtifactoryBuilder;
import org.jfrog.hudson.ArtifactoryServer;
import org.jfrog.hudson.CredentialsConfig;
+import org.jfrog.hudson.JFrogPlatformInstance;
import org.jfrog.hudson.jfpipelines.JFrogPipelinesServer;
import org.jfrog.hudson.jfpipelines.Utils;
import org.junit.*;
@@ -57,7 +58,8 @@ public class PipelineTestBase {
public static TemporaryFolder testTemporaryFolder = new TemporaryFolder();
private static final String SLAVE_LABEL = "TestSlave";
- private static final String ARTIFACTORY_URL = System.getenv("JENKINS_ARTIFACTORY_URL");
+ private static final String PLATFORM_URL = System.getenv("JENKINS_PLATFORM_URL");
+ private static final String ARTIFACTORY_URL = org.apache.commons.lang.StringUtils.removeEnd(PLATFORM_URL, "/") + "/artifactory";
private static final String ARTIFACTORY_USERNAME = System.getenv("JENKINS_ARTIFACTORY_USERNAME");
private static final String ARTIFACTORY_PASSWORD = System.getenv("JENKINS_ARTIFACTORY_PASSWORD");
static final String JENKINS_XRAY_TEST_ENABLE = System.getenv("JENKINS_XRAY_TEST_ENABLE");
@@ -180,10 +182,12 @@ private static void setGlobalConfiguration() {
JFrogPipelinesServer server = new JFrogPipelinesServer("http://127.0.0.1:1080", CredentialsConfig.EMPTY_CREDENTIALS_CONFIG, 300, false, 3);
artifactoryBuilder.setJfrogPipelinesServer(server);
CredentialsConfig cred = new CredentialsConfig("admin", "password", "cred1");
- List artifactoryServers = new ArrayList() {{
- add(new ArtifactoryServer("LOCAL", "http://127.0.0.1:8081/artifactory", cred, cred, 0, false, 3, null));
+ CredentialsConfig platformCred = new CredentialsConfig(ARTIFACTORY_USERNAME, ARTIFACTORY_PASSWORD, null);
+ List artifactoryServers = new ArrayList() {{
+ add(new JFrogPlatformInstance(new ArtifactoryServer("LOCAL", "http://127.0.0.1:8081/artifactory", cred, cred, 0, false, 3, null)));
+ add(new JFrogPlatformInstance("PLATFORM",PLATFORM_URL, ARTIFACTORY_URL, platformCred, platformCred, 0, false, 3, null));
}};
- artifactoryBuilder.setArtifactoryServers(artifactoryServers);
+ artifactoryBuilder.setJfrogInstances(artifactoryServers);
}
/**
@@ -273,8 +277,8 @@ private String readPipeline(String name) throws IOException {
* Verify ARTIFACTORY_URL, ARTIFACTORY_USERNAME and ARTIFACTORY_PASSWORD
*/
private static void verifyEnvironment() {
- if (StringUtils.isBlank(ARTIFACTORY_URL)) {
- throw new IllegalArgumentException("JENKINS_ARTIFACTORY_URL is not set");
+ if (StringUtils.isBlank(PLATFORM_URL)) {
+ throw new IllegalArgumentException("JENKINS_PLATFORM_URL is not set");
}
if (StringUtils.isBlank(ARTIFACTORY_USERNAME)) {
throw new IllegalArgumentException("JENKINS_ARTIFACTORY_USERNAME is not set");
diff --git a/src/test/java/org/jfrog/hudson/pipeline/integration/ScriptedITest.java b/src/test/java/org/jfrog/hudson/pipeline/integration/ScriptedITest.java
index 883bec2ec..745c82c46 100644
--- a/src/test/java/org/jfrog/hudson/pipeline/integration/ScriptedITest.java
+++ b/src/test/java/org/jfrog/hudson/pipeline/integration/ScriptedITest.java
@@ -48,7 +48,12 @@ public void downloadByShaAndBuildNameTest() throws Exception {
@Test
public void uploadTest() throws Exception {
- super.uploadTest("scripted:upload test");
+ super.uploadTest("scripted:upload test", "upload");
+ }
+
+ @Test
+ public void platformUploadTest() throws Exception {
+ super.uploadTest("scripted:platformUpload test", "uploadUsingPlatformConfig");
}
@Test
diff --git a/src/test/java/org/jfrog/hudson/util/converters/ArtifactoryBuilderConverterTest.java b/src/test/java/org/jfrog/hudson/util/converters/ArtifactoryBuilderConverterTest.java
new file mode 100644
index 000000000..d4b1eaa64
--- /dev/null
+++ b/src/test/java/org/jfrog/hudson/util/converters/ArtifactoryBuilderConverterTest.java
@@ -0,0 +1,59 @@
+package org.jfrog.hudson.util.converters;
+
+import hudson.ExtensionList;
+import jenkins.model.Jenkins;
+import org.hamcrest.Matchers;
+import org.jfrog.hudson.ArtifactoryBuilder;
+import org.jfrog.hudson.JFrogPlatformInstance;
+import org.junit.Assert;
+import org.junit.ClassRule;
+import org.junit.Test;
+import org.jvnet.hudson.test.JenkinsRule;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.util.Objects;
+
+public class ArtifactoryBuilderConverterTest {
+
+ private static final String SERVER_ID = "1";
+ private static final String PLATFORM_URL = "https://jfrog.io";
+ private static final String ARTIFACTORY_URL = "https://jfrog.io/artifactory";
+
+ @ClassRule
+ public static JenkinsRule jenkins = new JenkinsRule();
+
+ @Test
+ public void testConvertToArtifactoryServers_pre_3_10_6() throws IOException {
+ ArtifactoryBuilder.DescriptorImpl testBuilder = ExtensionList.lookupSingleton(ArtifactoryBuilder.DescriptorImpl.class);
+ File testFile = new File(getClass().getResource("/converters/config-3.10.6-1.xml").getFile());
+ Path targetPath = new File(Jenkins.get().getRootDir(), ArtifactoryBuilder.class.getName() + ".xml").toPath();
+ Files.copy(testFile.toPath(), targetPath);
+ testBuilder.load();
+ Assert.assertThat(testBuilder.getJfrogInstances(), Matchers.hasSize(2));
+ JFrogPlatformInstance jfrogServer = testBuilder.getJfrogInstances().get(0);
+ Assert.assertEquals(SERVER_ID, Objects.requireNonNull(jfrogServer.getId()));
+ Assert.assertEquals(SERVER_ID, Objects.requireNonNull(jfrogServer.getArtifactoryServer().getServerId()));
+ Assert.assertEquals(ARTIFACTORY_URL, Objects.requireNonNull(jfrogServer.getArtifactoryServer().getArtifactoryUrl()));
+ Assert.assertNull(jfrogServer.getUrl());
+ Files.delete(targetPath);
+ }
+
+ @Test
+ public void testConvertToArtifactoryServers_after_3_10_6() throws IOException {
+ ArtifactoryBuilder.DescriptorImpl testBuilder = ExtensionList.lookupSingleton(ArtifactoryBuilder.DescriptorImpl.class);
+ File testFile = new File(getClass().getResource("/converters/config-3.10.6-3.xml").getFile());
+ Path targetPath = new File(Jenkins.get().getRootDir(), ArtifactoryBuilder.class.getName() + ".xml").toPath();
+ Files.copy(testFile.toPath(), targetPath);
+ testBuilder.load();
+ Assert.assertThat(testBuilder.getJfrogInstances(), Matchers.hasSize(1));
+ JFrogPlatformInstance jfrogServer = testBuilder.getJfrogInstances().get(0);
+ Assert.assertEquals(SERVER_ID, Objects.requireNonNull(jfrogServer.getId()));
+ Assert.assertEquals(SERVER_ID, Objects.requireNonNull(jfrogServer.getArtifactoryServer().getServerId()));
+ Assert.assertEquals(ARTIFACTORY_URL, Objects.requireNonNull(jfrogServer.getArtifactoryServer().getArtifactoryUrl()));
+ Assert.assertEquals(PLATFORM_URL, Objects.requireNonNull(jfrogServer.getUrl()));
+ Files.delete(targetPath);
+ }
+}
diff --git a/src/test/java/org/jfrog/hudson/util/converters/CredentialsConfigConverterTest.java b/src/test/java/org/jfrog/hudson/util/converters/CredentialsConfigConverterTest.java
index 77137d872..16e405f4a 100644
--- a/src/test/java/org/jfrog/hudson/util/converters/CredentialsConfigConverterTest.java
+++ b/src/test/java/org/jfrog/hudson/util/converters/CredentialsConfigConverterTest.java
@@ -24,16 +24,16 @@ public class CredentialsConfigConverterTest {
@ClassRule
public static JenkinsRule jenkins = new JenkinsRule();
-
+
@Test
public void testConvertToSecret_pre_3_6_0() throws IOException {
ArtifactoryBuilder.DescriptorImpl testBuilder = ExtensionList.lookupSingleton(ArtifactoryBuilder.DescriptorImpl.class);
-
+
File testFile = new File(getClass().getResource("/converters/config-3.5.0.xml").getFile());
Files.copy(testFile.toPath(), new File(Jenkins.get().getRootDir(), ArtifactoryBuilder.class.getName() + ".xml").toPath());
testBuilder.load();
- Assert.assertThat(testBuilder.getArtifactoryServers(), Matchers.hasSize(1));
- ArtifactoryServer artifactoryServer = testBuilder.getArtifactoryServers().get(0);
+ Assert.assertThat(testBuilder.getJfrogInstances(), Matchers.hasSize(1));
+ ArtifactoryServer artifactoryServer = testBuilder.getJfrogInstances().get(0).getArtifactoryServer();
Assert.assertEquals(DEPLOYER_USERNAME, Objects.requireNonNull(artifactoryServer.getDeployerCredentialsConfig().getUsername()));
Assert.assertEquals(DEPLOYER_PASSWORD, Objects.requireNonNull(artifactoryServer.getDeployerCredentialsConfig().getPassword()).getPlainText());
Assert.assertEquals(RESOLVER_USERNAME, Objects.requireNonNull(artifactoryServer.getResolverCredentialsConfig().getUsername()));
diff --git a/src/test/resources/converters/config-3.10.6-1.xml b/src/test/resources/converters/config-3.10.6-1.xml
new file mode 100644
index 000000000..8263148c1
--- /dev/null
+++ b/src/test/resources/converters/config-3.10.6-1.xml
@@ -0,0 +1,49 @@
+
+
+ true
+
+
+ https://jfrog.io/artifactory
+ 1
+ 300
+ false
+ 3
+ 3
+
+ {JGVjcmV0RGVwbG95ZXI=}
+ {JGVjcmV0RGVwbG95ZXI=}
+ eco1
+ false
+ false
+
+
+
+ https://io/artifactory
+ 2
+ 300
+ false
+ 3
+ 3
+
+ {JGVjcmV0RGVwbG95ZXI=}
+ {JGVjcmV0RGVwbG95ZXI=}
+ eco2
+ false
+ false
+
+
+
+
+
+ {JGVjcmV0RGVwbG95ZXI=}
+ {JGVjcmV0RGVwbG95ZXI=}
+
+ false
+ true
+
+ 3
+
+ false
+ 300
+
+
\ No newline at end of file
diff --git a/src/test/resources/converters/config-3.10.6-3.xml b/src/test/resources/converters/config-3.10.6-3.xml
new file mode 100644
index 000000000..359016fd4
--- /dev/null
+++ b/src/test/resources/converters/config-3.10.6-3.xml
@@ -0,0 +1,61 @@
+
+
+ true
+
+
+ https://jfrog.io
+ 1
+
+ https://jfrog.io/artifactory
+ 1
+ 300
+ false
+ 3
+ 3
+
+ {JGVjcmV0RGVwbG95ZXI=}
+ {JGVjcmV0RGVwbG95ZXI=}
+ eco3
+ false
+ false
+
+
+
+
+
+
+
+ https://jfrog.io/artifactory
+ oe
+ 300
+ false
+ 3
+ 3
+
+ {JGVjcmV0RGVwbG95ZXI=}
+ {JGVjcmV0RGVwbG95ZXI=}
+ eco3
+ false
+ false
+
+
+
+ false
+ false
+
+
+
+
+
+ {JGVjcmV0RGVwbG95ZXI=}
+ {JGVjcmV0RGVwbG95ZXI=}
+
+ false
+ true
+
+ 3
+
+ false
+ 300
+
+
\ No newline at end of file
diff --git a/src/test/resources/integration/pipelines/declarative/buildAppend.pipeline b/src/test/resources/integration/pipelines/declarative/buildAppend.pipeline
index d8a330327..4c6157b15 100644
--- a/src/test/resources/integration/pipelines/declarative/buildAppend.pipeline
+++ b/src/test/resources/integration/pipelines/declarative/buildAppend.pipeline
@@ -10,7 +10,7 @@ node("TestSlave") {
stage "Configuration"
rtServer(
id: serverId,
- url: "${env.JENKINS_ARTIFACTORY_URL}",
+ url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory',
username: "${env.JENKINS_ARTIFACTORY_USERNAME}",
password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
)
diff --git a/src/test/resources/integration/pipelines/declarative/collectIssues.pipeline b/src/test/resources/integration/pipelines/declarative/collectIssues.pipeline
index 0e370a7bc..4bb71de51 100644
--- a/src/test/resources/integration/pipelines/declarative/collectIssues.pipeline
+++ b/src/test/resources/integration/pipelines/declarative/collectIssues.pipeline
@@ -8,7 +8,7 @@ node("TestSlave") {
stage "Configuration"
rtServer(
id: serverId,
- url: "${env.JENKINS_ARTIFACTORY_URL}",
+ url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory',
username: "${env.JENKINS_ARTIFACTORY_USERNAME}",
password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
)
diff --git a/src/test/resources/integration/pipelines/declarative/conan.pipeline b/src/test/resources/integration/pipelines/declarative/conan.pipeline
index 069d47468..55fb4ca6f 100644
--- a/src/test/resources/integration/pipelines/declarative/conan.pipeline
+++ b/src/test/resources/integration/pipelines/declarative/conan.pipeline
@@ -12,7 +12,7 @@ node("TestSlave") {
stage "Configure Artifactory"
rtServer(
id: serverId,
- url: "${env.JENKINS_ARTIFACTORY_URL}",
+ url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory',
username: "${env.JENKINS_ARTIFACTORY_USERNAME}",
password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
)
diff --git a/src/test/resources/integration/pipelines/declarative/deleteProps.pipeline b/src/test/resources/integration/pipelines/declarative/deleteProps.pipeline
index 83f03f1a6..8eb6dde89 100644
--- a/src/test/resources/integration/pipelines/declarative/deleteProps.pipeline
+++ b/src/test/resources/integration/pipelines/declarative/deleteProps.pipeline
@@ -8,7 +8,7 @@ node("TestSlave") {
stage "Configuration"
rtServer(
id: serverId,
- url: "${env.JENKINS_ARTIFACTORY_URL}",
+ url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory',
username: "${env.JENKINS_ARTIFACTORY_USERNAME}",
password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
)
diff --git a/src/test/resources/integration/pipelines/declarative/dockerPull.pipeline b/src/test/resources/integration/pipelines/declarative/dockerPull.pipeline
index a05c53582..8d593a348 100644
--- a/src/test/resources/integration/pipelines/declarative/dockerPull.pipeline
+++ b/src/test/resources/integration/pipelines/declarative/dockerPull.pipeline
@@ -14,7 +14,7 @@ node("TestSlave") {
stage "rtserverconfig"
rtServer(
id: serverId,
- url: "${env.JENKINS_ARTIFACTORY_URL}",
+ url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory',
username: "${env.JENKINS_ARTIFACTORY_USERNAME}",
password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
)
diff --git a/src/test/resources/integration/pipelines/declarative/dockerPush.pipeline b/src/test/resources/integration/pipelines/declarative/dockerPush.pipeline
index 15890fea9..ca8ee8070 100644
--- a/src/test/resources/integration/pipelines/declarative/dockerPush.pipeline
+++ b/src/test/resources/integration/pipelines/declarative/dockerPush.pipeline
@@ -14,7 +14,7 @@ node("TestSlave") {
stage "rtserverconfig"
rtServer(
id: serverId,
- url: "${env.JENKINS_ARTIFACTORY_URL}",
+ url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory',
username: "${env.JENKINS_ARTIFACTORY_USERNAME}",
password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
)
diff --git a/src/test/resources/integration/pipelines/declarative/dotnet.pipeline b/src/test/resources/integration/pipelines/declarative/dotnet.pipeline
index def4aaacd..f95faa4ba 100644
--- a/src/test/resources/integration/pipelines/declarative/dotnet.pipeline
+++ b/src/test/resources/integration/pipelines/declarative/dotnet.pipeline
@@ -12,7 +12,7 @@ node("TestSlave") {
stage "Configure Artifactory"
rtServer(
id: serverId,
- url: "${env.JENKINS_ARTIFACTORY_URL}",
+ url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory',
username: "${env.JENKINS_ARTIFACTORY_USERNAME}",
password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
)
diff --git a/src/test/resources/integration/pipelines/declarative/downloadByAql.pipeline b/src/test/resources/integration/pipelines/declarative/downloadByAql.pipeline
index 99df27510..a365bae7b 100644
--- a/src/test/resources/integration/pipelines/declarative/downloadByAql.pipeline
+++ b/src/test/resources/integration/pipelines/declarative/downloadByAql.pipeline
@@ -8,7 +8,7 @@ node("TestSlave") {
stage "Configuration"
rtServer(
id: serverId,
- url: "${env.JENKINS_ARTIFACTORY_URL}",
+ url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory',
username: "${env.JENKINS_ARTIFACTORY_USERNAME}",
password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
)
diff --git a/src/test/resources/integration/pipelines/declarative/downloadByBuildOnly.pipeline b/src/test/resources/integration/pipelines/declarative/downloadByBuildOnly.pipeline
index c3b5261d1..b8abde893 100644
--- a/src/test/resources/integration/pipelines/declarative/downloadByBuildOnly.pipeline
+++ b/src/test/resources/integration/pipelines/declarative/downloadByBuildOnly.pipeline
@@ -6,7 +6,7 @@ node("TestSlave") {
stage "Configuration"
rtServer(
id: serverId,
- url: "${env.JENKINS_ARTIFACTORY_URL}",
+ url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory',
username: "${env.JENKINS_ARTIFACTORY_USERNAME}",
password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
)
diff --git a/src/test/resources/integration/pipelines/declarative/downloadByPattern.pipeline b/src/test/resources/integration/pipelines/declarative/downloadByPattern.pipeline
index 3c5dbfcfa..3215637b0 100644
--- a/src/test/resources/integration/pipelines/declarative/downloadByPattern.pipeline
+++ b/src/test/resources/integration/pipelines/declarative/downloadByPattern.pipeline
@@ -8,7 +8,7 @@ node("TestSlave") {
stage "Configuration"
rtServer(
id: serverId,
- url: "${env.JENKINS_ARTIFACTORY_URL}",
+ url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory',
username: "${env.JENKINS_ARTIFACTORY_USERNAME}",
password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
)
diff --git a/src/test/resources/integration/pipelines/declarative/downloadByPatternAndBuild.pipeline b/src/test/resources/integration/pipelines/declarative/downloadByPatternAndBuild.pipeline
index dc5015d20..102dc7dfc 100644
--- a/src/test/resources/integration/pipelines/declarative/downloadByPatternAndBuild.pipeline
+++ b/src/test/resources/integration/pipelines/declarative/downloadByPatternAndBuild.pipeline
@@ -6,7 +6,7 @@ node("TestSlave") {
stage "Configuration"
rtServer(
id: serverId,
- url: "${env.JENKINS_ARTIFACTORY_URL}",
+ url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory',
username: "${env.JENKINS_ARTIFACTORY_USERNAME}",
password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
)
diff --git a/src/test/resources/integration/pipelines/declarative/downloadByShaAndBuild.pipeline b/src/test/resources/integration/pipelines/declarative/downloadByShaAndBuild.pipeline
index 0fe7a4419..99a5879bc 100644
--- a/src/test/resources/integration/pipelines/declarative/downloadByShaAndBuild.pipeline
+++ b/src/test/resources/integration/pipelines/declarative/downloadByShaAndBuild.pipeline
@@ -6,7 +6,7 @@ node("TestSlave") {
stage "Configuration"
rtServer(
id: serverId,
- url: "${env.JENKINS_ARTIFACTORY_URL}",
+ url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory',
username: "${env.JENKINS_ARTIFACTORY_USERNAME}",
password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
)
diff --git a/src/test/resources/integration/pipelines/declarative/downloadByShaAndBuildName.pipeline b/src/test/resources/integration/pipelines/declarative/downloadByShaAndBuildName.pipeline
index 4e35e29e9..51f86c6a4 100644
--- a/src/test/resources/integration/pipelines/declarative/downloadByShaAndBuildName.pipeline
+++ b/src/test/resources/integration/pipelines/declarative/downloadByShaAndBuildName.pipeline
@@ -6,7 +6,7 @@ node("TestSlave") {
stage "Configuration"
rtServer(
id: serverId,
- url: "${env.JENKINS_ARTIFACTORY_URL}",
+ url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory',
username: "${env.JENKINS_ARTIFACTORY_USERNAME}",
password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
)
diff --git a/src/test/resources/integration/pipelines/declarative/downloadFailNoOp.pipeline b/src/test/resources/integration/pipelines/declarative/downloadFailNoOp.pipeline
index d19577de8..c8f890341 100644
--- a/src/test/resources/integration/pipelines/declarative/downloadFailNoOp.pipeline
+++ b/src/test/resources/integration/pipelines/declarative/downloadFailNoOp.pipeline
@@ -6,7 +6,7 @@ node("TestSlave") {
stage "Configuration"
rtServer(
id: serverId,
- url: "${env.JENKINS_ARTIFACTORY_URL}",
+ url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory',
username: "${env.JENKINS_ARTIFACTORY_USERNAME}",
password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
)
diff --git a/src/test/resources/integration/pipelines/declarative/downloadNonExistingBuild.pipeline b/src/test/resources/integration/pipelines/declarative/downloadNonExistingBuild.pipeline
index d4c9c2852..f473ebd1b 100644
--- a/src/test/resources/integration/pipelines/declarative/downloadNonExistingBuild.pipeline
+++ b/src/test/resources/integration/pipelines/declarative/downloadNonExistingBuild.pipeline
@@ -8,7 +8,7 @@ node("TestSlave") {
stage "Configuration"
rtServer(
id: serverId,
- url: "${env.JENKINS_ARTIFACTORY_URL}",
+ url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory',
username: "${env.JENKINS_ARTIFACTORY_USERNAME}",
password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
)
diff --git a/src/test/resources/integration/pipelines/declarative/go.pipeline b/src/test/resources/integration/pipelines/declarative/go.pipeline
index dafea97b3..6b06ced4f 100644
--- a/src/test/resources/integration/pipelines/declarative/go.pipeline
+++ b/src/test/resources/integration/pipelines/declarative/go.pipeline
@@ -12,7 +12,7 @@ node("TestSlave") {
stage "Configure Artifactory"
rtServer(
id: serverId,
- url: "${env.JENKINS_ARTIFACTORY_URL}",
+ url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory',
username: "${env.JENKINS_ARTIFACTORY_USERNAME}",
password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
)
diff --git a/src/test/resources/integration/pipelines/declarative/goCustomModuleName.pipeline b/src/test/resources/integration/pipelines/declarative/goCustomModuleName.pipeline
index 7067148f3..79af40e88 100644
--- a/src/test/resources/integration/pipelines/declarative/goCustomModuleName.pipeline
+++ b/src/test/resources/integration/pipelines/declarative/goCustomModuleName.pipeline
@@ -12,7 +12,7 @@ node("TestSlave") {
stage "Configure Artifactory"
rtServer(
id: serverId,
- url: "${env.JENKINS_ARTIFACTORY_URL}",
+ url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory',
username: "${env.JENKINS_ARTIFACTORY_USERNAME}",
password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
)
diff --git a/src/test/resources/integration/pipelines/declarative/gradle.pipeline b/src/test/resources/integration/pipelines/declarative/gradle.pipeline
index cb4cf4248..b90da721d 100644
--- a/src/test/resources/integration/pipelines/declarative/gradle.pipeline
+++ b/src/test/resources/integration/pipelines/declarative/gradle.pipeline
@@ -14,7 +14,7 @@ node("TestSlave") {
stage "Configure Artifactory"
rtServer(
id: serverId,
- url: "${env.JENKINS_ARTIFACTORY_URL}",
+ url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory',
username: "${env.JENKINS_ARTIFACTORY_USERNAME}",
password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
)
diff --git a/src/test/resources/integration/pipelines/declarative/gradleCiServer.pipeline b/src/test/resources/integration/pipelines/declarative/gradleCiServer.pipeline
index 88c238f89..126189397 100644
--- a/src/test/resources/integration/pipelines/declarative/gradleCiServer.pipeline
+++ b/src/test/resources/integration/pipelines/declarative/gradleCiServer.pipeline
@@ -12,7 +12,7 @@ node("TestSlave") {
stage "Configure Artifactory"
rtServer(
id: serverId,
- url: "${env.JENKINS_ARTIFACTORY_URL}",
+ url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory',
username: "${env.JENKINS_ARTIFACTORY_USERNAME}",
password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
)
diff --git a/src/test/resources/integration/pipelines/declarative/gradleCiServerPublication.pipeline b/src/test/resources/integration/pipelines/declarative/gradleCiServerPublication.pipeline
index 48ab9602a..11a6f9577 100644
--- a/src/test/resources/integration/pipelines/declarative/gradleCiServerPublication.pipeline
+++ b/src/test/resources/integration/pipelines/declarative/gradleCiServerPublication.pipeline
@@ -12,7 +12,7 @@ node("TestSlave") {
stage "Configure Artifactory"
rtServer(
id: serverId,
- url: "${env.JENKINS_ARTIFACTORY_URL}",
+ url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory',
username: "${env.JENKINS_ARTIFACTORY_USERNAME}",
password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
)
diff --git a/src/test/resources/integration/pipelines/declarative/maven.pipeline b/src/test/resources/integration/pipelines/declarative/maven.pipeline
index abc973678..295250b59 100644
--- a/src/test/resources/integration/pipelines/declarative/maven.pipeline
+++ b/src/test/resources/integration/pipelines/declarative/maven.pipeline
@@ -14,7 +14,7 @@ node("TestSlave") {
stage "Configure Artifactory"
rtServer(
id: serverId,
- url: "${env.JENKINS_ARTIFACTORY_URL}",
+ url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory',
username: "${env.JENKINS_ARTIFACTORY_USERNAME}",
password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
)
diff --git a/src/test/resources/integration/pipelines/declarative/npmCi.pipeline b/src/test/resources/integration/pipelines/declarative/npmCi.pipeline
index 8cbe84941..c653978c1 100644
--- a/src/test/resources/integration/pipelines/declarative/npmCi.pipeline
+++ b/src/test/resources/integration/pipelines/declarative/npmCi.pipeline
@@ -12,7 +12,7 @@ node("TestSlave") {
stage "Configure Artifactory"
rtServer(
id: serverId,
- url: "${env.JENKINS_ARTIFACTORY_URL}",
+ url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory',
username: "${env.JENKINS_ARTIFACTORY_USERNAME}",
password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
)
diff --git a/src/test/resources/integration/pipelines/declarative/npmCustomModuleName.pipeline b/src/test/resources/integration/pipelines/declarative/npmCustomModuleName.pipeline
index 695e92fea..bbaea13d3 100644
--- a/src/test/resources/integration/pipelines/declarative/npmCustomModuleName.pipeline
+++ b/src/test/resources/integration/pipelines/declarative/npmCustomModuleName.pipeline
@@ -12,7 +12,7 @@ node("TestSlave") {
stage "Configure Artifactory"
rtServer(
id: serverId,
- url: "${env.JENKINS_ARTIFACTORY_URL}",
+ url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory',
username: "${env.JENKINS_ARTIFACTORY_USERNAME}",
password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
)
diff --git a/src/test/resources/integration/pipelines/declarative/npmInstall.pipeline b/src/test/resources/integration/pipelines/declarative/npmInstall.pipeline
index 511cea0aa..f50ec35b1 100644
--- a/src/test/resources/integration/pipelines/declarative/npmInstall.pipeline
+++ b/src/test/resources/integration/pipelines/declarative/npmInstall.pipeline
@@ -12,7 +12,7 @@ node("TestSlave") {
stage "Configure Artifactory"
rtServer(
id: serverId,
- url: "${env.JENKINS_ARTIFACTORY_URL}",
+ url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory',
username: "${env.JENKINS_ARTIFACTORY_USERNAME}",
password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
)
diff --git a/src/test/resources/integration/pipelines/declarative/nuget.pipeline b/src/test/resources/integration/pipelines/declarative/nuget.pipeline
index bf373fcea..c95cb8b52 100644
--- a/src/test/resources/integration/pipelines/declarative/nuget.pipeline
+++ b/src/test/resources/integration/pipelines/declarative/nuget.pipeline
@@ -12,7 +12,7 @@ node("TestSlave") {
stage "Configure Artifactory"
rtServer(
id: serverId,
- url: "${env.JENKINS_ARTIFACTORY_URL}",
+ url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory',
username: "${env.JENKINS_ARTIFACTORY_USERNAME}",
password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
)
diff --git a/src/test/resources/integration/pipelines/declarative/pip.pipeline b/src/test/resources/integration/pipelines/declarative/pip.pipeline
index 1fa87cc65..93e25f4e9 100644
--- a/src/test/resources/integration/pipelines/declarative/pip.pipeline
+++ b/src/test/resources/integration/pipelines/declarative/pip.pipeline
@@ -12,7 +12,7 @@ node("TestSlave") {
stage "Configure Artifactory"
rtServer(
id: serverId,
- url: "${env.JENKINS_ARTIFACTORY_URL}",
+ url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory',
username: "${env.JENKINS_ARTIFACTORY_USERNAME}",
password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
)
diff --git a/src/test/resources/integration/pipelines/declarative/promote.pipeline b/src/test/resources/integration/pipelines/declarative/promote.pipeline
index 12ed124ce..fba39b1b9 100644
--- a/src/test/resources/integration/pipelines/declarative/promote.pipeline
+++ b/src/test/resources/integration/pipelines/declarative/promote.pipeline
@@ -8,7 +8,7 @@ node("TestSlave") {
stage "Configuration"
rtServer(
id: serverId,
- url: "${env.JENKINS_ARTIFACTORY_URL}",
+ url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory',
username: "${env.JENKINS_ARTIFACTORY_USERNAME}",
password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
)
diff --git a/src/test/resources/integration/pipelines/declarative/setProps.pipeline b/src/test/resources/integration/pipelines/declarative/setProps.pipeline
index f80bf2f6b..2156e29bb 100644
--- a/src/test/resources/integration/pipelines/declarative/setProps.pipeline
+++ b/src/test/resources/integration/pipelines/declarative/setProps.pipeline
@@ -8,7 +8,7 @@ node("TestSlave") {
stage "Configuration"
rtServer(
id: serverId,
- url: "${env.JENKINS_ARTIFACTORY_URL}",
+ url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory',
username: "${env.JENKINS_ARTIFACTORY_USERNAME}",
password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
)
diff --git a/src/test/resources/integration/pipelines/declarative/upload.pipeline b/src/test/resources/integration/pipelines/declarative/upload.pipeline
index 87e4f9770..93cffb606 100644
--- a/src/test/resources/integration/pipelines/declarative/upload.pipeline
+++ b/src/test/resources/integration/pipelines/declarative/upload.pipeline
@@ -8,7 +8,7 @@ node("TestSlave") {
stage "Configuration"
rtServer(
id: serverId,
- url: "${env.JENKINS_ARTIFACTORY_URL}",
+ url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory',
username: "${env.JENKINS_ARTIFACTORY_USERNAME}",
password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
)
diff --git a/src/test/resources/integration/pipelines/declarative/uploadDownloadCustomModuleName.pipeline b/src/test/resources/integration/pipelines/declarative/uploadDownloadCustomModuleName.pipeline
index ef180e7cb..81ef06363 100644
--- a/src/test/resources/integration/pipelines/declarative/uploadDownloadCustomModuleName.pipeline
+++ b/src/test/resources/integration/pipelines/declarative/uploadDownloadCustomModuleName.pipeline
@@ -8,7 +8,7 @@ node("TestSlave") {
stage "Configuration"
rtServer(
id: serverId,
- url: "${env.JENKINS_ARTIFACTORY_URL}",
+ url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory',
username: "${env.JENKINS_ARTIFACTORY_USERNAME}",
password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
)
diff --git a/src/test/resources/integration/pipelines/declarative/uploadFailNoOp.pipeline b/src/test/resources/integration/pipelines/declarative/uploadFailNoOp.pipeline
index 727093fc0..bdb30efea 100644
--- a/src/test/resources/integration/pipelines/declarative/uploadFailNoOp.pipeline
+++ b/src/test/resources/integration/pipelines/declarative/uploadFailNoOp.pipeline
@@ -6,7 +6,7 @@ node("TestSlave") {
stage "Configuration"
rtServer(
id: serverId,
- url: "${env.JENKINS_ARTIFACTORY_URL}",
+ url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory',
username: "${env.JENKINS_ARTIFACTORY_USERNAME}",
password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
)
diff --git a/src/test/resources/integration/pipelines/declarative/uploadUsingPlatformConfig.pipeline b/src/test/resources/integration/pipelines/declarative/uploadUsingPlatformConfig.pipeline
new file mode 100644
index 000000000..bef5b9cd1
--- /dev/null
+++ b/src/test/resources/integration/pipelines/declarative/uploadUsingPlatformConfig.pipeline
@@ -0,0 +1,32 @@
+package integration.pipelines.declarative
+
+node("TestSlave") {
+ def serverId = "PLATFORM"
+ def buildName = "declarative:upload test"
+ def buildNumber = "3"
+
+ stage "Configuration"
+
+ stage "Upload"
+ rtUpload(
+ serverId: serverId,
+ buildName: buildName,
+ buildNumber: buildNumber,
+ spec: """{
+ "files": [
+ {
+ "pattern": "${FILES_DIR}",
+ "target": "${LOCAL_REPO1}/",
+ "recursive": "false"
+ }
+ ]
+ }"""
+ )
+
+ stage "Publish Build Info"
+ rtPublishBuildInfo(
+ serverId: serverId,
+ buildName: buildName,
+ buildNumber: buildNumber
+ )
+}
diff --git a/src/test/resources/integration/pipelines/declarative/uploadWithProps.pipeline b/src/test/resources/integration/pipelines/declarative/uploadWithProps.pipeline
index 88435787e..552db672e 100644
--- a/src/test/resources/integration/pipelines/declarative/uploadWithProps.pipeline
+++ b/src/test/resources/integration/pipelines/declarative/uploadWithProps.pipeline
@@ -8,7 +8,7 @@ node("TestSlave") {
stage "Configuration"
rtServer(
id: serverId,
- url: "${env.JENKINS_ARTIFACTORY_URL}",
+ url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory',
username: "${env.JENKINS_ARTIFACTORY_USERNAME}",
password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
)
diff --git a/src/test/resources/integration/pipelines/declarative/xrayScanFailBuildFalse.pipeline b/src/test/resources/integration/pipelines/declarative/xrayScanFailBuildFalse.pipeline
index 600b596bf..2675c5d2d 100644
--- a/src/test/resources/integration/pipelines/declarative/xrayScanFailBuildFalse.pipeline
+++ b/src/test/resources/integration/pipelines/declarative/xrayScanFailBuildFalse.pipeline
@@ -12,7 +12,7 @@ node("TestSlave") {
stage "Configure Artifactory"
rtServer(
id: serverId,
- url: "${env.JENKINS_ARTIFACTORY_URL}",
+ url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory',
username: "${env.JENKINS_ARTIFACTORY_USERNAME}",
password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
)
diff --git a/src/test/resources/integration/pipelines/declarative/xrayScanFailBuildTrue.pipeline b/src/test/resources/integration/pipelines/declarative/xrayScanFailBuildTrue.pipeline
index 68deadeee..00d11a1ec 100644
--- a/src/test/resources/integration/pipelines/declarative/xrayScanFailBuildTrue.pipeline
+++ b/src/test/resources/integration/pipelines/declarative/xrayScanFailBuildTrue.pipeline
@@ -12,7 +12,7 @@ node("TestSlave") {
stage "Configure Artifactory"
rtServer(
id: serverId,
- url: "${env.JENKINS_ARTIFACTORY_URL}",
+ url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory',
username: "${env.JENKINS_ARTIFACTORY_USERNAME}",
password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
)
diff --git a/src/test/resources/integration/pipelines/scripted/append.pipeline b/src/test/resources/integration/pipelines/scripted/append.pipeline
index 57e846429..825e98422 100644
--- a/src/test/resources/integration/pipelines/scripted/append.pipeline
+++ b/src/test/resources/integration/pipelines/scripted/append.pipeline
@@ -13,7 +13,7 @@ node {
buildInfoUpload.number = "13"
stage "Configuration"
- def rtServer = Artifactory.newServer url: "${env.JENKINS_ARTIFACTORY_URL}", username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
+ def rtServer = Artifactory.newServer url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory', username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
// Collect issues
stage "Collect Issues"
diff --git a/src/test/resources/integration/pipelines/scripted/buildAppend.pipeline b/src/test/resources/integration/pipelines/scripted/buildAppend.pipeline
index 788265364..22d23484a 100644
--- a/src/test/resources/integration/pipelines/scripted/buildAppend.pipeline
+++ b/src/test/resources/integration/pipelines/scripted/buildAppend.pipeline
@@ -2,7 +2,7 @@ package integration.pipelines.scripted
node("TestSlave") {
stage "Configuration"
- def rtServer = Artifactory.newServer url: "${env.JENKINS_ARTIFACTORY_URL}", username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
+ def rtServer = Artifactory.newServer url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory', username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
stage "Create 1st Build Info"
def buildInfo1 = Artifactory.newBuildInfo()
diff --git a/src/test/resources/integration/pipelines/scripted/collectIssues.pipeline b/src/test/resources/integration/pipelines/scripted/collectIssues.pipeline
index 3cdc0c46a..cb7280e2d 100644
--- a/src/test/resources/integration/pipelines/scripted/collectIssues.pipeline
+++ b/src/test/resources/integration/pipelines/scripted/collectIssues.pipeline
@@ -4,7 +4,7 @@ node("TestSlave") {
// Move to the scope of the test's git
dir("${TEST_TEMP_FOLDER}") {
stage "Configuration"
- def rtServer = Artifactory.newServer url: "${env.JENKINS_ARTIFACTORY_URL}", username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
+ def rtServer = Artifactory.newServer url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory', username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
// Create build info
def buildInfo = Artifactory.newBuildInfo()
diff --git a/src/test/resources/integration/pipelines/scripted/conan.pipeline b/src/test/resources/integration/pipelines/scripted/conan.pipeline
index 5a763bd7d..7f1a76ba3 100644
--- a/src/test/resources/integration/pipelines/scripted/conan.pipeline
+++ b/src/test/resources/integration/pipelines/scripted/conan.pipeline
@@ -2,7 +2,7 @@ package integration.pipelines.scripted
node("TestSlave") {
stage "Configure Artifactory"
- def rtServer = Artifactory.newServer url: "${env.JENKINS_ARTIFACTORY_URL}", username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
+ def rtServer = Artifactory.newServer url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory', username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
def buildInfo = Artifactory.newBuildInfo()
buildInfo.name = "scripted:conan test"
buildInfo.number = "7"
diff --git a/src/test/resources/integration/pipelines/scripted/deleteProps.pipeline b/src/test/resources/integration/pipelines/scripted/deleteProps.pipeline
index 5ef8b3f38..b181a6f59 100644
--- a/src/test/resources/integration/pipelines/scripted/deleteProps.pipeline
+++ b/src/test/resources/integration/pipelines/scripted/deleteProps.pipeline
@@ -2,7 +2,7 @@ package integration.pipelines.scripted
node("TestSlave") {
stage "Configuration"
- def rtServer = Artifactory.newServer url: "${env.JENKINS_ARTIFACTORY_URL}", username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
+ def rtServer = Artifactory.newServer url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory', username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
def buildInfo = Artifactory.newBuildInfo()
buildInfo.name = "scripted:deleteProps test"
buildInfo.number = "3"
diff --git a/src/test/resources/integration/pipelines/scripted/dockerPull.pipeline b/src/test/resources/integration/pipelines/scripted/dockerPull.pipeline
index f4dc7b893..4f35310eb 100644
--- a/src/test/resources/integration/pipelines/scripted/dockerPull.pipeline
+++ b/src/test/resources/integration/pipelines/scripted/dockerPull.pipeline
@@ -7,7 +7,7 @@ node("TestSlave") {
}
def imageName = domainName + "hello-world:latest"
def sourceRepo = "${env.JENKINS_ARTIFACTORY_DOCKER_PULL_REPO}"
- def rtServer = Artifactory.newServer url: "${env.JENKINS_ARTIFACTORY_URL}", username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
+ def rtServer = Artifactory.newServer url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory', username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
stage "dockerPull"
def rtDocker = Artifactory.docker (rtServer, "${env.JENKINS_ARTIFACTORY_DOCKER_HOST}")
diff --git a/src/test/resources/integration/pipelines/scripted/dockerPush.pipeline b/src/test/resources/integration/pipelines/scripted/dockerPush.pipeline
index d1ec3c03e..c4cd71307 100644
--- a/src/test/resources/integration/pipelines/scripted/dockerPush.pipeline
+++ b/src/test/resources/integration/pipelines/scripted/dockerPush.pipeline
@@ -7,7 +7,7 @@ node("TestSlave") {
}
def imageName = domainName + "jfrog_artifactory_jenkins_tests:2"
def targetRepo = "${env.JENKINS_ARTIFACTORY_DOCKER_PUSH_REPO}"
- def rtServer = Artifactory.newServer url: "${env.JENKINS_ARTIFACTORY_URL}", username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
+ def rtServer = Artifactory.newServer url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory', username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
stage "dockerPush"
def rtDocker = Artifactory.docker (rtServer, "${env.JENKINS_ARTIFACTORY_DOCKER_HOST}")
diff --git a/src/test/resources/integration/pipelines/scripted/dotnet.pipeline b/src/test/resources/integration/pipelines/scripted/dotnet.pipeline
index 8b5b3992c..a308e9eb0 100644
--- a/src/test/resources/integration/pipelines/scripted/dotnet.pipeline
+++ b/src/test/resources/integration/pipelines/scripted/dotnet.pipeline
@@ -6,7 +6,7 @@ import java.nio.file.Paths
node("TestSlave") {
stage "Configure Artifactory"
- def rtServer = Artifactory.newServer url: "${env.JENKINS_ARTIFACTORY_URL}", username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
+ def rtServer = Artifactory.newServer url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory', username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
def buildInfo = Artifactory.newBuildInfo()
buildInfo.name = "scripted:dotnet test"
buildInfo.number = "13"
diff --git a/src/test/resources/integration/pipelines/scripted/downloadByAql.pipeline b/src/test/resources/integration/pipelines/scripted/downloadByAql.pipeline
index f1b3be500..cf011f749 100644
--- a/src/test/resources/integration/pipelines/scripted/downloadByAql.pipeline
+++ b/src/test/resources/integration/pipelines/scripted/downloadByAql.pipeline
@@ -2,7 +2,7 @@ package integration.pipelines.scripted
node("TestSlave") {
stage "Configuration"
- def rtServer = Artifactory.newServer url: "${env.JENKINS_ARTIFACTORY_URL}", username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
+ def rtServer = Artifactory.newServer url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory', username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
def buildInfo = Artifactory.newBuildInfo()
buildInfo.name = "scripted:downloadByAql test"
buildInfo.number = "3"
diff --git a/src/test/resources/integration/pipelines/scripted/downloadByBuildOnly.pipeline b/src/test/resources/integration/pipelines/scripted/downloadByBuildOnly.pipeline
index 75d723ef2..3c5481731 100644
--- a/src/test/resources/integration/pipelines/scripted/downloadByBuildOnly.pipeline
+++ b/src/test/resources/integration/pipelines/scripted/downloadByBuildOnly.pipeline
@@ -2,7 +2,7 @@ package integration.pipelines.scripted
node("TestSlave") {
stage "Configuration"
- def rtServer = Artifactory.newServer url: "${env.JENKINS_ARTIFACTORY_URL}", username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
+ def rtServer = Artifactory.newServer url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory', username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
// First upload files with buildNumber = 3
def buildInfo = Artifactory.newBuildInfo()
diff --git a/src/test/resources/integration/pipelines/scripted/downloadByPattern.pipeline b/src/test/resources/integration/pipelines/scripted/downloadByPattern.pipeline
index da036be15..86593fee2 100644
--- a/src/test/resources/integration/pipelines/scripted/downloadByPattern.pipeline
+++ b/src/test/resources/integration/pipelines/scripted/downloadByPattern.pipeline
@@ -2,7 +2,7 @@ package integration.pipelines.scripted
node("TestSlave") {
stage "Configuration"
- def rtServer = Artifactory.newServer url: "${env.JENKINS_ARTIFACTORY_URL}", username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
+ def rtServer = Artifactory.newServer url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory', username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
def buildInfo = Artifactory.newBuildInfo()
buildInfo.name = "scripted:downloadByPattern test"
buildInfo.number = "3"
diff --git a/src/test/resources/integration/pipelines/scripted/downloadByPatternAndBuild.pipeline b/src/test/resources/integration/pipelines/scripted/downloadByPatternAndBuild.pipeline
index 31dc9d974..a97ebbe1e 100644
--- a/src/test/resources/integration/pipelines/scripted/downloadByPatternAndBuild.pipeline
+++ b/src/test/resources/integration/pipelines/scripted/downloadByPatternAndBuild.pipeline
@@ -2,7 +2,7 @@ package integration.pipelines.scripted
node("TestSlave") {
stage "Configuration"
- def rtServer = Artifactory.newServer url: "${env.JENKINS_ARTIFACTORY_URL}", username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
+ def rtServer = Artifactory.newServer url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory', username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
// First upload files with buildNumber = 3
def buildInfo = Artifactory.newBuildInfo()
diff --git a/src/test/resources/integration/pipelines/scripted/downloadByShaAndBuild.pipeline b/src/test/resources/integration/pipelines/scripted/downloadByShaAndBuild.pipeline
index 69a289548..d11223916 100644
--- a/src/test/resources/integration/pipelines/scripted/downloadByShaAndBuild.pipeline
+++ b/src/test/resources/integration/pipelines/scripted/downloadByShaAndBuild.pipeline
@@ -2,7 +2,7 @@ package integration.pipelines.scripted
node("TestSlave") {
stage "Configuration"
- def rtServer = Artifactory.newServer url: "${env.JENKINS_ARTIFACTORY_URL}", username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
+ def rtServer = Artifactory.newServer url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory', username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
// First upload files with buildNumber = 3
def buildInfo = Artifactory.newBuildInfo()
diff --git a/src/test/resources/integration/pipelines/scripted/downloadByShaAndBuildName.pipeline b/src/test/resources/integration/pipelines/scripted/downloadByShaAndBuildName.pipeline
index 2d0c0e644..4f81db28f 100644
--- a/src/test/resources/integration/pipelines/scripted/downloadByShaAndBuildName.pipeline
+++ b/src/test/resources/integration/pipelines/scripted/downloadByShaAndBuildName.pipeline
@@ -2,7 +2,7 @@ package integration.pipelines.scripted
node("TestSlave") {
stage "Configuration"
- def rtServer = Artifactory.newServer url: "${env.JENKINS_ARTIFACTORY_URL}", username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
+ def rtServer = Artifactory.newServer url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory', username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
// First upload files with buildNumber = 3
def buildInfo = Artifactory.newBuildInfo()
diff --git a/src/test/resources/integration/pipelines/scripted/downloadFailNoOp.pipeline b/src/test/resources/integration/pipelines/scripted/downloadFailNoOp.pipeline
index 1fd312a84..69bd930ba 100644
--- a/src/test/resources/integration/pipelines/scripted/downloadFailNoOp.pipeline
+++ b/src/test/resources/integration/pipelines/scripted/downloadFailNoOp.pipeline
@@ -2,7 +2,7 @@ package integration.pipelines.scripted
node("TestSlave") {
stage "Configuration"
- def rtServer = Artifactory.newServer url: "${env.JENKINS_ARTIFACTORY_URL}", username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
+ def rtServer = Artifactory.newServer url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory', username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
stage "Download"
def downloadSpec = """{
diff --git a/src/test/resources/integration/pipelines/scripted/downloadNonExistingBuild.pipeline b/src/test/resources/integration/pipelines/scripted/downloadNonExistingBuild.pipeline
index 151e9507b..f26e097d6 100644
--- a/src/test/resources/integration/pipelines/scripted/downloadNonExistingBuild.pipeline
+++ b/src/test/resources/integration/pipelines/scripted/downloadNonExistingBuild.pipeline
@@ -2,7 +2,7 @@ package integration.pipelines.scripted
node("TestSlave") {
stage "Configuration"
- def rtServer = Artifactory.newServer url: "${env.JENKINS_ARTIFACTORY_URL}", username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
+ def rtServer = Artifactory.newServer url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory', username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
// First upload files and publish build
def buildInfo = Artifactory.newBuildInfo()
diff --git a/src/test/resources/integration/pipelines/scripted/go.pipeline b/src/test/resources/integration/pipelines/scripted/go.pipeline
index ed00f5a00..e802a48e4 100644
--- a/src/test/resources/integration/pipelines/scripted/go.pipeline
+++ b/src/test/resources/integration/pipelines/scripted/go.pipeline
@@ -6,7 +6,7 @@ import java.nio.file.Paths
node("TestSlave") {
stage "Configure Artifactory"
- def rtServer = Artifactory.newServer url: "${env.JENKINS_ARTIFACTORY_URL}", username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
+ def rtServer = Artifactory.newServer url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory', username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
def buildInfo = Artifactory.newBuildInfo()
buildInfo.name = "scripted:go test"
buildInfo.number = "7"
diff --git a/src/test/resources/integration/pipelines/scripted/goCustomModuleName.pipeline b/src/test/resources/integration/pipelines/scripted/goCustomModuleName.pipeline
index e124d7092..1faa00e28 100644
--- a/src/test/resources/integration/pipelines/scripted/goCustomModuleName.pipeline
+++ b/src/test/resources/integration/pipelines/scripted/goCustomModuleName.pipeline
@@ -6,7 +6,7 @@ import java.nio.file.Paths
node("TestSlave") {
stage "Configure Artifactory"
- def rtServer = Artifactory.newServer url: "${env.JENKINS_ARTIFACTORY_URL}", username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
+ def rtServer = Artifactory.newServer url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory', username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
def buildInfo = Artifactory.newBuildInfo()
buildInfo.name = "scripted:goCustomModuleName test"
buildInfo.number = "7"
diff --git a/src/test/resources/integration/pipelines/scripted/gradle.pipeline b/src/test/resources/integration/pipelines/scripted/gradle.pipeline
index 317306c2a..8c7a1d877 100644
--- a/src/test/resources/integration/pipelines/scripted/gradle.pipeline
+++ b/src/test/resources/integration/pipelines/scripted/gradle.pipeline
@@ -8,7 +8,7 @@ env.DONT_COLLECT='FOO'
env.COLLECT='BAR'
node("TestSlave") {
stage "Configure Artifactory"
- def rtServer = Artifactory.newServer url: "${env.JENKINS_ARTIFACTORY_URL}", username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
+ def rtServer = Artifactory.newServer url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory', username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
def buildInfo = Artifactory.newBuildInfo()
buildInfo.env.capture = true
buildInfo.env.filter.addExclude("DONT_COLLECT")
diff --git a/src/test/resources/integration/pipelines/scripted/gradleCiServer.pipeline b/src/test/resources/integration/pipelines/scripted/gradleCiServer.pipeline
index c0ab7919f..17512ef84 100644
--- a/src/test/resources/integration/pipelines/scripted/gradleCiServer.pipeline
+++ b/src/test/resources/integration/pipelines/scripted/gradleCiServer.pipeline
@@ -6,7 +6,7 @@ import java.nio.file.Paths
node("TestSlave") {
stage "Configure Artifactory"
- def rtServer = Artifactory.newServer url: "${env.JENKINS_ARTIFACTORY_URL}", username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
+ def rtServer = Artifactory.newServer url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory', username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
def buildInfo = Artifactory.newBuildInfo()
buildInfo.name = "scripted:gradle-ci test"
buildInfo.number = "3"
diff --git a/src/test/resources/integration/pipelines/scripted/gradleCiServerPublication.pipeline b/src/test/resources/integration/pipelines/scripted/gradleCiServerPublication.pipeline
index 28163e034..7e6b35b99 100644
--- a/src/test/resources/integration/pipelines/scripted/gradleCiServerPublication.pipeline
+++ b/src/test/resources/integration/pipelines/scripted/gradleCiServerPublication.pipeline
@@ -6,7 +6,7 @@ import java.nio.file.Paths
node("TestSlave") {
stage "Configure Artifactory"
- def rtServer = Artifactory.newServer url: "${env.JENKINS_ARTIFACTORY_URL}", username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
+ def rtServer = Artifactory.newServer url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory', username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
def buildInfo = Artifactory.newBuildInfo()
buildInfo.name = "scripted:gradle-ci-publication test"
buildInfo.number = "3"
diff --git a/src/test/resources/integration/pipelines/scripted/maven.pipeline b/src/test/resources/integration/pipelines/scripted/maven.pipeline
index efc4590be..ad738cd3e 100644
--- a/src/test/resources/integration/pipelines/scripted/maven.pipeline
+++ b/src/test/resources/integration/pipelines/scripted/maven.pipeline
@@ -8,7 +8,7 @@ env.DONT_COLLECT='FOO'
env.COLLECT='BAR'
node("TestSlave") {
stage "Configure Artifactory"
- def rtServer = Artifactory.newServer url: "${env.JENKINS_ARTIFACTORY_URL}", username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
+ def rtServer = Artifactory.newServer url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory', username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
def buildInfo = Artifactory.newBuildInfo()
buildInfo.env.capture = true
buildInfo.env.filter.addExclude("DONT_COLLECT")
diff --git a/src/test/resources/integration/pipelines/scripted/npmCi.pipeline b/src/test/resources/integration/pipelines/scripted/npmCi.pipeline
index 7132ff110..729a7ac89 100644
--- a/src/test/resources/integration/pipelines/scripted/npmCi.pipeline
+++ b/src/test/resources/integration/pipelines/scripted/npmCi.pipeline
@@ -6,7 +6,7 @@ import java.nio.file.Paths
node("TestSlave") {
stage "Configure Artifactory"
- def rtServer = Artifactory.newServer url: "${env.JENKINS_ARTIFACTORY_URL}", username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
+ def rtServer = Artifactory.newServer url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory', username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
def buildInfo = Artifactory.newBuildInfo()
buildInfo.name = "scripted:npm ci test"
buildInfo.number = "4"
diff --git a/src/test/resources/integration/pipelines/scripted/npmCustomModuleName.pipeline b/src/test/resources/integration/pipelines/scripted/npmCustomModuleName.pipeline
index 55ab59d1a..a4e58e96d 100644
--- a/src/test/resources/integration/pipelines/scripted/npmCustomModuleName.pipeline
+++ b/src/test/resources/integration/pipelines/scripted/npmCustomModuleName.pipeline
@@ -6,7 +6,7 @@ import java.nio.file.Paths
node("TestSlave") {
stage "Configure Artifactory"
- def rtServer = Artifactory.newServer url: "${env.JENKINS_ARTIFACTORY_URL}", username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
+ def rtServer = Artifactory.newServer url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory', username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
def buildInfo = Artifactory.newBuildInfo()
buildInfo.name = "scripted:npmCustomModuleName test"
buildInfo.number = "3"
diff --git a/src/test/resources/integration/pipelines/scripted/npmInstall.pipeline b/src/test/resources/integration/pipelines/scripted/npmInstall.pipeline
index e1e55a0a9..d6bbcac96 100644
--- a/src/test/resources/integration/pipelines/scripted/npmInstall.pipeline
+++ b/src/test/resources/integration/pipelines/scripted/npmInstall.pipeline
@@ -6,7 +6,7 @@ import java.nio.file.Paths
node("TestSlave") {
stage "Configure Artifactory"
- def rtServer = Artifactory.newServer url: "${env.JENKINS_ARTIFACTORY_URL}", username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
+ def rtServer = Artifactory.newServer url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory', username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
def buildInfo = Artifactory.newBuildInfo()
buildInfo.name = "scripted:npm install test"
buildInfo.number = "3"
diff --git a/src/test/resources/integration/pipelines/scripted/nuget.pipeline b/src/test/resources/integration/pipelines/scripted/nuget.pipeline
index 859ca484e..c60bedb97 100644
--- a/src/test/resources/integration/pipelines/scripted/nuget.pipeline
+++ b/src/test/resources/integration/pipelines/scripted/nuget.pipeline
@@ -6,7 +6,7 @@ import java.nio.file.Paths
node("TestSlave") {
stage "Configure Artifactory"
- def rtServer = Artifactory.newServer url: "${env.JENKINS_ARTIFACTORY_URL}", username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
+ def rtServer = Artifactory.newServer url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory', username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
def buildInfo = Artifactory.newBuildInfo()
buildInfo.name = "scripted:nuget test"
buildInfo.number = "12"
diff --git a/src/test/resources/integration/pipelines/scripted/pip.pipeline b/src/test/resources/integration/pipelines/scripted/pip.pipeline
index 2d5dd31c9..53e3bc0ff 100644
--- a/src/test/resources/integration/pipelines/scripted/pip.pipeline
+++ b/src/test/resources/integration/pipelines/scripted/pip.pipeline
@@ -6,7 +6,7 @@ import java.nio.file.Paths
node("TestSlave") {
stage "Configure Artifactory"
- def rtServer = Artifactory.newServer url: "${env.JENKINS_ARTIFACTORY_URL}", username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
+ def rtServer = Artifactory.newServer url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory', username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
def buildInfo = Artifactory.newBuildInfo()
buildInfo.name = "scripted:pip test"
buildInfo.number = "4"
diff --git a/src/test/resources/integration/pipelines/scripted/promote.pipeline b/src/test/resources/integration/pipelines/scripted/promote.pipeline
index d4050eca1..1a1008375 100644
--- a/src/test/resources/integration/pipelines/scripted/promote.pipeline
+++ b/src/test/resources/integration/pipelines/scripted/promote.pipeline
@@ -2,7 +2,7 @@ package integration.pipelines.scripted
node("TestSlave") {
stage "Configuration"
- def rtServer = Artifactory.newServer url: "${env.JENKINS_ARTIFACTORY_URL}", username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
+ def rtServer = Artifactory.newServer url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory', username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
def buildInfo = Artifactory.newBuildInfo()
buildInfo.name = "scripted:promotion test"
buildInfo.number = "4"
diff --git a/src/test/resources/integration/pipelines/scripted/setProps.pipeline b/src/test/resources/integration/pipelines/scripted/setProps.pipeline
index 132f5664d..be23ceda7 100644
--- a/src/test/resources/integration/pipelines/scripted/setProps.pipeline
+++ b/src/test/resources/integration/pipelines/scripted/setProps.pipeline
@@ -2,7 +2,7 @@ package integration.pipelines.scripted
node("TestSlave") {
stage "Configuration"
- def rtServer = Artifactory.newServer url: "${env.JENKINS_ARTIFACTORY_URL}", username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
+ def rtServer = Artifactory.newServer url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory', username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
def buildInfo = Artifactory.newBuildInfo()
buildInfo.name = "scripted:setProps test"
buildInfo.number = "3"
diff --git a/src/test/resources/integration/pipelines/scripted/upload.pipeline b/src/test/resources/integration/pipelines/scripted/upload.pipeline
index c2e0a17b8..ea2a4da63 100644
--- a/src/test/resources/integration/pipelines/scripted/upload.pipeline
+++ b/src/test/resources/integration/pipelines/scripted/upload.pipeline
@@ -2,7 +2,7 @@ package integration.pipelines.scripted
node("TestSlave") {
stage "Configuration"
- def rtServer = Artifactory.newServer url: "${env.JENKINS_ARTIFACTORY_URL}", username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
+ def rtServer = Artifactory.newServer url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory', username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
def buildInfo = Artifactory.newBuildInfo()
buildInfo.name = "scripted:upload test"
buildInfo.number = "3"
diff --git a/src/test/resources/integration/pipelines/scripted/uploadDownloadCustomModuleName.pipeline b/src/test/resources/integration/pipelines/scripted/uploadDownloadCustomModuleName.pipeline
index 8c41feb8d..6c7d6f4fc 100644
--- a/src/test/resources/integration/pipelines/scripted/uploadDownloadCustomModuleName.pipeline
+++ b/src/test/resources/integration/pipelines/scripted/uploadDownloadCustomModuleName.pipeline
@@ -2,7 +2,7 @@ package integration.pipelines.scripted
node("TestSlave") {
stage "Configuration"
- def rtServer = Artifactory.newServer url: "${env.JENKINS_ARTIFACTORY_URL}", username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
+ def rtServer = Artifactory.newServer url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory', username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
def buildInfo = Artifactory.newBuildInfo()
buildInfo.name = "scripted:uploadDownloadCustomModuleName test"
buildInfo.number = "3"
diff --git a/src/test/resources/integration/pipelines/scripted/uploadFailNoOp.pipeline b/src/test/resources/integration/pipelines/scripted/uploadFailNoOp.pipeline
index 86d751ba1..a3c6f502b 100644
--- a/src/test/resources/integration/pipelines/scripted/uploadFailNoOp.pipeline
+++ b/src/test/resources/integration/pipelines/scripted/uploadFailNoOp.pipeline
@@ -2,7 +2,7 @@ package integration.pipelines.scripted
node("TestSlave") {
stage "Configuration"
- def rtServer = Artifactory.newServer url: "${env.JENKINS_ARTIFACTORY_URL}", username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
+ def rtServer = Artifactory.newServer url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory', username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
stage "Upload"
def uploadSpec = """{
diff --git a/src/test/resources/integration/pipelines/scripted/uploadUsingPlatformConfig.pipeline b/src/test/resources/integration/pipelines/scripted/uploadUsingPlatformConfig.pipeline
new file mode 100644
index 000000000..d2739f59d
--- /dev/null
+++ b/src/test/resources/integration/pipelines/scripted/uploadUsingPlatformConfig.pipeline
@@ -0,0 +1,24 @@
+package integration.pipelines.scripted
+
+node("TestSlave") {
+ stage "Configuration"
+ def artifactory = Jfrog.instance('PLATFORM').artifactory()
+ def buildInfo = Artifactory.newBuildInfo()
+ buildInfo.name = "scripted:platformUpload test"
+ buildInfo.number = "3"
+
+ stage "Upload"
+ def uploadSpec = """{
+ "files": [
+ {
+ "pattern": "${FILES_DIR}",
+ "target": "${LOCAL_REPO1}/",
+ "recursive": "false"
+ }
+ ]
+ }"""
+ artifactory.upload spec: uploadSpec, buildInfo: buildInfo
+
+ stage "Publish Build Info"
+ artifactory.publishBuildInfo buildInfo
+}
diff --git a/src/test/resources/integration/pipelines/scripted/uploadWithProps.pipeline b/src/test/resources/integration/pipelines/scripted/uploadWithProps.pipeline
index 11ff3f388..5e314559e 100644
--- a/src/test/resources/integration/pipelines/scripted/uploadWithProps.pipeline
+++ b/src/test/resources/integration/pipelines/scripted/uploadWithProps.pipeline
@@ -2,7 +2,7 @@ package integration.pipelines.scripted
node("TestSlave") {
stage "Configuration"
- def rtServer = Artifactory.newServer url: "${env.JENKINS_ARTIFACTORY_URL}", username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
+ def rtServer = Artifactory.newServer url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory', username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
def buildInfo = Artifactory.newBuildInfo()
buildInfo.name = "scripted:upload with props test"
buildInfo.number = "3"
diff --git a/src/test/resources/integration/pipelines/scripted/xrayScanFailBuildFalse.pipeline b/src/test/resources/integration/pipelines/scripted/xrayScanFailBuildFalse.pipeline
index ef67e5668..b94f0d0a2 100644
--- a/src/test/resources/integration/pipelines/scripted/xrayScanFailBuildFalse.pipeline
+++ b/src/test/resources/integration/pipelines/scripted/xrayScanFailBuildFalse.pipeline
@@ -6,7 +6,7 @@ import java.nio.file.Paths
node("TestSlave") {
stage "Configure Artifactory"
- def rtServer = Artifactory.newServer url: "${env.JENKINS_ARTIFACTORY_URL}", username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
+ def rtServer = Artifactory.newServer url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory', username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
def buildInfo = Artifactory.newBuildInfo()
buildInfo.name = "scripted:xrayScanFailBuildFalse test"
buildInfo.number = "3"
diff --git a/src/test/resources/integration/pipelines/scripted/xrayScanFailBuildTrue.pipeline b/src/test/resources/integration/pipelines/scripted/xrayScanFailBuildTrue.pipeline
index e99fa1844..aa8a2a4c5 100644
--- a/src/test/resources/integration/pipelines/scripted/xrayScanFailBuildTrue.pipeline
+++ b/src/test/resources/integration/pipelines/scripted/xrayScanFailBuildTrue.pipeline
@@ -6,7 +6,7 @@ import java.nio.file.Paths
node("TestSlave") {
stage "Configure Artifactory"
- def rtServer = Artifactory.newServer url: "${env.JENKINS_ARTIFACTORY_URL}", username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
+ def rtServer = Artifactory.newServer url: "${env.JENKINS_PLATFORM_URL}".replaceFirst('/*$', '')+'/artifactory', username: "${env.JENKINS_ARTIFACTORY_USERNAME}", password: "${env.JENKINS_ARTIFACTORY_PASSWORD}"
def buildInfo = Artifactory.newBuildInfo()
buildInfo.name = "scripted:xrayScanFailBuildTrue test"
buildInfo.number = "3"