Closed ahatala closed 3 years ago
I accidentally discovered a workaround for this that's probably not how the CLI tool is intended to be used but happens to fix the issue for my present needs: https://github.com/jenkinsci/plasticscm-plugin/pull/33.
Hi @ahatala . Sorry for not writing to you sooner. It seems I was not receiving any notifications from GitHub about pull requests or bug reports. Clicked "Watch everything" so I will not miss those again.
Proper fix for this is being authored in pull request #35.
Incorrectly closed this issue as I thought it was a pull request. Reopened until PR #35 is merged.
The plastic CLI client changed to always sync to latest in branch when issuing "cm update" in version 8.0.16.3470. From change log:
This causes an issue with the jenkins plugin when using an exact changeset selector. The first time an agent switches to the selector everything works ok (selector needs to be rewritten, so no "cm update" is done). If there is another build with the same selector things go badly wrong: a "cm update" is done, so the checkout is synced to the latest in branch. This can easily happen with multi-stage (or parallel) pipeline builds where more than one stage is scheduled to run on the same agent, but for repro purposes it's sufficient to just run a freestyle job with an exact changeset selector two times in a row with a single agent.