1. Dana Morano
  2. PowerBuilder
  3. Tuesday, 15 January 2019

Hello - Up front - I/We are new to both GIT/GITLab and PB2017R3, However we have extensive experience with PB 12.5.2(and earlier)/TFS/PowerGen  - We are having difficulties with integrating GITLab CI/CD - basically, code changes made in a work space/project that are committed/pushed to the Gitlab Repository (which show up in ws_objects) then built via a pipeline on a GitRunner machine using the Stand Alone compiler are not showing up in the new executable.  We are trying to figure this all out - so questions:

I read that PB Git integration (R3)  no longer uses the .pbg - so how does the compiler know any more what needs to be included in the pbl? for instance when adding or deleting objects?

Do we have to copy all the source files in the ws-objects to the actual folders referenced in the pbt files?  

Do we have to upload the PBls?

How is does GIT build now with now without the .pbg(s)?

Basically the issue is that comitted and pushed changes and not being built into the exe.....help? 

 

 

Phil Wallingford Accepted Answer Pending Moderation
0
Votes
Undo

Hi Dana,

This is information I had sent you since about PowerGen and PBGs (they don't exist with Git/SVN integration) with PB2017 R3.  But information for others...

You can create Object List Files (OLFs) that conform to the Git/SVN directory structure.  These are like PBGs (they were "invented" here before PBGs), but can use wild cards, so they don't get out of sync as PBGs are prone to do.
 
Or, you can create PBGs (also that conform to the Git/SVN structure) based on your existing application.
 
These are both described in the PowerGen Help and 9.7 ReadMe.  But please contact us if you have further questions.
 
Phil
Comment
There are no comments made yet.
  1. Monday, 21 January 2019
  2. PowerBuilder
  3. # 1
Dana Morano Accepted Answer Pending Moderation
0
Votes
Undo

Thank you Danial - we'll investigate your suggestions - and yes an article outling this type of integration would be fantastic!

Comment
There are no comments made yet.
  1. Wednesday, 16 January 2019
  2. PowerBuilder
  3. # 2
Daniel Maak Accepted Answer Pending Moderation
2
Votes
Undo

Hi Dana,

hope my experiance helps... I have done a migration to GIT with Azure DevOps and I'm using the Appeon Autocompile feature (Orca script and pbc170.exe)

So PowerBuilder with Git requires that you add the PBL files only once. And for your project it is necessary that the PBL files are seperated in different subfolders(I will explain this in detail in a second). Now when you add your project to GIT, Powerbuilder will create a ws_objects folder at level of the Workspace file. 

Now I come to the server/CI part. On the server you can write an Orca script file to refresh the PBL from the source Code (here an example https://community.appeon.com/index.php/articles-blogs/tutorials-articles/2-powerbuilder/175-continuous-integration-with-powerbuilder-2017-bonobo-git-and-jenkins). And this is the point where it is necessary that all PBL file is in a seperate folder, because the Orca script will copy all the source code files (under the path of the pbl in the ws_objects folder) to the actual PBL and generate an PBG.

So

Do we have to copy all the source files in the ws-objects to the actual folders referenced in the pbt files?

- now the Orca script exe do it for you

Do we have to upload the PBls?

- yes, but only once. If you upload it again it will result in merge conflicts

How is does GIT build now with now without the .pbg(s)?

- Orca Script do it for you, after all files under the ws_object path are copied on the same level where the pbl is located

Basically the issue is that comitted and pushed changes and not being built into the exe.....help? 

- you need an orca script file that refresh the pbl files with the actual source code like 

start session
set debug true  
scc set connect property logfile "createpbls.log"  
scc connect offline   
scc set target "pfc_ci\pfc_ci.pbt" importonly  
scc exclude liblist "pbdom\pbdom170.pbd"   
scc refresh target 3pass  
scc close   
end session  

 

Hope this helps you !!!

Finding out how this works costs me 2 weeks. All the documentation is not on a level which a developer need...thats a pain/shame...sry...

Comment
If you could spare the time, it would be fantastic if you could write a short tech article on the Appeon community site to save others this time. I'm sure our Git users would really appreciate it.
  1. Armeen Mazda
  2. Wednesday, 16 January 2019
There are no comments made yet.
  1. Wednesday, 16 January 2019
  2. PowerBuilder
  3. # 3
Roland Smith Accepted Answer Pending Moderation
0
Votes
Undo

GIT won't create the PBL files, how are you doing that?

We use TFS and PowerGen runs in batch mode at night. Then in the morning I run a .bat file to copy the fresh PBL files to my laptop.

 

Comment
Roland writes:

GIT won't create the PBL files, how are you doing that?



We use TFS and PowerGen runs in batch mode at night. Then in the morning I run a .bat file to copy the fresh PBL files to my laptop.



Dana: Yes what you describe is similar to how we run in pb 12.5 today using TFS and Powergen - problem seems to be that running the PBC compiler expects a gen'd up to date pbl to build - but using GIT doesn't provide the mechanism to do that - I guess we may have to integrate powergen into it - but then there aren't any .pbg files anymore in a GIT environment. To be honest - i'm not sure I am liking the way the GIT integration works in PB2017 at this point.
  1. Dana Morano
  2. Tuesday, 15 January 2019
What you need is a utility app that will in batch mode read the target file and ws_objects folder structure and spit out .pbg files. Then you would use PowerGen to bootstrap the PBL files.
  1. Roland Smith
  2. Tuesday, 15 January 2019
There are no comments made yet.
  1. Tuesday, 15 January 2019
  2. PowerBuilder
  3. # 4
Roland Smith Accepted Answer Pending Moderation
0
Votes
Undo

If you don't get a better answer, you could connect your workspace to PBNative and do an Add to Source Control. Now you will have all the .sr* files and .pbg files in a folder structure that matches the folder structure of your target.

You can then do your PowerGen bootstrap build from there.

 

Comment
Hi roland - thanks for the answer - I don't understand how using PB native solves the git/CI CD build issue - sure this might work in a single user environment, however we have a large multi user/multi application environment and we are being asked to migrate to using GIT as the SCM Tool such that building and deployment occur on code check in. The issue truly is that commited changes made to the local git repository, pushed to the main git repository - then pulled down and built using pbc017.exe are not compiling those changes. You can plainly see them in the GIT central/server rpo - but they are not being built. i can see the changes in the .pbl.src folders - but they are not being built.
  1. Dana Morano
  2. Tuesday, 15 January 2019
There are no comments made yet.
  1. Tuesday, 15 January 2019
  2. PowerBuilder
  3. # 5
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.