Search in sources :

Example 11 with ArtifactoryManagerBuilder

use of org.jfrog.build.extractor.clientConfiguration.ArtifactoryManagerBuilder in project build-info by JFrogDev.

the class PipInstall method main.

/**
 * Allow running pip install using a new Java process.
 * Used only in Jenkins to allow running 'rtPip install' in a docker container.
 */
public static void main(String[] ignored) {
    try {
        ArtifactoryClientConfiguration clientConfiguration = createArtifactoryClientConfiguration();
        ArtifactoryManagerBuilder artifactoryManagerBuilder = new ArtifactoryManagerBuilder().setClientConfiguration(clientConfiguration, clientConfiguration.resolver);
        ArtifactoryClientConfiguration.PackageManagerHandler pipHandler = clientConfiguration.packageManagerHandler;
        PipInstall pipInstall = new PipInstall(artifactoryManagerBuilder, clientConfiguration.resolver.getRepoKey(), pipHandler.getArgs(), clientConfiguration.getLog(), Paths.get(pipHandler.getPath() != null ? pipHandler.getPath() : "."), clientConfiguration.getAllProperties(), pipHandler.getModule(), clientConfiguration.resolver.getUsername(), clientConfiguration.resolver.getPassword(), clientConfiguration.pipHandler.getEnvActivation());
        pipInstall.executeAndSaveBuildInfo(clientConfiguration);
    } catch (RuntimeException e) {
        ExceptionUtils.printRootCauseStackTrace(e, System.out);
        System.exit(1);
    }
}
Also used : PackageManagerUtils.createArtifactoryClientConfiguration(org.jfrog.build.extractor.packageManager.PackageManagerUtils.createArtifactoryClientConfiguration) ArtifactoryClientConfiguration(org.jfrog.build.extractor.clientConfiguration.ArtifactoryClientConfiguration) ArtifactoryManagerBuilder(org.jfrog.build.extractor.clientConfiguration.ArtifactoryManagerBuilder)

Example 12 with ArtifactoryManagerBuilder

use of org.jfrog.build.extractor.clientConfiguration.ArtifactoryManagerBuilder in project build-info by JFrogDev.

the class GoExtractorTest method setUp.

@BeforeClass
private void setUp() throws IOException {
    artifactoryManagerBuilder = new ArtifactoryManagerBuilder().setServerUrl(getArtifactoryUrl()).setUsername(getUsername()).setPassword(getAdminToken()).setLog(getLog());
    deployTestDependencies(Project.QUOTE, Project.SAMPLER, Project.TEXT);
}
Also used : ArtifactoryManagerBuilder(org.jfrog.build.extractor.clientConfiguration.ArtifactoryManagerBuilder) BeforeClass(org.testng.annotations.BeforeClass)

Aggregations

ArtifactoryManagerBuilder (org.jfrog.build.extractor.clientConfiguration.ArtifactoryManagerBuilder)12 ArtifactoryClientConfiguration (org.jfrog.build.extractor.clientConfiguration.ArtifactoryClientConfiguration)9 PackageManagerUtils.createArtifactoryClientConfiguration (org.jfrog.build.extractor.packageManager.PackageManagerUtils.createArtifactoryClientConfiguration)9 BeforeClass (org.testng.annotations.BeforeClass)3 IOException (java.io.IOException)2 DependenciesDownloaderHelper (org.jfrog.build.extractor.clientConfiguration.util.DependenciesDownloaderHelper)1 PipDriver (org.jfrog.build.extractor.pip.PipDriver)1