Jump to content

XLink and base repository hooks


Fury22

Recommended Posts

Hi! I have been using Plastic SCM(cloud) with a bunch of integrations I created over last few months such as TeamCity, various pre and post checkin hooks etc. We have pretty good architecture by now and I decided to some improvements for the architecture now.

Our pipeline looks like this.
There are two repositories:
1. Project
2. Plugins

Project repository is the top repository we are working on. Plugins is a completely separate repository, that contains some modular libraries we have.
Project has XLink(full, editable one) to the Plugins repository.
There is no issues with this flow as the Plugins we have are our internal tools, that we build simultaneously with the project, so sometimes while coding project, when it requires some certain features from our Plugins, we would code that into plugins repository too.
So this is our background and how we work on it. Now to the issue...

We have a post-checkin hook, that gets triggered whenever we checkin something to any repository, be it plugins or project. This post-checkin hook does some work with Jira and some other tools we use, and in the end it triggers TeamCity build by POST call. So far all of this works perfectly.
However... for various reasons, our hook requires Plugins repository to be checked in FIRST and the Project as SECOND. This is done purposely, because project depends on plugins, there is some work I want to get done first on Plugins, and then on Project.
Now, it works only sometimes. I logged everything that happens inside the hook, and it looks to me, that when checking in files for both Project and Xlinked Plugins together in a single changeset, under the hood, it randomly selects what is checked in first. So basically sometimes Plugins hook gets triggered first, and sometimes the Project.
I have not noticed any pattern to that so far, it seems completely random.

Is that expected behaviour, and I should think of rethinking some of the architecture design? Or is it something I can maybe tweak with some commands?
If anyone could help me understand why this behaviour happens, I will be really glad.
Thanks!

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