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

Clean and force sync workspace on demand when using SyncOnly

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Hello,

      in our company we use FreeStyleBuilds (no pipelines) to run incremental builds of our projects.
      This is achieved by setting p4 plugin to "SyncOnly" and "Populate have list".
      Once per day (or on demand) we would like to run clean build, controlled by boolean build parameter P4_CLEANWORKSPACE. When this checkbox is on, workspace should be deleted and recreated prior to running build.
      I have tried to use "delete workspace" plugin, but then p4 plugin's have list was not updated and full (force) sync was not performed.
      I have implemented support for this feature and created pull request. Before sync phase, when there is P4_CLEANWORKSPACE environment variable set, build workspace is deleted and force sync is performed.
      Example implementation is on my branch:
      https://github.com/nephre/p4-plugin/tree/force_sync_when_p4cleanworkspace

      Is it possible to merge such change into master branch?
      If so, this is PR: https://github.com/jenkinsci/p4-plugin/pull/133

      Kind regards,
      Daniel Jeznach

        Attachments

          Activity

          Hide
          p4karl Karl Wirth added a comment -
          Show
          p4karl Karl Wirth added a comment - Hi Daniel Jeznach - Thanks.   FYI Paul Allen - Pull request https://github.com/jenkinsci/p4-plugin/pull/133
          Hide
          daniel_jeznach_img Daniel Jeznach added a comment -

          Karl Wirth it is not useful in this case because of incremental nature of these builds. Workspace should be cleaned explicitely only sometimes (when user requires it by parametrizing build) or once per day (full overnight builds).

          Show
          daniel_jeznach_img Daniel Jeznach added a comment - Karl Wirth it is not useful in this case because of incremental nature of these builds. Workspace should be cleaned explicitely only sometimes (when user requires it by parametrizing build) or once per day (full overnight builds).
          Hide
          p4karl Karl Wirth added a comment -

          Hi Daniel Jeznach - Did you try the post build action 'Delete Client' or is that not useful because of the incremental nature of the builds?

          Show
          p4karl Karl Wirth added a comment - Hi Daniel Jeznach - Did you try the post build action 'Delete Client' or is that not useful because of the incremental nature of the builds?

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            daniel_jeznach_img Daniel Jeznach
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: