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

Clean and force sync workspace on demand when using SyncOnly

    XMLWordPrintable

Details

    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

          daniel_jeznach_img Daniel Jeznach created issue -
          daniel_jeznach_img Daniel Jeznach made changes -
          Field Original Value New Value
          Description Hello,

          in our company we are using 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 create 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
          I'll create pull request when finish writing tests.
          Is it possible to merge such change into master branch?

          Kind regards,
          Daniel Jeznach
          Hello,

          in our company we are using 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 create 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?

          Kind regards,
          Daniel Jeznach
          daniel_jeznach_img Daniel Jeznach made changes -
          Description Hello,

          in our company we are using 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 create 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?

          Kind regards,
          Daniel Jeznach
          Hello,

          in our company we are using 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 create 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
          daniel_jeznach_img Daniel Jeznach made changes -
          Description Hello,

          in our company we are using 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 create 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
          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 create 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
          daniel_jeznach_img Daniel Jeznach made changes -
          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 create 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
          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
          p4karl Karl Wirth made changes -
          Attachment image-2021-09-10-16-42-47-673.png [ 56301 ]
          p4karl Karl Wirth added a comment -

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

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

          p4karl 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).

          daniel_jeznach_img Daniel Jeznach added a comment - p4karl 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).
          p4karl Karl Wirth added a comment - Hi daniel_jeznach_img - Thanks.   FYI p4paul - Pull request https://github.com/jenkinsci/p4-plugin/pull/133
          p4karl Karl Wirth made changes -
          Labels P4_A P4_VERIFY

          I believe this is now merged, and the issue can be set to different status: https://github.com/jenkinsci/p4-plugin/pull/133.
          Thanks for adding this feature.

          daniel_jeznach_img Daniel Jeznach added a comment - I believe this is now merged, and the issue can be set to different status: https://github.com/jenkinsci/p4-plugin/pull/133 . Thanks for adding this feature.

          People

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

            Dates

              Created:
              Updated: