Jump to content
Sign in to follow this  
Xorcist

Plastic Sync -> GitSync trigger for an individual repo?

Recommended Posts

I've been reading up on Triggers but I'm not sure I'll be able to achieve my goal.

What I would like to do is, after a sync operation completes (on the destination server), for a single repo (not all the repos), I would like that server to then perform a subsequent GitSync from that repo into Azure DevOps.

Does anyone know how to set this up, or if it is even feasible.

Share this post


Link to post
Share on other sites

Hi, 

There is an "after-replciationwrite" trigger you may use in this scenario:

https://www.plasticscm.com/documentation/triggers/plastic-scm-version-control-triggers-guide#Replicationwrite

You can include the gitsync command in this trigger. The trigger will be asynchronous so the push is not locked until the gitsync is finished.

Regards,

Carlos.

Share this post


Link to post
Share on other sites

So is there no way to trigger after a sync is complete? Won't the after-replicationwrite trigger go off on every replicated branch no matter the repo being replicated (possibly firing multiple times)? I was really hoping to limit the gitsync to only firing after a sync is complete on a specific repo.

Share this post


Link to post
Share on other sites

So I did some confirmation testing, and it looks like it will fire multiple times... I might be able to write a script to fire a gitsync after one or more replicationwrites are detected on the repo (which I would extract from the PLASTIC_BRANCH environment variable), but only after a period of inactivity. Which would hopefully be enough to indicate that the complete sync is finished.

What are the chances we could get a new triggers for before-sync and after-sync added into Plastic SCM? Is this a feasible trigger?

Share this post


Link to post
Share on other sites

As you comment, the goal is to use the environment variables to use the "PLASTIC_BRANCH" and "PLASTIC_REPLICATION_SOURCE"  to select the repo and branch where you want to run the triggers.

It will fire every time you replicate a branch. Isn't it the expected behavior? If you are replicating multiple branches, you could get them in your trigger script and only run the GitSync when the last branch is replicated.

Regards,

Carlos.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...