1. Aleš Vojáček
  2. PowerBuilder
  3. Saturday, 13 November 2021 18:22 PM UTC

Hi all,

I currently have some projects builded on TeamCity using autobuild and in latest PBAutobuild version everything works, but I have one question.

We have our sourcecode in GtiHub repos, there is GitVersion utility which can generate version numbers (we are using them in .NET projcet for version numbering in our .NET projects) 

Is there some way how to include env variables in json used for build with pbautobuild? Or is there some other way how to do automatic version numbering using pbautobuild?

 

Thank you Ales 

Patrice Domange Accepted Answer Pending Moderation
  1. Friday, 15 April 2022 14:02 PM UTC
  2. PowerBuilder
  3. # 1

Hello Arthur Hefti,

Can you provide a sample of the the script you are using  (Gitlab runner, maven, etc.) ?

I'm actually trying to implement PBAUTOBUILD210 with GITLAB, but it seems I'm missing something because it does not seems to work...

Thanks in advance,
Patrice

 

Comment
  1. Arthur Hefti
  2. Monday, 18 April 2022 03:57 AM UTC
Hi

Scripts are quite complex. Let us know what's not working or what the problem is.
  1. Helpful
There are no comments made yet.
Arthur Hefti Accepted Answer Pending Moderation
  1. Monday, 15 November 2021 13:34 PM UTC
  2. PowerBuilder
  3. # 2

Hi

We use gitlab runner together with Maven to change the JSON Build file for target folders and build numbers before running PBAutoBuild. Maybe TeamCity supports something similar.

Regards
Arthur

Comment
  1. Aleš Vojáček
  2. Monday, 15 November 2021 17:37 PM UTC
You are using gitlab runner to build PB apps? Or only to prepare files which are checked out on build server?

I did not look into gitlab build system, may be that now it is time to do so :-)

Best regards Ales
  1. Helpful
  1. Arthur Hefti
  2. Tuesday, 16 November 2021 04:14 AM UTC
We're using GitLab runner together with GitLab to build an installation package containing a PB Client application and a Java Server application. The GitLab runner configuration defines the various steps to perform. It calls some source control action, batch scripts, Maven and PBAutBuild.

We used to have Jenkins as build system before moving the sources to GitLab.

We use Independent of the build system Maven to copy and change build scripts, e.g. setting versions numbers in the PBAutoBild json.
  1. Helpful 1
There are no comments made yet.
Ken Guo @Appeon Accepted Answer Pending Moderation
  1. Monday, 15 November 2021 07:18 AM UTC
  2. PowerBuilder
  3. # 3

Hi Ales,

JSON in PBAutobuild currently does not support environment variables. We will record it as a new requirement. To better understand this requirement, could you tell us specifically how you need to use environment variables in JSON and give us some examples?

It would be very helpful for us if you could open a new ticket in the Appeon Support system and list this requirement in detail.

In addition, if GitVerison Utility supports Command Line, you can write GitVerison Utility to a bat file and it can be called in PBAutoBuild. Please refer to the link below for details:
https://docs.appeon.com/pb2021/pbug/ug58941.html#Executing_additional_commands 

Regards,
Ken

Comment
  1. Aleš Vojáček
  2. Monday, 15 November 2021 17:35 PM UTC
Hi,

GitVersion is commandline utility so, I can run that utility before PBAutobuild.

I can use workaround, so I can generate json file for PBAutobuild from template and do the versioning there.

But it would be nice if instead of

-----

"Version": {

"PropertiesDisplayedForExecutable": {

"ProductName": "Konzultace",

"CompanyName": "Prodata Praha s.r.o.",

"Description": "Konzultace - Prodata Praha s.r.o.",

"Copyright": "Prodata Praha s.r.o.",

"ProductVersion": "16.0.0.1",

"FileVersion": "16.0.0.1"

},

"ExecutableVersionUsedByInstaller": {

"ProductVersion": [

16,

0,

0,

1

],

"FileVersion": [

16,

0,

0,

1

]

}

}

-----

you can do something like this

"Version": {

"PropertiesDisplayedForExecutable": {

"ProductName": "Konzultace",

"CompanyName": "Prodata Praha s.r.o.",

"Description": "Konzultace - Prodata Praha s.r.o.",

"Copyright": "Prodata Praha s.r.o.",

"ProductVersion": "$ProdVersion",

"FileVersion": "$FileVersion"

},

"ExecutableVersionUsedByInstaller": {

"ProductVersion": [

$Ver_Major,

$Ver_Minor,

$Ver_Patch,

$Ver_Build

],

"FileVersion": [

$Ver_Major,

$Ver_Minor,

$Ver_Patch,

$Ver_Build

]

}

}



May be there are more use cases where other parts of json could be filled with env_vars, but file version is what I would like.





Best Regards Ales
  1. Helpful 1
  1. Ken Guo @Appeon
  2. Tuesday, 16 November 2021 06:45 AM UTC
Hi Ales,



Thank you for your feedback. I will submit your suggestions to the product team.



Regards,

Ken
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.