[JIRA] (JENKINS-44823) Set up artifactory server using Groovy

5 views
Skip to first unread message

sarath_racer@yahoo.co.in (JIRA)

unread,
Apr 2, 2020, 11:25:03 AM4/2/20
to jenkinsc...@googlegroups.com
Sarath racer assigned an issue to Sarath racer
 
Jenkins / Bug JENKINS-44823
Set up artifactory server using Groovy
Change By: Sarath racer
Assignee: Eyal Ben Moshe Sarath racer
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo

sarath_racer@yahoo.co.in (JIRA)

unread,
Apr 2, 2020, 11:31:03 AM4/2/20
to jenkinsc...@googlegroups.com
Sarath racer commented on Bug JENKINS-44823
 
Re: Set up artifactory server using Groovy

you can use below script to update or Bypass HTTP server.

/* Bypass the HTTP proxy in Artifactory plugin */
import jenkins.model.* 
import org.jfrog.* 
import org.jfrog.hudson.* 
import org.jfrog.hudson.util.Credentials;
def inst = Jenkins.getInstance()
def desc = inst.getDescriptor("org.jfrog.hudson.ArtifactoryBuilder")
def deployerCredentials = new CredentialsConfig("", "", "")
def sinst = [new ArtifactoryServer( 
"Artifactory", 
"https://demo-test.com/artifactory", 
deployerCredentials,deployerCredentials,
300, 
true ,1,1) ]
desc.setArtifactoryServers(sinst)

sarath_racer@yahoo.co.in (JIRA)

unread,
Apr 2, 2020, 11:33:03 AM4/2/20
to jenkinsc...@googlegroups.com
Sarath racer edited a comment on Bug JENKINS-44823
you can use below script to update or Bypass HTTP server.

based on true or false it will enable/disable the check box (Bypass HTTP Proxy)
{code:java}

/* Bypass the HTTP proxy in Artifactory plugin */
import jenkins.model.*
import org.jfrog.*
import org.jfrog.hudson.*
import org.jfrog.hudson.util.Credentials;
def inst = Jenkins.getInstance()
def desc = inst.getDescriptor("org.jfrog.hudson.ArtifactoryBuilder")
def deployerCredentials = new CredentialsConfig("", "", "")
def sinst = [new ArtifactoryServer(
"Artifactory",
"https://demo-test.com/artifactory",
deployerCredentials,deployerCredentials,
300,
true ,1,1) ]
desc.setArtifactoryServers(sinst)
{code}
Reply all
Reply to author
Forward
0 new messages