cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

Git repository for Windchill Customization

vlmadala
9-Granite

Git repository for Windchill Customization

I am setting up a GIT repository and creating a pipeline for Windchill . Customer is managing Customizations with SafeArea and Windchill has ThingWorx Navigate , Workers , Replica and all other Integrations. 

We are on github and using git hub action .

Requirement is to manage a pipeline for building and managing the code deployment from Dev -> Test -> Preprod -> Prod environment . 

 

Can you please help me with how to manage and create a pipeline? 

What should be my branching Stratergy ?

When CPS or next Upgrade happens, this master repository should server as main . 

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
avillanueva
22-Sapphire I
(To:vlmadala)

I am no means an expert here an am still learning but seeing as I have another developer, we needed to to step up our game (Bitbucket). I can answer a few things but I am sure the field will correct me were my approach is not best practice. 

 

My repo only has customized files and compiled class files (addressed below). I do not have xconf files there but have good control on them. I do not have the entire Windchill codebase in source control but rather what would go into wtSafeArea/siteMod, wtCustom, and some added Jar files.

 

Compilation occurs in Eclipse and is transferred to Dev/Prod via Bitbucket. I have been told I should recompile (build) at those locations and plan to do that since I ran into merge issues already in this area. Still learning here.

 

We create out feature branches off Development but since we do not have a test server yet, when ready, those feature branches are merged with Development, a Release branch is created off Dev and then merged with Master. I would assume you have some other branches in there based on your pipeline. 

 

As for CPS and Upgrades, I would follow PTC's strategy for applying CPS updates. The only thing you should be concerned with is files that PTC is updating that you might have edited or overwritten. Those are in the CPS release notes and should be  in either your ptcOrig or ptcMod folder under wtSafeArea. Obviously, you work up from Dev and test/validate the CPS against your customizations. If there are any conflicts, you'll need bug fixes to address those. 

 

For upgrades, I create a new repo for that version. So much may have changes and I revalidate customizations during the upgrade process. Ok, field, I am ready to be destroyed but more ready to learn and improve. Please enhance or fill in where needed.

View solution in original post

6 REPLIES 6
avillanueva
22-Sapphire I
(To:vlmadala)

I am no means an expert here an am still learning but seeing as I have another developer, we needed to to step up our game (Bitbucket). I can answer a few things but I am sure the field will correct me were my approach is not best practice. 

 

My repo only has customized files and compiled class files (addressed below). I do not have xconf files there but have good control on them. I do not have the entire Windchill codebase in source control but rather what would go into wtSafeArea/siteMod, wtCustom, and some added Jar files.

 

Compilation occurs in Eclipse and is transferred to Dev/Prod via Bitbucket. I have been told I should recompile (build) at those locations and plan to do that since I ran into merge issues already in this area. Still learning here.

 

We create out feature branches off Development but since we do not have a test server yet, when ready, those feature branches are merged with Development, a Release branch is created off Dev and then merged with Master. I would assume you have some other branches in there based on your pipeline. 

 

As for CPS and Upgrades, I would follow PTC's strategy for applying CPS updates. The only thing you should be concerned with is files that PTC is updating that you might have edited or overwritten. Those are in the CPS release notes and should be  in either your ptcOrig or ptcMod folder under wtSafeArea. Obviously, you work up from Dev and test/validate the CPS against your customizations. If there are any conflicts, you'll need bug fixes to address those. 

 

For upgrades, I create a new repo for that version. So much may have changes and I revalidate customizations during the upgrade process. Ok, field, I am ready to be destroyed but more ready to learn and improve. Please enhance or fill in where needed.

is there any git action file with self hosted runner to deploy the code in environment Branches?

 

rleir
17-Peridot
(To:vlmadala)

I think you need to start with simple steps.

You need a git client installed on the servers.

Your git directory structure will be the same as the Codebase directory structure (actually, one level higher than that so that you can also have bin and src).

When you are confident with git, you will be doing pushes and pulls for XML's and jsp's directly from the Codebase directories. The pipeline will be doing compiles under the src directory, with the resulting class files ending up in directories under Codebase.

The pipeline might need to manage the SafeArea directories too for backwards compatibility with the Customer's traditional processes.

The pipeline needs to call xconfmanager for properties changes. 

As you will have guessed, I am not doing that yet.  I will be starting with a duplicate tree of directories in the dev server, next to the Codebase tree. Then I can carefully change Codebase files, as I develop a pipeline.

A test plan is essential, and I am advocating for automated testing (not successful yet).

Talking of CPS upgrades from PTC: would you put each CPS into a git branch, then work on merging it into your git Main? So much to do, so little time.

 

 

avillanueva
22-Sapphire I
(To:rleir)

I had a great one on one with @jfelkins on this very topic. Already have most of what you listed done. Traditionally, I pushed all code into wtSafeArea (and RB extensions into wtCustom) then used installSiteChanges to push into codebase. A bit redundant for truly custom stuff but this is what happens when you layer on top of previous steps. 

With regard to CPS, JD took the specific version and CPS Jars and made a configuration for each combination. Using pipelines, they were able to execute building to each set. The Jars become a zip that is pulled, extracted and then referenced in compilation process. If you are writing code to multiple versions or need to validate to multiple CPS updates, it would make sense. In my case, it would help in that overlap period when I am upgrading my instances while doing development at the same time.

rleir
17-Peridot
(To:avillanueva)

Would like to see the thread with @jfelkins please!

(on a tangent: I wish it was easier to find my history in Community going back to last year.)

We also discussed this here: 

https://community.ptc.com/t5/Windchill/Windchill-Version-Control/m-p/912985/highlight/true#M76015

 

 

 

rleir
17-Peridot
(To:rleir)

And wtCustom of course

Top Tags