Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Artifactory plugin 3.3.3 for Bamboo does not work in Bamboo 9.6.0 #213

Closed
staubesv opened this issue Mar 21, 2024 · 6 comments
Closed

Artifactory plugin 3.3.3 for Bamboo does not work in Bamboo 9.6.0 #213

staubesv opened this issue Mar 21, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@staubesv
Copy link

Describe the bug
After upgrading Bamboo Datacenter from version 9.5.1 to version 9.6.0 using the official Atlassian docker image, our build plans fail at the very end of the build (see stack trace below).

To Reproduce
Upgrade Bamboo to 9.6.0 und run any build plan using the plugin version 3.3.3.

Expected behavior
Plugin should work with Bamboo 9.6.0

Versions

  • Bamboo Artifactory plugin version: 3.3.3
  • Bamboo operating system: Official Atlassian Docker image (atlassian/bamboo:9.6.0)
  • Artifactory Version: 7.77.7

Additional context
According to the release notes of Bamboo 9.6.0 (https://confluence.atlassian.com/bambooreleases/bamboo-9-6-release-notes-1376026732.html), support for jgit has been removed:

Pushing to remote repositories with JGit no longer possible
We’ve found a bug in Bamboo’s long-deprecated JGit feature that poses a risk to the integrity of repositories using the Large File Storage (LFS) extension. Because of the way we’ve implemented JGit’s push functionality in Bamboo, pushing local commits to LFS-enabled repositories may not work as expected. To prevent issues with file integrity, we’ve disabled pushing to remote repositories with JGit.

Bamboo’s JGit feature has never supported making any modification of the repository, including the creation of commits, branches, or tags. If you need this functionality, install native git.

The stack trace kind of suggests that this has become a problem:

Failed to execute plugin 'Artifactory Release Management Staging' with error: com/jcraft/jsch/JSchException
java.lang.NoClassDefFoundError: com/jcraft/jsch/JSchException
        at org.eclipse.jgit.transport.Transport.<clinit>(Transport.java:120)
        at org.eclipse.jgit.api.PushCommand.call(PushCommand.java:155)
        at org.jfrog.bamboo.release.vcs.git.GitManager.pushTag(GitManager.java:189)
        at org.jfrog.bamboo.release.vcs.git.GitCoordinator.afterSuccessfulReleaseVersionBuild(GitCoordinator.java:90)
        at org.jfrog.bamboo.release.provider.AbstractReleaseProvider.afterSuccessfulReleaseVersionBuild(AbstractReleaseProvider.java:112)
        at org.jfrog.bamboo.release.action.ArtifactoryPostBuildCompleteAction.call(ArtifactoryPostBuildCompleteAction.java:80)
        at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.performCustomBuildProcess(ExecuteBuildTask.java:142)
        at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:82)
        at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.executeBuildPhase(DefaultBuildAgent.java:242)
        at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:214)
        at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.lambda$waitAndPerformBuild$0(BuildAgentControllerImpl.java:168)
        at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:115)
        at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:161)
        at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.lambda$start$0(DefaultBuildAgent.java:159)
        at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:48)
        at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:26)
        at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:17)
        at com.atlassian.bamboo.security.ImpersonationHelper.lambda$makeRunnableWithSystemAuthority$0(ImpersonationHelper.java:38)
        at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.lang.ClassNotFoundException: com.jcraft.jsch.JSchException not found by org.jfrog.bamboo.bamboo-artifactory-plugin [33]
        at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1591)
        at org.apache.felix.framework.BundleWiringImpl.access$300(BundleWiringImpl.java:79)
        at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1976)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
        ... 19 more


@staubesv staubesv added the bug Something isn't working label Mar 21, 2024
@szymonbienkowski
Copy link

We've got same error after update to bamboo 9.6.0

@staubesv
Copy link
Author

staubesv commented Apr 2, 2024

As a workaround, we have manually added the missing dependency (com/jcraft/jsch/JSchException) directly to the JAR file - that way, the plugin works with 9.6.0 ;-)

@szymonbienkowski
Copy link

szymonbienkowski commented Apr 4, 2024

ok - I added in the pom.xml file:

<dependency>
<groupId>com.jcraft</groupId>
<artifactId>jsch</artifactId>
<version>0.1.55</version>
</dependency>

and build package. After that jar have had necessary dependencies.

@RobiNino
Copy link
Contributor

RobiNino commented Apr 9, 2024

Hi @staubesv @szymonbienkowski ,
Plugin version 3.3.4 was just released with support to Bamboo 9.6.0.
We'd appreciate your feedback for it, thanks.

@staubesv
Copy link
Author

@RobiNino Thank you very much!

We will install 3.3.4 next week and report our findings back here.

@staubesv
Copy link
Author

Just testet version 3.3.4 with Bamboo Datacenter 9.6.1 - works like charm ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants