Skip to content

Commit 0bd7cb8

Browse files
authored
Merge pull request #53 from mtughan/JENKINS-73398
JENKINS-73398: Take snapshot of credentials
2 parents 61d9ae4 + bc8acbe commit 0bd7cb8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/io/jenkins/plugins/artifactory_artifacts/ArtifactoryClient.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package io.jenkins.plugins.artifactory_artifacts;
22

3+
import com.cloudbees.plugins.credentials.CredentialsProvider;
34
import com.cloudbees.plugins.credentials.common.UsernamePasswordCredentials;
45
import edu.umd.cs.findbugs.annotations.NonNull;
56
import java.io.IOException;
@@ -253,7 +254,7 @@ public static final class ArtifactoryConfig implements Serializable {
253254
public ArtifactoryConfig(String serverUrl, String repository, UsernamePasswordCredentials credentials) {
254255
this.serverUrl = serverUrl;
255256
this.repository = repository;
256-
this.credentials = credentials;
257+
this.credentials = CredentialsProvider.snapshot(UsernamePasswordCredentials.class, credentials);
257258
}
258259

259260
public String getServerUrl() {

0 commit comments

Comments
 (0)