-
Notifications
You must be signed in to change notification settings - Fork 33
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
[JENKINS-55816] Publish over FTP fails on multi-module project when modules skipped #69
Comments
mesa: According to the very similar issue described in How's the NOT_BUILT determined? |
This method is used to determine when to build: https://github.com/jenkinsci/publish-over-plugin/blob/3669f32d0a3d13d140fa353d95390b6547b76b02/src/main/java/jenkins/plugins/publish_over/BPPlugin.java#L143 |
mesa: Thanks. Does not give me any more insight, though. It works okay when building snapshots, but fails on releases. Does it refer to the snapshot build only somehow? However, I wonder why the plugin checks the build result, because when configuring the FTP step in the build, the user selects between "Run only if build succeeds", "Run only if build succeeds or is unstable", "Run regardless of build result". The fact that the plugin tries to act according to the build result is actually confusing. For example, I tried it with "Run regardless of build result", but the plugin insists on making its own decision and ignores my wish. I think the plugin itself should not check the build result at all. |
That option is not part of the plugin itself, and the plugin is used in more than just Maven builds, so I can't really remove it. I am not very familiar with Maven jobs, so I am not sure what will need to be done here. I will need to look into it further. |
mesa: You've linked to the Jenkins plugin, so I assumed that this was a Jenkins functionality. In the context of Jenkins, I think it would make sense not to determine the build success within the plugin, but instead let Jenkins take care of that. However, maybe it's an idea to create a new option (tickbox) to let the user decide whether the plugin should check the build result or not? |
Again, the option to only do things on success, etc is specific to Maven builds. The plugin MUST look at the build status for other builds types. I will look into different options. |
mesa: I see what you mean. Just FYI, I've found another variation of this problem here. It looks like the getResult() method returns only the result of the last module/component? |
mesa: FYI, I've created a local patch, commenting out the check for build success. Doing so, I've noticed that it's also required to remove the build status update (last few lines in perform method), because it used the wrong NOT_BUILT status it had determined from the previous step to update the status of the whole build to NOT_BUILT, causing the build to be considered failed. |
The logic for this is in the parent "publish-over" plugin, so the same issue is affecting both SSH and FTP (also CIFS would be affected as well). |
[Originally related to: JENKINS-16240] |
I have a multi-module project that is built with Jenkins/Maven. When doing a release build, in the cleanup phase, only the top module results in SUCCESS, while the other modules get a SKIPPED, simply because there is nothing to do for them. This looks like this, for example:
It's actually not a problem. The overall result is SUCCESS. However, the Publish Over FTP plugin does not seem to look at the overall result, but seems to see only that some steps did have resulted in something different from SUCCESS, so erroneously assumes a build problem and does not upload the artifacts:
There doesn't seem to be a way to work around this, so I hope for a fix in the Publish Over FTP plugin.
Originally reported by mesa, imported from: Publish over FTP fails on multi-module project when modules skipped
The text was updated successfully, but these errors were encountered: