Jump to content

Shelving from the cloud?

Francois Bertrand

Recommended Posts

Hi! We could really use shelving; we did not expect that functionality to be unavailable when using cloud. To clarify, we are using "centralized" workflow where everyone just points to the cloud. We did not see any advantage in having local repositories and adding a push/pull step, as the centralized workflow works well.

Is there any plan to bring such functionality to Plastic Cloud? It would be much appreciated!

Thank you!

Link to comment
Share on other sites


We have tracked this request also from other customers. We initially designed the Plastic SCM Cloud to work as a pull/push service, more and more users demanded a centralized workflow with the rest of operations such us, checkin, create branch, update, switch...

The shelve operation didn't get much traction and was left in the backlog. I will share it again with the team.



Link to comment
Share on other sites

  • 2 months later...
  • 5 months later...
  • 3 years later...

I have a plastic client installed on the jenkins agent and wanted to use the mergebot shelve but came across this issue, what I ended up doing was doing the "merge to a shelve" in the agent itselfe

this is the groovy sintax to do that

def shelveId = powershell(script: '''
    $branchName = ''' + "'${env.PLASTICSCM_MERGEBOT_BRANCH_NAME}'" + '''
    $mergeOutput = cm merge br:/$branchName --to=br:/main --merge --shelve
    $Pattern = 'sh:(.*?) '
    Write-Host $mergeOutput
    $shelveId = (([regex]::Matches($mergeOutput, $Pattern)).Groups | Where-Object {$_.Name -eq '1'}).Value
    return $shelveId
''', returnStdout: true).trim()

echo "Shelve ID: ${shelveId}" 
// Apply the shelve to the workspace
bat "cm shelveset apply sh:${shelveId}"

hope this helps anyone that come cross this 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...