Jump to content

Fury22

Members
  • Posts

    4
  • Joined

  • Last visited

Fury22's Achievements

Newbie

Newbie (1/14)

  • One Month Later Rare
  • Week One Done Rare
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. I have resolved it by caching some data in pre-checkin hook, effectively using pre and post checking hooks to do things as first or second. It works 100% of times now.
  2. 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!
  3. Hi! I have resolved the issue yesterday actually. I used webhook from this github repository: https://github.com/adnanh/webhook. Then I launched the Amazon AWS instance hosting this webhook there. It requires a json setup file. This is how the setup looks to me. So basically that how I pass those arguments into the shell script. I am saving "INPUT" parameter into the file rather than having it as parameter, because it's a large string and with a bit more files it will crash the shell script because the argument is too long. But I am saving it into txt file and reading from within the shell script. Also, the SCM documentation is outdated, some parameters no longer exist, so watch out for those. As of return parameters, webhook has these two: "include-command-output-in-response": false, "include-command-output-in-response-on-error": false, If the one with the error is set to true, then you can return for example exit 1 from the shell and it will not allow the checkin to pass. Additionally it will grab whatever you echoed before so for example: /// IF SOME CONDITION then echo "Condition failed! exit 1 fi exit 0 this script will print to the client who tries to check stuff in.
  4. Hi! I am new to Plastic SCM, I've come from Perforce background and I am really glad I found this source control! I have issues understanding webhook triggers. I have successfully set up webhooks for discord and custom one as well, the shell script triggers properly. I have looked into triggers documentation and blogs as well. I use Cloud version. So I have before-checkin trigger launching on my remote webhook server, and it receives and triggers my shell script perfectly. However... despite returning exit code 0 or 1, this does not get to the client checking in. I know that the script triggers for 100% - I am logging stuff there. Basically I wanted to check simply if the comment is empty or not, but even with simple shell script returning always exit 1, literally without any logic(just for testing and learning), the checkin works. I am not sure how I can return this value correctly through the webhook. Any help welcome!
×
×
  • Create New...