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

[JENKINS-10364] Publish over FTP Plugin loses configuration when unchecking the box #34

Closed
jira-importer opened this issue Jul 18, 2011 · 4 comments

Comments

@jira-importer
Copy link
Collaborator

Quite often teams will want to temporarily disable publishing. However, when they go to re-enable publishing, they find that their entire configuration has been lost. This discourages them from using this feature which we are trying to promote. Please add a "Disable publishing (i.e. temporarily)" checkbox to the job's configuration, so we can retain the configuration, but just temporarily disable publishing.

Note that I have implemented this feature for the FTP-Publisher Plugin, but since your plugin is under active development, it would be nice if it had all the features I need, and we could migrate to it once we move to a newer version of Jenkins that your plugin will support.

See https://wiki.jenkins-ci.org/display/JENKINS/FTP-Publisher+Plugin


Originally reported by jacob_robertson, imported from: Publish over FTP Plugin loses configuration when unchecking the box
  • assignee: bap
  • status: Closed
  • priority: Major
  • resolution: Fixed
  • resolved: 2011-11-07T23:42:06+11:00
  • imported: 2022/01/10
@jira-importer
Copy link
Collaborator Author

bap:

I can think of a couple of ways to achieve this with the current version of the plugin

The first is to install the promoted-builds plugin
During the build, "Archive the artifacts" that you want to FTP
Create a promotion that has an action that performs the FTP
You can then easily switch between manual promotion or automatically promoting (the build can promote itself!)
This also has the advantage that any given build can be promoted (FTP'd) at any given time (eg rollback - if #34 has been sent, but is bad, #32 could easily be sent back accross by re-executing the promotion)

The other way is to use the new parameterized publishing feature
Set a parameter name in the Advanced options of the publisher, and make the build parameterized with a parameter of the same name
You can use a String parameter or choice to select between the two options below
.* will publish to all FTP servers
.+ will publish to all FTP servers that have a label (as you have not given any labels, this would mean that none would publish)
Set the default parameter value for builds that are started automatically

A skip option also feels like it should be a lot more generic than just adding to every plugin - they are all configured in the same manner, and they all loose their configs if disabled and the config saved.

Would either of the above (especially the promoted-builds solution) be acceptable?

@jira-importer
Copy link
Collaborator Author

jacob_robertson:

Put yourself in my situation: I have two hundred jobs, each with an associated release job. I would like development teams to maintain their own jobs, but my team ends up providing assistance for all the jobs. The actual build steps in the jobs are already complicated (but as simple as we could make them), so we've worked really hard to try and keep all configuration down as much as possible, including writing our own in-house plugins that wrap up some configuration, etc. So, although what you described seems fine, it doesn't help me keep this simple for the development teams.

I do agree that having a generic skip would have been a nice thing for Jenkins to have built into the framework. I see it kind of like the maven skip facility - each plugin had to roll its own, and not all of them have that capability. But in retrospect, maven should have made this easy also. Meanwhile, it is what it is.

@jira-importer
Copy link
Collaborator Author

bap:

Jacob,

I have just released the Flexible Publish Plugin https://wiki.jenkins-ci.org/display/JENKINS/Flexible+Publish+Plugin (wiki page to become useful this afternoon )

With this plugin installed, you can add the "Send build artifacts over FTP" to the "Flexible publish" Post-build Action and use the Run Condition "Always" to enable the publish.

To "skip" without losing the FTP configuration, update the Run Condition to "Never".

Please close this issue if you find my solution acceptable.

Bap.

@jira-importer
Copy link
Collaborator Author

bap:

No response, assume happy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant