Search in sources :

Example 6 with ArtifactoryManagerBuilder

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

the class GoPublish method main.

/**
 * Allow publishing Go packages using a new Java process.
 * Used only in Jenkins to allow running 'rtGo publish' in a docker container.
 */
public static void main(String[] ignored) {
    try {
        ArtifactoryClientConfiguration clientConfiguration = createArtifactoryClientConfiguration();
        ArtifactoryManagerBuilder artifactoryManagerBuilder = new ArtifactoryManagerBuilder().setClientConfiguration(clientConfiguration, clientConfiguration.publisher);
        ArtifactoryClientConfiguration.PackageManagerHandler packageManagerHandler = clientConfiguration.packageManagerHandler;
        GoPublish goPublish = new GoPublish(artifactoryManagerBuilder, ArrayListMultimap.create(clientConfiguration.publisher.getMatrixParams().asMultimap()), clientConfiguration.publisher.getRepoKey(), Paths.get(packageManagerHandler.getPath() != null ? packageManagerHandler.getPath() : ".").toAbsolutePath(), clientConfiguration.goHandler.getGoPublishedVersion(), packageManagerHandler.getModule(), clientConfiguration.getLog());
        goPublish.executeAndSaveBuildInfo(clientConfiguration);
    } catch (RuntimeException | IOException 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) IOException(java.io.IOException)

Example 7 with ArtifactoryManagerBuilder

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

the class GoRun method main.

/**
 * Allow running go run using a new Java process.
 * Used only in Jenkins to allow running 'rtGo run' in a docker container.
 */
public static void main(String[] ignored) {
    try {
        ArtifactoryClientConfiguration clientConfiguration = createArtifactoryClientConfiguration();
        ArtifactoryManagerBuilder artifactoryManagerBuilder = new ArtifactoryManagerBuilder().setClientConfiguration(clientConfiguration, clientConfiguration.resolver);
        ArtifactoryClientConfiguration.PackageManagerHandler packageManagerHandler = clientConfiguration.packageManagerHandler;
        ArtifactoryClientConfiguration.GoHandler goHandler = clientConfiguration.goHandler;
        GoRun goRun = new GoRun(packageManagerHandler.getArgs(), Paths.get(packageManagerHandler.getPath() != null ? packageManagerHandler.getPath() : "."), packageManagerHandler.getModule(), artifactoryManagerBuilder, clientConfiguration.resolver.getRepoKey(), clientConfiguration.resolver.getUsername(), clientConfiguration.resolver.getPassword(), clientConfiguration.getLog(), clientConfiguration.getAllProperties());
        goRun.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 8 with ArtifactoryManagerBuilder

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

the class NpmInstallCi method main.

/**
 * Allow running npm install using a new Java process.
 * Used only in Jenkins to allow running 'rtNpm 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 packageManagerHandler = clientConfiguration.packageManagerHandler;
        ArtifactoryClientConfiguration.NpmHandler npmHandler = clientConfiguration.npmHandler;
        NpmInstallCi npmInstall = new NpmInstallCi(artifactoryManagerBuilder, clientConfiguration.resolver.getRepoKey(), packageManagerHandler.getArgs(), clientConfiguration.getLog(), Paths.get(packageManagerHandler.getPath() != null ? packageManagerHandler.getPath() : "."), clientConfiguration.getAllProperties(), packageManagerHandler.getModule(), clientConfiguration.info.getBuildName(), npmHandler.isCiCommand(), clientConfiguration.info.getProject());
        npmInstall.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 9 with ArtifactoryManagerBuilder

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

the class NugetRun method main.

/**
 * Allow running nuget restore using a new Java process.
 * Used only in Jenkins to allow running 'rtNuget run' in a docker container.
 */
public static void main(String[] ignored) {
    try {
        ArtifactoryClientConfiguration clientConfiguration = createArtifactoryClientConfiguration();
        ArtifactoryManagerBuilder clientBuilder = new ArtifactoryManagerBuilder().setClientConfiguration(clientConfiguration, clientConfiguration.resolver);
        ArtifactoryClientConfiguration.PackageManagerHandler handler = clientConfiguration.packageManagerHandler;
        NugetRun nugetRun = new NugetRun(clientBuilder, clientConfiguration.resolver.getRepoKey(), clientConfiguration.dotnetHandler.useDotnetCoreCli(), handler.getArgs(), clientConfiguration.getLog(), Paths.get(handler.getPath() != null ? handler.getPath() : "."), clientConfiguration.getAllProperties(), handler.getModule(), clientConfiguration.resolver.getUsername(), clientConfiguration.resolver.getPassword(), clientConfiguration.dotnetHandler.apiProtocol());
        nugetRun.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 10 with ArtifactoryManagerBuilder

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

the class NpmExtractorTest method setUp.

@BeforeClass
private void setUp() throws IOException {
    artifactoryManagerBuilder = new ArtifactoryManagerBuilder().setServerUrl(getArtifactoryUrl()).setUsername(getUsername()).setPassword(getAdminToken()).setLog(getLog());
    downloaderHelper = new DependenciesDownloaderHelper(artifactoryManager, ".", log);
    deployTestDependencies(Project.ASGARD, Project.MIDGARD, Project.ALFHEIM, Project.SVARTALFHEIM);
}
Also used : ArtifactoryManagerBuilder(org.jfrog.build.extractor.clientConfiguration.ArtifactoryManagerBuilder) DependenciesDownloaderHelper(org.jfrog.build.extractor.clientConfiguration.util.DependenciesDownloaderHelper) 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