Jump to content
Raghu

Does Plastic SCM has Web-Hooks rather than Polling

Recommended Posts

Hello,

I am new to Plastic and trying to understand it's architecture and integration functionalities with Jenkins CI.

I would like to know if there is any option in Plastic SCM for Jenkins, something like web-hooks in GITHUB or GITLAB where it pushes the code to Jenkins and instructs it to start the job when ever a new merge happens to central repository, instead of Jenkins polling the repository in certain time interval for new changes in code.

 

Share this post


Link to post
Share on other sites

Hi Raghu,

Unfortunately, that functionality is not available at the moment. You can request it at our uservoice website (https://plasticscm.uservoice.com/forums/15467-general) and we'll consider it into our development plans if it gets enough traction! Otherwise, please remember that the jenkins Plastic SCM plugin is open source, so you can extend it if you feel courageous enough! https://github.com/jenkinsci/plasticscm-plugin

 

Regards,

Miguel

  • Thanks 1

Share this post


Link to post
Share on other sites
25 minutes ago, mig said:

Hi Raghu,

Unfortunately, that functionality is not available at the moment. You can request it at our uservoice website (https://plasticscm.uservoice.com/forums/15467-general) and we'll consider it into our development plans if it gets enough traction! Otherwise, please remember that the jenkins Plastic SCM plugin is open source, so you can extend it if you feel courageous enough! https://github.com/jenkinsci/plasticscm-plugin

 

Regards,

Miguel

Thank you mig for the reply

Share this post


Link to post
Share on other sites

Hi @Raghu,

not sure if it will fully fit but for "on premise" servers (not available for the Plastic cloud) you can use the Plastic SCM web triggers, it will allow you to make a web request that might start a new build in the Jenkins system.

This is an example:

cm maketrigger after-checkin "Notify team" "webtrigger https://www.mysite.com/api/team/checkin"

You can get more details here: Triggers Guide

Share this post


Link to post
Share on other sites

Hi @manu,

thank you for the details on this web triggers.

I tried and it's working but the trigger is being applied to complete server. When ever some check-in happens in any repository of that server then this job is being executed.

               cm maketrigger after-checkin "Start-Build" "webtrigger http://<Jenkins-User>:<Jenkins-user-API-Token>@Jenkins-server:8080/job/<Jenkins-job>/build?token=<Jenkins-user-API-Token>"

 

So, i have applied filter of my repository no the trigger is not being executed on Check-in. Below is the command used, can you help me fixing it. Am I missing something here?

               cm maketrigger after-checkin "Start-Build" "webtrigger http://<Jenkins-User>:<Jenkins-user-API-Token>@Jenkins-server:8080/job/<Jenkins-job>/build?token=<Jenkins-user-API-Token>" --filter="rep:<my-repo>"

 

 

Share this post


Link to post
Share on other sites

I got it resolved by adding "*" after repository name in filters. But I wanted to understand what does it mean any we need to provide it there.

 

 

Share this post


Link to post
Share on other sites

Hello @Raghu,

you needed the * because you need to provide if you want it for all the checkins done at that repo or just if a few fileas are changed. For example:

--filter=rep:default,*.cs

Will only be triggered when cs files are involved at that checkin. I think it would be easier to "understand" that if there's no file filter assume a *... 

  • Thanks 1

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

×