Jump to content
Gowrish

Is Validation of objects/files feasible in Plastic

Recommended Posts

Hi Team,

We use Plastic SCM 6.0.

The major part of our code is pl/sql objects. We need to figure out if there is any validation method/scripting available in Plastic before we run the Jenkins build.

Example of few scenarios:
1. If I need to have the sql script name in specific format.

2. The specific file is newly added into the branch after a certain date.

Please let me know if I can contact someone from the Plastic team to understand our requirements can be fulfilled using Plastic.

Thank you in advance.,

 

Share this post


Link to post
Share on other sites

Hello @Gowrish,

I think the Plastic SCM triggers will fit for you, specially the before-checkin trigger: https://www.plasticscm.com/documentation/triggers/plastic-scm-version-control-triggers-guide.shtml#Checkin

You can add the logic inside the trigger body, check the names of the new objects, the timestamp etc... if it doesn't match your criteria then you can cancel the checkin operation.

Share this post


Link to post
Share on other sites

Perfect, don't hesitate to contact us if you have any questions, and feel free to publish or tweet your trigger once you finish it! :) 

Share this post


Link to post
Share on other sites

Hi Manu,

I tried looking at the "cm find merges" section to retrieve the file names (excluding the root or sub folders) merged in a specific branch.

1. There is no such --format="{item}" to use similar to "cm find revisions".

2. Is it possible to query the merges done in last one hour duration ?

These are needed as input for my script. Please advice.

Thank you.,

 

 

 

 

Share this post


Link to post
Share on other sites

What about this?

>cm find merge where "date >= '2017/10/01'" --format="cs:{dstchangeset} ({date})" --nototal
cs:8856 (10/2/2017 6:17:22 PM)
cs:8858 (10/2/2017 6:29:01 PM)

It will give you the merge result changeset based on the starting date. Later you can use the result changeset for a "cm diff" command and check if the item is involved in the merge.

What do you think?

Share this post


Link to post
Share on other sites

Yes; I'm working on similar queries to get the changesets. That helps; also i just checked my Jenkins job log it is using the similar format to find the difference. 

I have another question: Will the triggers really impact the performance of Plastic; say if I create a trigger on every check-in operation ?

Thank you.,

Share this post


Link to post
Share on other sites

Hello @Gowrish,

triggers will affect only the operation in progress, the rest of user will not notice it. It' not an overhead for Plastic.

On the other hand you'll need to carefully think what your trigger is going to do. If it's going to be something that is going to take some time then you may want to start a different process to let the Plastic SCM operation finish. If you are going to be checking a couple of strings or a few API requests then you will be fine.

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

×