Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-10364

Publish over FTP Plugin loses configuration when unchecking the box

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      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

        Attachments

          Activity

          Hide
          bap bap added a comment -

          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?

          Show
          bap bap added a comment - 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?
          Hide
          jacob_robertson Jacob Robertson added a comment -

          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.

          Show
          jacob_robertson Jacob Robertson added a comment - 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.
          Hide
          bap bap added a comment -

          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.

          Show
          bap bap added a comment - 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.
          Hide
          bap bap added a comment -

          No response, assume happy

          Show
          bap bap added a comment - No response, assume happy

            People

            Assignee:
            bap bap
            Reporter:
            jacob_robertson Jacob Robertson
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: