Code Monkey home page Code Monkey logo

jenkins-artifactory-plugin's Introduction

Jenkins Artifactory Plugin

JFrog Plugin Installs

Scanned by Frogbot Tests Static Analysis

General

The plugin integrates Jenkins and Artifactory to publish, resolve, promote and release traceable build artifacts. For more information, including the release notes, please visit the JFrog Artifactory Plugin documentation. The release notes for versions 3.18.1 and above are available here.

How to Contribute

JFrog welcomes community contribution through pull requests.

Important:

The plugin code is stored in two GitHub repositories: https://github.com/jfrog/jenkins-artifactory-plugin and https://github.com/jenkinsci/artifactory-plugin

Please make sure to submit pull requests to https://github.com/jfrog/jenkins-artifactory-plugin only.

How to build the plugin code

To build the plugin, please use Maven 3.6.1 or above, with JDK 8, and run:

> mvn clean install

Tests

Unit tests

To run unit tests execute the following command:

> mvn clean test

Integration tests

Running integration tests

Before running the integration tests, set the following environment variables. See here how to generate a Platform Admin Token.

JENKINS_PLATFORM_URL
JENKINS_PLATFORM_USERNAME
JENKINS_PLATFORM_ADMIN_TOKEN
JENKINS_ARTIFACTORY_DOCKER_PUSH_DOMAIN (For example, server-docker-local.jfrog.io)
JENKINS_ARTIFACTORY_DOCKER_PULL_DOMAIN (For example, server-docker-remote.jfrog.io)
JENKINS_ARTIFACTORY_DOCKER_PUSH_REPO (For example, docker-local)
JENKINS_ARTIFACTORY_DOCKER_PULL_REPO (For example, docker-remote)
JENKINS_ARTIFACTORY_DOCKER_HOST - Optional address of the docker daemon (For example, tcp://127.0.0.1:1234)
JENKINS_PIP_ENV_INIT - Optional command to activate pip virtual-environment for tests execution (For example, source /Users/user/jenkins-venv/bin/activate)
MAVEN_HOME - The local maven installation path.
GRADLE_HOME - The local gradle installation path.

To disable build scan with Xray integration tests, set JENKINS_XRAY_TEST_ENABLE to false. Go tests require Go v1.14 or above.

Run the integration tests.

> mvn clean verify -DskipITs=false

Integration tests results and progress

The tests results are printed to the console (standard output) when the tests finish. Since JUnit however does not indicate which tests are currently running, a file named tests.log is created in the current directory, which logs the tests progress.

jenkins-artifactory-plugin's People

Contributors

alexeivainshtein avatar attiasas avatar barbelity avatar dependabot[bot] avatar dimanevelev avatar elig avatar eyalb4doc avatar eyalbe4 avatar github-actions[bot] avatar jglick avatar julian-computes avatar kohsuke avatar liorhson avatar liron-shalom avatar ndeloof avatar olamy avatar or-geva avatar reversefold avatar robinino avatar ronmjf avatar shikloshi avatar sll552 avatar stephenc avatar sverdlov93 avatar talarian1 avatar tamirhadad avatar tomerc-jfrog avatar uriahl avatar yahavi avatar yoav avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jenkins-artifactory-plugin's Issues

Artifactory release staging doesn't update versions of inactive maven modules

Previously we used MavenReleaseWrapper version 2.16.2 for doing release staging. This updated the versions of all maven sub modules (even the inactive ones). Inactive means that they were defined inside an inactive profile. This was exactly what we were needing. Everything was consistently updated and tagged.

After updating to version 3.0.0 the behaviour has changed. Now the release staging doesn't touch the versions of inactive maven sub modules any more.
This causes the tagging of inconsistent versions.

How can we workaround that problem?

rtMavenRun cannot run with maven3 + jdk1.7

I'm trying to compile a java application with maven 3 using jdk1.7 and the step rtMavenRun is crash cause of the jdk1.7.
it seems like the jenkins artifactory plugin using the jdk1.7 for running.

artifactory jenkins plugin version: 3.2.2

steps to reproduce:
adding this step to Jenkins pipeline file:

stage{
  environment{
    JAVA_HOME = 'PATH TO JDK1.7'
  }
  steps{
    rtMavenRun (
      tool: 'mvn3',
      pom: 'pom.xml',
      goals: 'clean install
      resolverId: 'artifactory',
      deployerId: 'artifactory',
      )
    }
}

Exception:
13:25:29 [main] WARNING Sisu - Error injecting: org.jfrog.build.extractor.maven.ArtifactoryProjectBuilder 13:25:29 java.lang.TypeNotPresentException: Type org.jfrog.build.extractor.maven.ArtifactoryProjectBuilder not present 13:25:29 at org.eclipse.sisu.space.URLClassSpace.loadClass (URLClassSpace.java:147) 13:25:29 at org.eclipse.sisu.space.NamedClass.load (NamedClass.java:46) 13:25:29 at org.eclipse.sisu.space.AbstractDeferredClass.get (AbstractDeferredClass.java:48) 13:25:29 at com.google.inject.internal.ProviderInternalFactory.provision (ProviderInternalFactory.java:85) 13:25:29 at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision (InternalFactoryToInitializableAdapter.java:57) 13:25:29 at com.google.inject.internal.ProviderInternalFactory$1.call (ProviderInternalFactory.java:66) 13:25:29 at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:112) 13:25:29 at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:127) 13:25:29 at com.google.inject.internal.ProvisionListenerStackCallback.provision (ProvisionListenerStackCallback.java:66) 13:25:29 at com.google.inject.internal.ProviderInternalFactory.circularGet (ProviderInternalFactory.java:61) 13:25:29 at com.google.inject.internal.InternalFactoryToInitializableAdapter.get (InternalFactoryToInitializableAdapter.java:47) 13:25:29 at com.google.inject.internal.ProviderToInternalFactoryAdapter.get (ProviderToInternalFactoryAdapter.java:40) 13:25:29 at com.google.inject.internal.SingletonScope$1.get (SingletonScope.java:168) 13:25:29 at com.google.inject.internal.InternalFactoryToProviderAdapter.get (InternalFactoryToProviderAdapter.java:39) 13:25:29 at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1050) 13:25:29 at com.google.inject.internal.InjectorImpl.getInstance (InjectorImpl.java:1086) 13:25:29 at org.eclipse.sisu.space.AbstractDeferredClass.get (AbstractDeferredClass.java:48) 13:25:29 at com.google.inject.internal.ProviderInternalFactory.provision (ProviderInternalFactory.java:85) 13:25:29 at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision (InternalFactoryToInitializableAdapter.java:57) 13:25:29 at com.google.inject.internal.ProviderInternalFactory$1.call (ProviderInternalFactory.java:66) 13:25:29 at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:112) 13:25:29 at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:127) 13:25:29 at com.google.inject.internal.ProvisionListenerStackCallback.provision (ProvisionListenerStackCallback.java:66) 13:25:29 at com.google.inject.internal.ProviderInternalFactory.circularGet (ProviderInternalFactory.java:61) 13:25:29 at com.google.inject.internal.InternalFactoryToInitializableAdapter.get (InternalFactoryToInitializableAdapter.java:47) 13:25:29 at com.google.inject.internal.ProviderToInternalFactoryAdapter.get (ProviderToInternalFactoryAdapter.java:40) 13:25:29 at com.google.inject.internal.SingletonScope$1.get (SingletonScope.java:168) 13:25:29 at com.google.inject.internal.InternalFactoryToProviderAdapter.get (InternalFactoryToProviderAdapter.java:39) 13:25:29 at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1050) 13:25:29 at org.eclipse.sisu.inject.LazyBeanEntry.getValue (LazyBeanEntry.java:81) 13:25:29 at org.eclipse.sisu.plexus.LazyPlexusBean.getValue (LazyPlexusBean.java:51) 13:25:29 at org.eclipse.sisu.plexus.PlexusRequirements$RequirementProvider.get (PlexusRequirements.java:250) 13:25:29 at org.eclipse.sisu.plexus.ProvidedPropertyBinding.injectProperty (ProvidedPropertyBinding.java:48) 13:25:29 at org.eclipse.sisu.bean.BeanInjector.injectMembers (BeanInjector.java:52) 13:25:29 at com.google.inject.internal.MembersInjectorImpl.injectMembers (MembersInjectorImpl.java:160) 13:25:29 at com.google.inject.internal.ConstructorInjector.provision (ConstructorInjector.java:124) 13:25:29 at com.google.inject.internal.ConstructorInjector.access$000 (ConstructorInjector.java:32) 13:25:29 at com.google.inject.internal.ConstructorInjector$1.call (ConstructorInjector.java:98) 13:25:29 at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:112) 13:25:29 at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:127) 13:25:29 at com.google.inject.internal.ProvisionListenerStackCallback.provision (ProvisionListenerStackCallback.java:66) 13:25:29 at com.google.inject.internal.ConstructorInjector.construct (ConstructorInjector.java:93) 13:25:29 at com.google.inject.internal.ConstructorBindingImpl$Factory.get (ConstructorBindingImpl.java:306) 13:25:29 at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1050) 13:25:29 at com.google.inject.internal.InjectorImpl.getInstance (InjectorImpl.java:1086) 13:25:29 at org.eclipse.sisu.space.AbstractDeferredClass.get (AbstractDeferredClass.java:48) 13:25:29 at com.google.inject.internal.ProviderInternalFactory.provision (ProviderInternalFactory.java:85) 13:25:29 at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision (InternalFactoryToInitializableAdapter.java:57) 13:25:29 at com.google.inject.internal.ProviderInternalFactory$1.call (ProviderInternalFactory.java:66) 13:25:29 at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:112) 13:25:29 at org.eclipse.sisu.bean.BeanScheduler$CycleActivator.onProvision (BeanScheduler.java:230) 13:25:29 at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:120) 13:25:29 at com.google.inject.internal.ProvisionListenerStackCallback.provision (ProvisionListenerStackCallback.java:66) 13:25:29 at com.google.inject.internal.ProviderInternalFactory.circularGet (ProviderInternalFactory.java:61) 13:25:29 at com.google.inject.internal.InternalFactoryToInitializableAdapter.get (InternalFactoryToInitializableAdapter.java:47) 13:25:29 at com.google.inject.internal.ProviderToInternalFactoryAdapter.get (ProviderToInternalFactoryAdapter.java:40) 13:25:29 at com.google.inject.internal.SingletonScope$1.get (SingletonScope.java:168) 13:25:29 at com.google.inject.internal.InternalFactoryToProviderAdapter.get (InternalFactoryToProviderAdapter.java:39) 13:25:29 at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1050) 13:25:29 at org.eclipse.sisu.inject.LazyBeanEntry.getValue (LazyBeanEntry.java:81) 13:25:29 at org.eclipse.sisu.plexus.LazyPlexusBean.getValue (LazyPlexusBean.java:51) 13:25:29 at org.codehaus.plexus.DefaultPlexusContainer.lookup (DefaultPlexusContainer.java:263) 13:25:29 at org.codehaus.plexus.DefaultPlexusContainer.lookup (DefaultPlexusContainer.java:255) 13:25:29 at org.codehaus.plexus.DefaultPlexusContainer.lookup (DefaultPlexusContainer.java:249) 13:25:29 at org.apache.maven.cli.MavenCli.container (MavenCli.java:675) 13:25:29 at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:281) 13:25:29 at org.apache.maven.cli.MavenCli.main (MavenCli.java:192) 13:25:29 at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) 13:25:29 at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:57) 13:25:29 at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) 13:25:29 at java.lang.reflect.Method.invoke (Method.java:606) 13:25:29 at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282) 13:25:29 at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225) 13:25:29 at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406) 13:25:29 at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347) 13:25:29 Caused by: java.lang.UnsupportedClassVersionError: org/jfrog/build/extractor/maven/ArtifactoryProjectBuilder : Unsupported major.minor version 52.0

Expected behavior:

Compiling java application with jdk 1.7 using jenkins artifactory plugin.

NPM Publish ignores proxy settings

NPM Publish (and possibly NPM Install as well) ignores Bypass HTTP Proxy setting in Artifactory tool configuration and uses the global proxy to connect to Artifactory host. It also ignores no-proxy hosts specified in the global proxy settings.

Error occurred for request GET http://artifactory/api/system/version HTTP/1.1. Received status code 504 and message: Gateway Timeout.

Attempting retry #1
...
Attempting retry #3
...

Couldn't execute npm task. Check connection with Artifactory.

npm publish failed

Watchers don't work with the plugin

When using jfrog cli to upload a file to Artifactory, I get the notification when the file is uploaded to the repo I'm watching. When doing the same using the plugin, no notification is sent. I'm still not sure if this is a plugin issue, or something on the Artifactory side? Is there an additional setting for the Artifactory server that we're possibly missing?

explode option when downloading tries to unzip .txt file and fails

I'm using artifactory plugin version 3.1.0.

Here's the stacktrace.

ERROR: Unsupported archive extension: 'txt'
java.lang.IllegalArgumentException: Unsupported archive extension: 'txt'
	at org.jfrog.build.api.util.ZipUtils.verifySupportedExtension(ZipUtils.java:151)
	at org.jfrog.build.api.util.ZipUtils.createArchiveInputStream(ZipUtils.java:87)
	at org.jfrog.build.api.util.ZipUtils.extractFiles(ZipUtils.java:52)
	at org.jfrog.build.api.util.ZipUtils.extract(ZipUtils.java:40)
	at org.jfrog.build.extractor.clientConfiguration.util.DependenciesDownloaderHelper.explodeDependenciesIfNeeded(DependenciesDownloaderHelper.java:169)
	at org.jfrog.build.extractor.clientConfiguration.util.DependenciesDownloaderHelper.downloadDependencies(DependenciesDownloaderHelper.java:152)
	at org.jfrog.build.extractor.clientConfiguration.util.DependenciesDownloaderImpl.download(DependenciesDownloaderImpl.java:49)
	at org.jfrog.build.extractor.clientConfiguration.util.AqlDependenciesHelper.downloadDependencies(AqlDependenciesHelper.java:80)
	at org.jfrog.build.extractor.clientConfiguration.util.WildcardsDependenciesHelper.retrievePublishedDependencies(WildcardsDependenciesHelper.java:89)
	at org.jfrog.build.extractor.clientConfiguration.util.DependenciesDownloaderHelper.downloadDependencies(DependenciesDownloaderHelper.java:92)
	at org.jfrog.build.extractor.clientConfiguration.util.spec.SpecsHelper.downloadArtifactsBySpec(SpecsHelper.java:109)
	at org.jfrog.hudson.generic.FilesResolverCallable.invoke(FilesResolverCallable.java:48)
	at org.jfrog.hudson.generic.FilesResolverCallable.invoke(FilesResolverCallable.java:20)
	at hudson.FilePath.act(FilePath.java:1078)
	at hudson.FilePath.act(FilePath.java:1061)
	at org.jfrog.hudson.generic.ArtifactoryGenericConfigurator.setUp(ArtifactoryGenericConfigurator.java:305)
	at hudson.model.Build$BuildExecution.doRun(Build.java:157)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
	at hudson.model.Run.execute(Run.java:1810)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
	at hudson.model.ResourceController.execute(ResourceController.java:97)
	at hudson.model.Executor.run(Executor.java:429)

Constructor signature update breaks Jenkins As Code

A new constructor argument was added in 258545d. This probably broke most Jenkins As Code implementations as they creates instances of this class to add to jenkins at startup.
This new argument should have a default value in order to not break backwards compatibility.

Artifactory plugin does not publish any artifact but just the build descriptor

Considering minimalist build.gradle:

plugins {
    id 'java'
    id 'base'
    id "com.jfrog.artifactory" version "4.9.7"
}

apply plugin:'base'
apply plugin: "com.jfrog.artifactory"
apply plugin: 'java'
apply plugin: 'maven-publish'


publishing {
    publications {
        mavenJava(MavenPublication) {
            from components.java
        }
    }
}

repositories {
    jcenter()
}


group = 'com.bla.test'
version = '1.1'
sourceCompatibility = '1.8'

Using tutorial:
https://www.jfrog.com/confluence/display/RTF/Gradle+Builds

with Gradle wrapper 5.5.1

And Jenkins version: 2.107.3

And Jenkins Artifactory Plugin version: 3.2.1

On running the job as in the link:

Fetching upstream changes from [email protected]:xxx/xxx-spring.git
 > git --version # timeout=10
using GIT_SSH to set credentials github-xxx-key
 > git fetch --tags --progress [email protected]:xxx/xxx-spring.git +refs/heads/*:refs/remotes/origin/*
 > git config remote.origin.url [email protected]:xxx/nxxx-spring.git # timeout=10
 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
 > git config remote.origin.url [email protected]:xxxinc/xxx-spring.git # timeout=10
Fetching upstream changes from [email protected]:xxxinc/xxx-spring.git
using GIT_SSH to set credentials github-chatapp-key
 > git fetch --tags --progress [email protected]:xxxinc/xxx-spring.git +refs/heads/*:refs/remotes/origin/*
 > git rev-parse refs/remotes/origin/xxx^{commit} # timeout=10
 > git rev-parse refs/remotes/origin/origin/xxx^{commit} # timeout=10
Checking out Revision xxx8fc4cf1fe4531bdb4b52d83ce (refs/remotes/origin/try-gradle)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f xxx8fc4cf1fe4531bdb4b52d83ce
Commit message: "FML 2"
 > git rev-list --no-walk xxx8fc4cf1fe4531bdb4b52d83ce # timeout=10
Jenkins Artifactory Plugin version: 3.2.1
[gradle_library_publish] $ /bin/sh -xe /tmp/jenkins3752614823280854506.sh
+ cd monitoring
[Gradle] - Launching build.
[monitoring] $ /var/lib/jenkins/workspace/some_job/xxx/gradlew -scan -s clean artifactoryPublish
> Task :clean UP-TO-DATE
> Task :artifactoryPublish

> Task :artifactoryDeploy
Deploying build descriptor to: http://xxxx.internal/xxxx/api/build
Build successfully deployed. Browse it in Artifactory under http://xxxx.internal/xxxx/webapp/builds/gradle_library_publish/28

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.5.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 1s
3 actionable tasks: 2 executed, 1 up-to-date

The build scan was not published due to a configuration problem.

The Gradle Terms of Service have not been agreed to.

For more information, please see https://gradle.com/scans/help/plugin-terms-of-service.

Alternatively, if you are using Gradle Enterprise, specify the server location.
For more information, please see https://gradle.com/scans/help/plugin-enterprise-config.

Build step 'Invoke Gradle script' changed build result to SUCCESS
Finished: SUCCESS

This does not publish anything but the build descriptor

Everything works fine when trying to publish locally to artifactory but that needs
descriptor with url and everything set. When trying to run the job with this descriptor it also works.

I thought that entire purpose of jenkins plugin is to eliminate that. Please help. The job itself has configured repositories and credentials and has "Publish artifacts to Artifactory" checked.

Support uploading deb and rpm packages

It looks like the rtUpload DSL doesn't have support for uploading deb or rpm packages. This is our primary use case for Artifactory. It would be great if this plugin supported it.

Thanks

Cannot build due to "zip END header not found"

x05532:Preferences mtdeguzis$ ~/apache-maven-3.6.0/bin/mvn -version
Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; 2018-10-24T14:41:47-04:00)
Maven home: /Users/mtdeguzis/apache-maven-3.6.0
Java version: 11.0.1, vendor: Oracle Corporation, runtime: /Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.14.1", arch: "x86_64", family: "mac"

[INFO] --- maven-localizer-plugin:1.24:generate (default) @ artifactory ---
Downloading from central: http://oss.jfrog.org/artifactory/jfrog-dependencies/org/jenkins-ci/annotation-indexer/1.4/annotation-indexer-1.4.jar
Downloaded from central: http://oss.jfrog.org/artifactory/jfrog-dependencies/org/jenkins-ci/annotation-indexer/1.4/annotation-indexer-1.4.jar (16 kB at 23 kB/s)
[INFO] 
[INFO] >>> maven-javadoc-plugin:2.10.3:javadoc (default) > generate-sources @ artifactory >>>
[INFO] 
[INFO] --- maven-hpi-plugin:2.1:validate (default-validate) @ artifactory ---
[INFO] 
[INFO] --- maven-enforcer-plugin:3.0.0-M1:display-info (display-info) @ artifactory ---
[INFO] Maven Version: 3.6.0
[INFO] JDK Version: 11.0.1 normalized as: 11.0.1
[INFO] OS Info: Arch: x86_64 Family: mac Name: mac os x Version: 10.14.1
[INFO] 
[INFO] --- maven-enforcer-plugin:3.0.0-M1:enforce (display-info) @ artifactory ---
[INFO] Skipping Rule Enforcement.
[INFO] 
[INFO] --- maven-enforcer-plugin:3.0.0-M1:enforce (default) @ artifactory ---
[INFO] Skipping Rule Enforcement.
[INFO] 
[INFO] --- maven-localizer-plugin:1.24:generate (default) @ artifactory ---
[INFO] 
[INFO] <<< maven-javadoc-plugin:2.10.3:javadoc (default) < generate-sources @ artifactory <<<
[INFO] 
[INFO] 
[INFO] --- maven-javadoc-plugin:2.10.3:javadoc (default) @ artifactory ---
[INFO] 
1 error
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  01:35 min
[INFO] Finished at: 2019-04-11T16:23:46-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.10.3:javadoc (default) on project artifactory: An error has occurred in JavaDocs report generation: 
[ERROR] Exit code: 1 - error: error reading /Users/mtdeguzis/.m2/repository/org/jenkins-ci/main/jenkins-core/1.642.3/jenkins-core-1.642.3.jar; zip END header not found
[ERROR] 
[ERROR] Command line was: /Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home/bin/javadoc @options @packages
[ERROR] 
[ERROR] Refer to the generated Javadoc files in '/Users/mtdeguzis/Library/Preferences/artifactory-jenkins/jenkins-artifactory-plugin/target/site/apidocs' dir.
[ERROR] 
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the follow

Support for multiple repo for resolver

How can i add multiple reps for resolver object ?

If i try to add multiple repos, it doesn't work ?

rtMaven.resolver(releaseRepo: 'repo1, repo2',
snapshotRepo: 'repo1, repo2', server: artifactoryServer)
r

NPM Publish does not run in Docker agent

While in a declarative pipeline with Docker agent, NPM Publish fails to run. Seems like npm binary is looked up on the remote machine instead of inside a Docker container running on the remote machine..

Sample pipeline:

pipeline {
  agent {
    docker {
      image 'node:11.10.1-alpine'
      args '-v $HOME:$HOME:rw,z -e HOME=$HOME'
    }
  }

  stages {
    stage('Package and Publish') {
      steps {
         rtNpmDeployer (
            id: 'deployer-unique-id',
            serverId: 'artifactory',
            repo: 'npm',
        )
        rtNpmPublish (
          path: 'build',
          deployerId: 'deployer-unique-id'
        )
      }
    }
  }
}

Outcome:

Cannot run program "npm" (in directory "/home/jenkins/workspace/playground/react/CI/build"): error=2, No such file or directory

npm publish failed

Scripted pipeline has the same issue.

Add a CHANGELOG

Is there somewhere I can go to find out what the latest changes were in current releases? If not, consider a CHANGELOG.md in this repository

Class not found exception with git client plugin 3.0.0

JENKINS-55224 records that when git client plugin 3.0.0 is released, the artifactory plugin will report class not found exceptions for a JGit 3.0 method that it references.

Refer to #93 for the pull request that will retain compatibility with the current git client plugin and will prevent the class not found exception on update to git client plugin 3.0.0

Credentials plugin not working

During the upgrade to latest plugin we recognized that the Credential Plugin is not working anymore:
image

Jenkins version: 2.164.2
Artifactory plugin version: 3.2.4

snapExpr from custom promotion screen

I use a custom promotion plugin and use the plugin dropdown from promotion screen. The snapExpr field accepts regex but doesnt pass it entirely to the underlying code.
If I pass the expression from Jenkins UI as '[r][c][.][0-9]+' it gets passed as '[r][c][.][0-9]' in the groovy code.

NPM Install debug mode for scripted pipeline

Hello, I have some issue during installing dependencies by using Artifactory plugin (v. 3.2.2). Since during installing dependencies, its failing time to time, I would like to take a look at what package is causing the issue by using verbose mode for npm install (npm install -ddd). I tried this:
def buildInfo = npmBuild.install args: '-ddd', path: npmPackageDirectory

But this args parameter doesn't work for me, I can't see any detailed info there. Btw. the error, which I get, when installing dependencies is running, there is:

[Pipeline] newBuildInfo
[Pipeline] artifactoryNpmInstall
process hasn't exited
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // ansiColor
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
[Bitbucket] Notifying commit build result
[Bitbucket] Build result notified
java.lang.RuntimeException: npm build failed
	at org.jfrog.hudson.pipeline.common.executors.NpmInstallExecutor.execute(NpmInstallExecutor.java:59)
	at org.jfrog.hudson.pipeline.scripted.steps.NpmInstallStep$Execution.run(NpmInstallStep.java:64)
	at org.jfrog.hudson.pipeline.scripted.steps.NpmInstallStep$Execution.run(NpmInstallStep.java:39)
	at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
	at hudson.security.ACL.impersonate(ACL.java:290)
	at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Finished: FAILURE

Support for specifying more than one artifactory paths for triggerring a build

It would be convenient to be able to specify more than one paths that will be checked for changes in order to trigger a build (e.g. in the same artifactory server and separated by semicolon in the path field).

Also, is there any support for define this trigger in the pippeline script using the declarative syntax, e.g. triggers { ... } ?

Thanks in advance!

Adding support for v1 Docker images

We have been experimenting with some of the newer experimental Docker features (See https://docs.docker.com/develop/develop-images/build_enhancements/).

Building the images works just fine using a pipeline like

withEnv(['DOCKER_BUILDKIT=1']) {
  image = docker.build('test-image', '.')
}

But when you then attempt to push the image to Artifactory, with a pipeline like the following (quite simplified, but should get the point across)

def server = Artifactory.server 'our-account-id'
def rtDocker = Artifactory.docker server: server

rtDocker.push(image.id, 'our-target-repo')

It fails with 'Docker build info is not supported for docker V1 images'.

The code that triggers this error is: https://github.com/jfrog/jenkins-artifactory-plugin/blob/master/src/main/java/org/jfrog/hudson/pipeline/common/docker/utils/DockerUtils.java#L119

Is there any roadmap for adding support for Docker V1 images so we can start publishing images built with the nice new features?

Kind regards
Morten

Getting error while pushing image

9dc188d975fd: Retrying in 2 seconds
58bcc73dcf40: Retrying in 2 seconds
ee60293db08f: Retrying in 2 seconds
73b4683e66e8: Retrying in 2 seconds
3efd1f7c01f6: Retrying in 2 seconds
9dc188d975fd: Retrying in 1 second
58bcc73dcf40: Retrying in 1 second
ee60293db08f: Retrying in 1 second
73b4683e66e8: Retrying in 1 second
3efd1f7c01f6: Retrying in 1 second
unknown: Not Found
Build step 'Docker Build and Publish' marked build as failure
Finished: FAILURE

May I know the possible reasons for this errors

Thanks
Murali

Docker image/buildinfo push issue

After an upgrade from 3.2.4 to 3.3.2, an issue is encountered when we try to push a docker image with build info:

com.fasterxml.jackson.core.JsonParseException: Numeric value (60000000000) out of range of int
 at [Source: UNKNOWN; line: 1, column: 1052]
	at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1804)
	at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:693)
	at com.fasterxml.jackson.core.base.ParserBase.convertNumberToInt(ParserBase.java:886)
	at com.fasterxml.jackson.core.base.ParserBase._parseIntValue(ParserBase.java:801)
	at com.fasterxml.jackson.core.base.ParserBase.getIntValue(ParserBase.java:645)
	at com.fasterxml.jackson.databind.deser.std.NumberDeserializers$IntegerDeserializer.deserialize(NumberDeserializers.java:472)
	at com.fasterxml.jackson.databind.deser.std.NumberDeserializers$IntegerDeserializer.deserialize(NumberDeserializers.java:452)
	at com.fasterxml.jackson.databind.deser.impl.FieldProperty.deserializeAndSet(FieldProperty.java:138)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:288)
Caused: com.fasterxml.jackson.databind.JsonMappingException: Numeric value (60000000000) out of range of int
 at [Source: UNKNOWN; line: 1, column: 1041] (through reference chain: com.github.dockerjava.api.command.InspectImageResponse["ContainerConfig"]->com.github.dockerjava.api.model.ContainerConfig["Healthcheck"]->com.github.dockerjava.api.model.HealthCheck["StartPeriod"])
	at com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:394)
	at com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:353)
	at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.wrapAndThrow(BeanDeserializerBase.java:1711)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:290)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:151)
	at com.fasterxml.jackson.databind.deser.impl.FieldProperty.deserializeAndSet(FieldProperty.java:138)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:288)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:151)
	at com.fasterxml.jackson.databind.deser.impl.FieldProperty.deserializeAndSet(FieldProperty.java:138)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:288)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:151)
	at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4013)
	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3106)
	at com.github.dockerjava.netty.handler.JsonResponseCallbackHandler.channelRead0(JsonResponseCallbackHandler.java:40)
	at com.github.dockerjava.netty.handler.JsonResponseCallbackHandler.channelRead0(JsonResponseCallbackHandler.java:17)
	at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:323)
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:297)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	at com.github.dockerjava.netty.handler.HttpResponseHandler.channelRead0(HttpResponseHandler.java:72)
	at com.github.dockerjava.netty.handler.HttpResponseHandler.channelRead0(HttpResponseHandler.java:33)
	at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	at io.netty.handler.logging.LoggingHandler.channelRead(LoggingHandler.java:241)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:438)
	at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:323)
	at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
	at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:426)
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:278)
	at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:253)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
	at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:799)
	at io.netty.channel.epoll.EpollDomainSocketChannel$EpollDomainUnsafe.epollInReady(EpollDomainSocketChannel.java:138)
	at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:433)
	at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:330)
	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:897)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to Slave01-0d8bed60529e
		at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1743)
		at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:357)
		at hudson.remoting.Channel.call(Channel.java:957)
		at org.jfrog.hudson.pipeline.common.docker.utils.DockerAgentUtils.getImageIdFromAgent(DockerAgentUtils.java:279)
		at org.jfrog.hudson.pipeline.common.executors.DockerExecutor.execute(DockerExecutor.java:56)
		at org.jfrog.hudson.pipeline.scripted.steps.DockerPushStep$Execution.run(DockerPushStep.java:100)
		at org.jfrog.hudson.pipeline.scripted.steps.DockerPushStep$Execution.run(DockerPushStep.java:70)
		at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
		at hudson.security.ACL.impersonate(ACL.java:290)
		at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
		at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
Caused: java.lang.RuntimeException: com.fasterxml.jackson.databind.JsonMappingException: Numeric value (60000000000) out of range of int
 at [Source: (byte[])"{"Id":"sha256:895eb49529cc8adcef5e7c3154741c90dc816637ed1d6c16acbaabebae4dabbc","RepoTags":["docker-actility.repo.int.actility.com/tpe-snapshot/twa:10.14.4-3-HA-SNAPSHOT","repository-dev.labs.thingpark.com/tpe-snapshot/twa:10.14.4-3-HA-SNAPSHOT"],"RepoDigests":[],"Parent":"sha256:3aa3038bf4fad340ebca53e6f347070455fa20efdff194fa9e79dcbfa81aafa6","Comment":"","Created":"2019-07-08T07:38:59.112887773Z","Container":"0f71b98c75cc8734c9f22a330a0ff7a9bfd3b675744596101f9b08592bfbd156","ContainerConfig":"[truncated 6402 bytes]; line: 1, column: 1041] (through reference chain: com.github.dockerjava.api.command.InspectImageResponse["ContainerConfig"]->com.github.dockerjava.api.model.ContainerConfig["Healthcheck"]->com.github.dockerjava.api.model.HealthCheck["StartPeriod"])
	at com.google.common.base.Throwables.propagate(Throwables.java:156)
	at com.github.dockerjava.core.async.ResultCallbackTemplate.throwFirstError(ResultCallbackTemplate.java:139)
	at com.github.dockerjava.core.async.ResultCallbackTemplate.awaitCompletion(ResultCallbackTemplate.java:94)
	at com.github.dockerjava.netty.NettyInvocationBuilder$ResponseCallback.awaitResult(NettyInvocationBuilder.java:60)
	at com.github.dockerjava.netty.NettyInvocationBuilder.get(NettyInvocationBuilder.java:139)
	at com.github.dockerjava.core.exec.InspectImageCmdExec.execute(InspectImageCmdExec.java:28)
	at com.github.dockerjava.core.exec.InspectImageCmdExec.execute(InspectImageCmdExec.java:13)
	at com.github.dockerjava.core.exec.AbstrSyncDockerCmdExec.exec(AbstrSyncDockerCmdExec.java:21)
	at com.github.dockerjava.core.command.AbstrDockerCmd.exec(AbstrDockerCmd.java:35)
	at com.github.dockerjava.core.command.InspectImageCmdImpl.exec(InspectImageCmdImpl.java:40)
	at org.jfrog.hudson.pipeline.common.docker.utils.DockerUtils.getImageIdFromTag(DockerUtils.java:38)
	at org.jfrog.hudson.pipeline.common.docker.utils.DockerAgentUtils$6.call(DockerAgentUtils.java:281)
	at org.jfrog.hudson.pipeline.common.docker.utils.DockerAgentUtils$6.call(DockerAgentUtils.java:279)
	at hudson.remoting.UserRequest.perform(UserRequest.java:212)
	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
	at hudson.remoting.Request$2.run(Request.java:369)
	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Finished: FAILURE

We have tried to rollback to 3.3.0 without more success.
Builded image Dockerfile contain a HEALTHCHECK definition which to be related to failure:

HEALTHCHECK --interval=10s --timeout=3s --retries=15 --start-period=60s \
        CMD ....

Regards

Not possible to authenticate conan user without adding a remote

Currently if you add conan remotes via conan config install and registry.json, you can not re-add the remote using this Jenkins DSL:

    def server = Artifactory.server "artifactory_name"
    def client = Artifactory.newConanClient()
    def serverName = client.remote.add server: server, repo: "artifactory_repo"

because conan will error saying that a remote already exists with the given URL.

However, client.remote.add seems to be the only way to authenticate the artifactory repo user. It is the only place where the function conanAddUser is called.

There should be a way to add/authenticate a user for artifactory without having to add the conan remote.

Here is the relevant plugin code:

cpsScript.invokeMethod("conanAddUser", getAddUserExecutionArguments(server, serverName));

Support JCasC

Currently the plugin doesn't support JCasC - see JENKINS-56073.

When an Artifactory server is configured in the global config, the JCasC export fails as follows

unclassified:
  artifactoryBuilder:
    artifactoryServers: "FAILED TO EXPORT org.jfrog.hudson.ArtifactoryBuilder$DescriptorImpl#artifactoryServers:\
      \ \nio.jenkins.plugins.casc.ConfiguratorException: Can't read attribute 'serverId'\
      \ from org.jfrog.hudson.ArtifactoryServer@12d71b12\n\tat io.jenkins.plugins.casc.Attribute._getValue(Attribute.java:252)\n\
      \tat io.jenkins.plugins.casc.Attribute.getValue(Attribute.java:174)\n\tat io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator.describe(DataBoundConfigurator.java:236)\n\
      \tat io.jenkins.plugins.casc.Attribute.describe(Attribute.java:192)\n\tat io.jenkins.plugins.casc.BaseConfigurator.compare(BaseConfigurator.java:387)\n\
      \tat io.jenkins.plugins.casc.impl.configurators.DescriptorConfigurator.describe(DescriptorConfigurator.java:61)\n\
      \tat io.jenkins.plugins.casc.impl.configurators.GlobalConfigurationCategoryConfigurator.describe(GlobalConfigurationCategoryConfigurator.java:105)\n\
      \tat io.jenkins.plugins.casc.impl.configurators.GlobalConfigurationCategoryConfigurator.lambda$describe$6(GlobalConfigurationCategoryConfigurator.java:98)\n\
      \tat java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)\n\
      \tat java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)\n\
      \tat java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)\n\
      \tat java.util.Iterator.forEachRemaining(Iterator.java:116)\n\tat java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)\n\
      \tat java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)\n\
      \tat java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)\n\
      \tat java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)\n\
      \tat java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)\n\
      \tat java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)\n\
      \tat java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)\n\
      \tat io.jenkins.plugins.casc.impl.configurators.GlobalConfigurationCategoryConfigurator.describe(GlobalConfigurationCategoryConfigurator.java:98)\n\
      \tat io.jenkins.plugins.casc.impl.configurators.GlobalConfigurationCategoryConfigurator.describe(GlobalConfigurationCategoryConfigurator.java:32)\n\
      \tat io.jenkins.plugins.casc.ConfigurationAsCode.export(ConfigurationAsCode.java:411)\n\
      \tat io.jenkins.plugins.casc.ConfigurationAsCode.doExport(ConfigurationAsCode.java:401)\n\
     ...

Conan: Error in retry upload leads to `currentBuild.result` set to `FAILURE`, which always break the job

This ticket is linked to conan-io/conan#4907

I got the problem, that Conan fails, because he got an error '500', when uploading a package.
Unluckily Conan is (at the moment) not retrying the task, as I put him on the commandline arguments.

So I wrote the following groovy script for Jenkins Pipeline:

        // Upload to Conan (Artifactory)
        // It happens sometimes, that 2 processes try to change the same value at the same moment. Therefor we repeat the step.
        def max_retry_upload = 5
        for (i = 0; i <max_retry_upload; i++) {
            try {
                client.run command: "upload * --all --force --retry 5 --retry-wait 10 -r ${name} --confirm".toString(), buildInfo: buildInfo
                break
            }
            catch(Exception e) {
                if (i == max_retry_upload - 1) {
                    println "Current Build result: ${currentBuild.result}"
                    println "Error: Unable to upload, sthrow exception..."
                    throw e
                }
                else {
                    println "Current Build result: ${currentBuild.result} (Change status back to SUCCESS)"
                    println "Warning: Unable to upload, sleep & retry..."
                    currentBuild.result = 'SUCCESS'
                    sleep(5 + 5 * Math.random()) // Wait 5 to 10 seconds
                }
            }
        }

The script is working, so that Jenkins build the job (also when the first upload fails). But unluckily he still recognize the first error in the upload as error of the complete job. I thought, when I catch the error, he should ignore the failure. The "currentBuild.result" is already set to "FAILURE" instead of "SUCCESS".
Could it be, that the Artifactory plugin first catch the error, then set "currentBuild.result" to "FAILURE" and then rethrow the execption?

How to run conan commands with declarative pipeline

Hello,

i see there is a runconancommand step, but I was not able to use it.

First, all parameters have to be set (and since thee is no documentation I dont know what to),
and then there is the buildInfo Paramter which requires an object than I would not know how to create.

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
WorkflowScript: 26: Missing required parameter: "conanHome" @ line 26, column 17.
                   runConanCommand command: 'install .'
                   ^

WorkflowScript: 26: Missing required parameter: "buildLogPath" @ line 26, column 17.
                   runConanCommand command: 'install .'
                   ^

WorkflowScript: 26: Missing required parameter: "buildInfo" @ line 26, column 17.
                   runConanCommand command: 'install .'

Promotion of build shows success in output and logs, but artifact is not moved or copied to targetRepo

Using the following script:

rtPublishBuildInfo (
                            serverId: "jfrog",
                            buildName: "my_build"
                        )

                        rtBuildInfo (
                            captureEnv: true,
                            buildName: "my_build"
                        )

                        // upload to artifactory
                        rtUpload (
                            serverId: "jfrog",
                            buildName: "my_build",
                            spec: """{
                                "files": [
                                    {
                                        "pattern": "*release.tar.gz",
                                        "target": "builds"
                                    }
                                ]
                            }"""
                        )

                        rtAddInteractivePromotion (
                            // Mandatory parameters

                            // Artifactory server ID from Jenkins configuration, or from configuration in the pipeline script
                            serverId: "jfrog",
                            buildName: "my_build",

                            // Optional parameters

                            // If set, the promotion window will display this label instead of the build name and number.
                            displayName: 'Promote me please',
                            // Name of target repository in Artifactory
                            targetRepo: 'builds-release-local',
                            // Comment and Status to be displayed in the Build History tab in Artifactory
                            comment: 'this is the promotion comment',
                            status: 'Released',
                            // Specifies the source repository for build artifacts.
                            sourceRepo: 'builds',
                            // Indicates whether to promote the build dependencies, in addition to the artifacts. False by default.
                            includeDependencies: true,
                            // Indicates whether to fail the promotion process in case of failing to move or copy one of the files. False by default
                            failFast: true,
                            // Indicates whether to copy the files. Move is the default.
                            copy: true
                        )

Everything appears to work as expected, I see the artifactory release promotion link in Jenkins:
image

And clicking it gives me the expected options (aside from the displayName which not sure if it has any effect:
image

And when clicking "PROMOTE BUILD" button, it also looks like everything works as expected, this is the output:

Promoting build ....
Performing dry run promotion (no changes are made during dry run) ...
{
  "messages" : [ ]
}
Dry run finished successfully.
Performing promotion ...
{
  "messages" : [ ]
}
Promotion completed successfully!

Completed

And if I view the build info "Release History" in jfrog artifactory, sure enough it shows "Released"
image

And Build Info JSON also shows

 "statuses": [{
        "status": "Released",
        "comment": "this is the promotion comment",
        "repository": "builds-release-local",
        "timestamp": "2019-06-18T23:28:42.056+0000",
        "user": "build",
        "ciUser": "admin",
        "timestampDate": 1560900522056
    }]

So everything looks like it should... however, the artifacts never actually get moved or copied from the sourceRepo to the targetRepo

Even if I issue the promotion command via CLI, outside of the plugin I get output of

Promoting build...
Promoted my_build to: builds-release-local repository.

Log output also shows

(o.a.b.BuildPromotionHelper:249) - Promotion completed successfully for build name 'my_build' and number '82' with status of 'Released'

jenkins-artifactory-plugin strips "+" character when setting a property.

def propCodeSha256 = "lambda.CodeSha256=ZKxGLSEhJ+XxDagT/ME4BLMxIGNGn2z0XBiv+8Ybh1w="

def myspec = """
{
files: [
{
"pattern": "uap/externalintegration/articleadministration/articles-b138a281ad9.zip"
}
]
}
"""
rtServer.setProps spec: myspec props: propCodeSha256

If I looked at the console the "+" character is replaced by a [space] character.

However, if I add the property using the web interface, then it works as expected the "+" character is accepted an not replaced by [space] character.

Support for flatten plugin

On a multi-module project it is possible to use CI friendly feature such as $revision and then resolve pom file with flatten:flatten plugin to generate definitive pom, although it is generated as "flatten-pom.xml". It is ok to use it afterwards on pipeline plugin as answered in stackoverflow with some regards, for instance, have the flatten pom file generated on a previous mvn step. The problem is that submodules keeps on picking the original pom instead.

step 1

rtMavenRun ( ... golas: 'flatten:flatten', ... )

step 2

rtMavenRun ( ... pom: 'flatten-pom.xml', ... )

While step 2 pushes the flatten pom into Artifactory correctly, submodules are still pushing original pom files.
project-root
|_pom.xaml
|_flatte-pom.xml -> pushed
|_module_1
......|_pom.xml -> pushed
......|_flatten-pom.xml

With that said. Is it possible to implement some way to handle flatten pom files or an extra parameter for "definitive-pom"?

NotSerializableException for CollectIssuesExecutor when running rtCollectIssues

When running the sample code to collect Issues in declarative pipelines everything works fine as long as the job is executed on master (docker/linux). Forcing the same pipeline to run on a different node (Windows or macOS) job fails with java.io.NotSerializableException: org.jfrog.hudson.pipeline.common.executors.CollectIssuesExecutor [...].

Download, upload and publish work on all machines.

Is it possible to collectIssues if we use Subversion ?

Hi !

We are using Subversion as SCM but as i can see rtCollectIssues always tries to read git logs .. right ?

Is it possible to collect issues also with subversion.
Ist it possible to read the scm log ?

thanks
claus

Support deployment in parallel

The ArtifactsDeployer performs the deployment options in serial. For large reactors with many artifacts this can accounts for a large percentage of the total build time. Introduce an option to support a specified level of parallelism to enable faster deployments.

for (Map.Entry<MavenModule, MavenBuild> mavenBuildEntry : mavenBuildMap.entrySet()) {

for (MavenArtifact attachedArtifact : mar.attachedArtifacts) {

Create artifactory triggers using declarative pipeline

Being able to specify the job triggers in the Jenkinsfile script using declarative pipeline is a useful feature that allows to have configuration as code and therefore be stored in a repository.
At the moment there is this triggers directive in declarative pipeline that supports cron, pollSCM and upstream triggers. In that sense it would be useful to support also the artifactory trigger, so one can set up such trigger using for example the following code:

pipeline {
    agent any
    triggers {
        artifactory(serverId: 'AF_SERVER', schedule: 'H */4 * * 1-5', paths: 'generic-libs-local/builds/starship')
    }
    ...
}

Artifactory download for LATEST builds does not work with version 3.3.2

hi,

I use this spec:
"files": [
{
"pattern": "proj-dsc-test-generic-local/Builds/Build-check-DSC-Master-CPT/dsc*",
"recursive": "false",
"build": "Builds :: Build-check-DSC-Master-CPT/LATEST",
"explode": "false"
}

this does not find any builds :(

I removed the complete "build" line, then I find 4 files (2 files per build).
when I use:
build": "Builds :: Build-check-DSC-Master-CPT", I find nothing
when I use:
build": "Builds :: Build-check-DSC-Master-CPT/5, I find 2 files of builds #5

Also when I switch to the old method, downloading LATEST is not working.

Able to upload packages but unable to upload build info

This is the error I am getting:

I have searched but unable to find a solution.

java.io.IOException: Could not publish build-info: Failed to send build descriptor. 403 Response message: {
  "errors" : [ {
    "status" : 403,
    "message" : "User token:user is not permitted to deploy 'job/17-1551222119073.json' into 'artifactory-build-info:job/17-1551222119073.json'."
  } ]
}

Freestyle job definition issue

Hi,
After upgrading to 3.3.2, the Generic-Artifactory Integration defenitions on the Job configuration is messed up.
there seem to be a duplicate 'Artifactory upload server' field and 'Target Repository' selection field is not getting populated.
Updating other properties on existing Jobs causes the Artifactory defenition to break.

Thanks,
Gilad
artIssue

Using last published version 3.3.2 not get the Target Repositories

Using last published version 3.3.2 not get the Target Repositories. (I using Jenkins ver. 2.164.3)

In Generic-Artifactory Integration->Artifactory Configuration->Upload Details->Artifactory upload server->Target Repository

Not show any repositories (empty).

In Refresh Repositories button show "Items refreshed successfully", but target repositories is empty.

When I save the job show a NullPointerException:

WARNING: Caught exception evaluating: instance.releaseRepositoryList in /view/PACKAGE/job/ctxmboard-package/configure. Reason: java.lang.reflect.InvocationTargetException
java.lang.reflect.InvocationTargetException
	at sun.reflect.GeneratedMethodAccessor977.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.commons.jexl.util.PropertyExecutor.execute(PropertyExecutor.java:125)
	at org.apache.commons.jexl.util.introspection.UberspectImpl$VelGetterImpl.invoke(UberspectImpl.java:314)
	at org.apache.commons.jexl.parser.ASTArrayAccess.evaluateExpr(ASTArrayAccess.java:185)
	at org.apache.commons.jexl.parser.ASTIdentifier.execute(ASTIdentifier.java:75)
	at org.apache.commons.jexl.parser.ASTReference.execute(ASTReference.java:83)
	at org.apache.commons.jexl.parser.ASTReference.value(ASTReference.java:57)
	at org.apache.commons.jexl.parser.ASTReferenceExpression.value(ASTReferenceExpression.java:51)
	at org.apache.commons.jexl.ExpressionImpl.evaluate(ExpressionImpl.java:80)
	at hudson.ExpressionFactory2$JexlExpression.evaluate(ExpressionFactory2.java:74)
	at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:58)
	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
	at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:99)
	at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
	at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
	at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
	at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
	at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120)
	at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:99)
	at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
	at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
	at org.apache.commons.jelly.tags.core.OtherwiseTag.doTag(OtherwiseTag.java:41)
	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
	at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
	at org.apache.commons.jelly.tags.core.ChooseTag.doTag(ChooseTag.java:38)
	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
	at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
	at org.apache.commons.jelly.tags.core.WhenTag.doTag(WhenTag.java:46)
	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
	at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
	at org.apache.commons.jelly.tags.core.ChooseTag.doTag(ChooseTag.java:38)
	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
	at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
	at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120)
	at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
	at org.apache.commons.jelly.tags.core.ForEachTag.doTag(ForEachTag.java:150)
	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
	at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:99)
	at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
	at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
	at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
	at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
	at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
	at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120)
	at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
	at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:99)
	at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
	at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
	at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
	at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
	at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120)
	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
	at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:99)
	at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
	at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:99)
	at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
	at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
	at org.apache.commons.jelly.tags.core.WhenTag.doTag(WhenTag.java:46)
	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
	at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
	at org.apache.commons.jelly.tags.core.ChooseTag.doTag(ChooseTag.java:38)
	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
	at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
	at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120)
	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
	at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
	at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120)
	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
	at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
	at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:95)
	at org.kohsuke.stapler.jelly.IncludeTag.doTag(IncludeTag.java:147)
	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
	at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:99)
	at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
	at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
	at org.apache.commons.jelly.tags.core.WhenTag.doTag(WhenTag.java:46)
	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
	at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
	at org.apache.commons.jelly.tags.core.ChooseTag.doTag(ChooseTag.java:38)
	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
	at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
	at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120)
	at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
	at org.apache.commons.jelly.tags.core.ForEachTag.doTag(ForEachTag.java:150)
	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
	at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:99)
	at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
	at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:99)
	at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
	at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
	at org.apache.commons.jelly.tags.core.WhenTag.doTag(WhenTag.java:46)
	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
	at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
	at org.apache.commons.jelly.tags.core.ChooseTag.doTag(ChooseTag.java:38)
	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
	at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
	at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120)
	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
	at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
	at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120)
	at org.apache.commons.jelly.tags.core.CoreTagLibrary$1.run(CoreTagLibrary.java:98)
	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
	at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
	at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120)
	at org.apache.commons.jelly.tags.core.CoreTagLibrary$1.run(CoreTagLibrary.java:98)
	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
	at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
	at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120)
	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
	at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
	at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:95)
	at org.kohsuke.stapler.jelly.IncludeTag.doTag(IncludeTag.java:147)
	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
	at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:99)
	at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
	at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
	at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
	at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
	at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120)
	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
	at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
	at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
	at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
	at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:99)
	at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
	at org.apache.commons.jelly.tags.core.CoreTagLibrary$1.run(CoreTagLibrary.java:98)
	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
	at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
	at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120)
	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
	at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:99)
	at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
	at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
	at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
	at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
	at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
	at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
	at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120)
	at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
	at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:95)
	at org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:63)
	at org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:53)
	at org.kohsuke.stapler.jelly.JellyFacet$1.dispatch(JellyFacet.java:103)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:739)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:870)
	at org.kohsuke.stapler.MetaClass$4.doDispatch(MetaClass.java:282)
	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:739)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:870)
	at org.kohsuke.stapler.MetaClass$4.doDispatch(MetaClass.java:282)
	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:739)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:870)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:668)
	at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:865)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1655)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154)
	at com.smartcodeltd.jenkinsci.plugin.assetbundler.filters.LessCSS.doFilter(LessCSS.java:47)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
	at hudson.plugins.greenballs.GreenBallFilter.doFilter(GreenBallFilter.java:59)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
	at hudson.plugins.audit_trail.AuditTrailFilter.doFilter(AuditTrailFilter.java:92)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
	at jenkins.telemetry.impl.UserLanguages$AcceptLanguageFilter.doFilter(UserLanguages.java:128)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
	at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:157)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
	at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:105)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
	at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
	at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90)
	at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
	at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
	at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
	at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1340)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1242)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
	at org.eclipse.jetty.server.Server.handle(Server.java:503)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:364)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
	at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126)
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:765)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:683)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException
	at org.jfrog.hudson.generic.ArtifactoryGenericConfigurator.getReleaseRepositoryList(ArtifactoryGenericConfigurator.java:272)
	... 268 more

Support search for artifact

Please add support for search queries via plugin, wrapping following endpoints:

  • /artifactory/api/search/aql
  • /artifactory/api/search/prop

This plugin always runs the artifactoryPublish task

We have some freestyle jenkins jobs that use the Jenkins Artifactory plugin. Some of these jobs use the Gradle-Artifactory build options to customize the package resolution parameters for the build. Also, they have the "Project uses the Artifactory Gradle Plugin" option enabled which, according to the online help, should have the following affect:

"The Jenkins plugin automatically applies the Artifactory plugin (and, consequently, the 'artifactoryPublish' task) to all projects.
Check this flag to have Jenkins skip this step if your project is already using the Artifactory plugin or the 'artifactoryPublish' task directly. All elements in this job configuration will override matching project-level configuration elements."

However, whether this option is enabled or not, all gradle build steps in our builds always seem to append the artifactoryPublish build task to the end of the build process. There seems to be no way for us to force the builds to stop calling this task. Please advise.

NOTE: We are using the 'gradlew' option in our Gradle build step in case that makes any difference to the way this behavior works.

Jenkins v2.194
Artifactory plugin v3.4.0
Gradle plugin v1.34

Download target keeps structure of pattern

When downloading using rtDownload, I specified

pattern: "[repository name]/[repository path]"
 target: "folderInWorkspace/"

Actual result:

  • The file is downloaded with path: folderInWorkspace/[repository name]/[repository path]

Expected result:

  • The file is download with path: folderInWorkspace/[file(s)]

Jenkins version: 2.176.2
Artifactory plugin version: 3.3.2

Link to Artifactory Build Info is not correctly escaped

actual URL ends with: builds/test~2Fdocker_test/96
Artifactory Build Info: builds/test%2Fdocker_test/96

The jenkins job is within a folder "test", so currentBuild.fullProjectNamewill give test/docker_test.

I manually set buildName so the folder structure will be mirrored at Artifactory, which would be nice as global option in the plugin.

Versions are:

Plugin version is 3.2.2
Artifactory Community Edition for C/C++
6.9.1 rev 60901900

pipeline {
    agent {
        label 'docker'
    }
    environment {
        SOURCE_DATE_EPOCH = "${currentBuild.startTimeInMillis.intdiv(1000)}"
    }
    stages {
        stage('checkout') {
            steps {
                dir('src') {
                    deleteDir()
                    
                }
                
                sh label: 'build', returnStdout: true, script: '{ echo ${SOURCE_DATE_EPOCH}; printenv; } >output.txt'
            }
        }
        
            
        stage ('upload') {
            steps {
                rtBuildInfo (
                    buildName: currentBuild.fullProjectName,
                    captureEnv: true,
                    includeEnvPatterns: ["SOURCE_DATE_EPOCH"]
                    )
                rtUpload (
                    buildName: currentBuild.fullProjectName,
                    serverId: 'arti',
                    spec:
        """{
          "files": [
            {
              "pattern": "*",
              "target": "generic-local/froggy-files/"
            }
         ]
        }"""
                )

                rtPublishBuildInfo (
                    buildName: currentBuild.fullProjectName,
                    serverId: 'arti'
                )
            }
            post { always { deleteDir() } }
        }

    }
}

New plugin not compatible with builds generated with old plugin

I was using Jenkins Artifactory plugin v2.16.2 and things worked fine. I then migrated to v3.0.0 and all of a sudden the older builds which were created via 2.16.2 are not showing artifactory promotion screen is not showing the custom promotion plugins (i have a bunch of custom plugins like this)

For new builds, i do get the option though

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.