Jump to content
Sign in to follow this  
spetitlucine

Merge bots & teamcity

Recommended Posts

Hello, i would like to know where i can find a documentation on how to use trunk merge bot with teamcity.

I try to make a trunk merge bot that merge from task branch in the father branch executing a teamcity plan to test merge integrity, but i have no success, the bot starts when i set the branch as resolved but my teamcity plan is not executed and i got an error in the trunk bot log file, leading to a failed status in the branch i want to merge automatically.

The error is like the following

2021-02-23 15:00:13,021 INFO  trunkbot - TrunkBot [Ben] started. Version [9.0.16.4815]
2021-02-23 15:00:13,274 INFO  trunkbot - Retrieving branches to process...
2021-02-23 15:00:13,337 INFO  websocket - TrunkBot [Ben] connected!
2021-02-23 15:00:28,629 INFO  trunkbot - Processing branch /main/Prod/Test/Dev/JIRA_feature4 attribute change...
2021-02-23 15:00:28,632 INFO  trunkbot - Getting task number of branch /main/Prod/Test/Dev/JIRA_feature4 ...
2021-02-23 15:00:28,643 INFO  trunkbot - Building the merge report of task _feature4 ...
2021-02-23 15:00:28,670 INFO  trunkbot - Trying to shelve server-side-merge from /main/Prod/Test/Dev/JIRA_feature4 to /main/Prod/Test/Dev
2021-02-23 15:00:28,735 INFO  trunkbot - Testing branch /main/Prod/Test/Dev/JIRA_feature4 ...
2021-02-23 15:00:29,050 ERROR RestApi - Unable to read the error response: Object reference not set to an instance of an object.
2021-02-23 15:00:29,062 ERROR RestApi - Unable to retrieve CI plan status. The server returned: The remote server returned an error: (404) Not Found.. The requested element doesn't exist.
2021-02-23 15:00:29,063 WARN  RestApi - An error occurred trying to query the get plan status endpoint /api/v1/ci/TeamCity//plan/RepoTemplate%3ARepoTemplate
2021-02-23 15:00:29,063 WARN  RestApi - Falling back to the legacy get plan status endpoint /api/v1/ci/TeamCity/RepoTemplate%3ARepoTemplate/
2021-02-23 15:00:29,065 ERROR RestApi - Unable to read the error response: Object reference not set to an instance of an object.
2021-02-23 15:00:29,066 ERROR RestApi - Unable to retrieve CI plan status - deprecated. The server returned: The remote server returned an error: (404) Not Found.. The requested element doesn't exist.
2021-02-23 15:00:29,066 ERROR trunkbot - The attempt to process task _feature4 failed for branch /main/Prod/Test/Dev/JIRA_feature4: One or more errors occurred. (The remote server returned an error: (404) Not Found.)
2021-02-23 15:00:29,116 INFO  trunkbot - Branch /main/Prod/Test/Dev/JIRA_feature4 processing failed.


it seems related to the way i have named the plan to launch but not sure.

Any advice ?

Thanks by advance

Stéphane

Share this post


Link to post
Share on other sites

Hi Stéphane,

Thanks for reaching out.

I suspect that you are using TeamCity version 202.1 or newer and you are experiencing an issue that has been recently reported. The fix for this is due to be released very soon. Please bear with us and I will update you here once the release has been published. 

Share this post


Link to post
Share on other sites

Hi Olliblanks, you're right i'm using teamcity 2020.2.2. So i'm waiting for your update. Any idea of the release date ?

Do you have a more recent tutorial for using merge bots with TC ? I wanted to know if the TC plan that i indicate to the bot to launch must have the plastic mergebot build runner as first step of build. It is not really clear for me. Moreover, when i have a TC project with multiple plans in it how should i indicate the plan to run to the bot ? Project:Plan ? Thanks by advance.

Stéphane

Share this post


Link to post
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
Sign in to follow this  

×
×
  • Create New...