Bamboo and PCT ANT

Posted by MBeynon on 09-Jan-2018 02:31

Hi,

I'm trying to configure a build for my project using our Bamboo server and a PCT ANT build script and I wondered if anyone on the forum has tried this? I did a search before writing this post but to no avail.

I can get my script to run on Bamboo but it breaks as soon as it hits the first compile statement that makes reference to my assemblies or ini file I get an error.

My ANT script uses a properties file. Here are two of the items in it;

assemblies=build\\assemblies
iniFile=build\\Compile.ini

And here is a part of my script that is failing;

  <property file="build.properties" prefix="prop" />
  <property environment="env" />
  <taskdef resource="PCT.properties" />
  <typedef resource="types.properties" />

..........

    <PCTCompile destDir="${prop.BUILD_RCODE}" forceCompile="${prop.forceCompile}"
                                              iniFile="${prop.iniFile}"
                                              assemblies="${prop.assemblies}"
                                              xcode="${prop.xcode}"
                                              noParse="${prop.noParse}"
                                              displayFiles="${prop.displayFiles}"
                                              graphicalMode="true"
                                              dlcHome="${prop.DLC}"
                                              tempDir="${prop.temp}"
                                              progPerc="${prop.progPerc}"
                                              stackSize="${prop.stackSize}"
                                              stopOnError="${prop.stopOnError}">

The error I get is;

BUILD FAILED
C:\BambooBuilds\PETL-PETL-JOB1\build\build.xml:120: java.lang.NullPointerException
        at com.phenix.pct.GenericExecuteOptions.setIniFile(GenericExecuteOptions.java:181)
        at com.phenix.pct.CompilationWrapper.setIniFile(CompilationWrapper.java:351)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

The Bamboo build folder structure is;

Bamboo BUILD FOLDER

-->build folder

  -->assemblies folder

    -->assemblies.xml

  -->Compile.ini

I've got the script working and building a library on my local PC but I'm really struggling with the Bamboo side of things. I'm sure it must be something quite simple that I've missed but I can't see the wood for the trees at the moment :-)

Thanks,

Mark.

Posted by Riverside Software on 09-Jan-2018 03:27

Please try with version 208, available on GitHub. Given your stack trace, the problem has been fixed in this new version.

All Replies

Posted by Mike Fechner on 09-Jan-2018 02:40
My guess is that the iniFile Parameter is wrong – or the variable is not set.
 
I’ve had similar unfriendly ways of telling me that also with the assemblies parameter.
 
Just <echo>${prop.iniFile}</echo> prior to the PCTCompile invocation to verify. Or run ANT with -v for verbose output.
Von: MBeynon [mailto:bounce-MBeynon@community.progress.com]
Gesendet: Dienstag, 9. Januar 2018 09:33
An: TU.OE.General@community.progress.com
Betreff: [Technical Users - OE General] Bamboo and PCT ANT
 
Update from Progress Community
 

Hi,

I'm trying to configure a build for my project using our Bamboo server and a PCT ANT build script and I wondered if anyone on the forum has tried this? I did a search before writing this post but to no avail.

I can get my script to run on Bamboo but it breaks as soon as it hits the first compile statement that makes reference to my assemblies or ini file I get an error.

My ANT script uses a properties file. Here are two of the items in it;

assemblies=build\\assemblies
iniFile=build\\Compile.ini

And here is a part of my script that is failing;

  <property file="build.properties" prefix="prop" />
  <property environment="env" />
  <taskdef resource="PCT.properties" />
  <typedef resource="types.properties" />

..........

    <PCTCompile destDir="${prop.BUILD_RCODE}" forceCompile="${prop.forceCompile}"
                                              iniFile="${prop.iniFile}"
                                              assemblies="${prop.assemblies}"
                                              xcode="${prop.xcode}"
                                              noParse="${prop.noParse}"
                                              displayFiles="${prop.displayFiles}"
                                              graphicalMode="true"
                                              dlcHome="${prop.DLC}"
                                              tempDir="${prop.temp}"
                                              progPerc="${prop.progPerc}"
                                              stackSize="${prop.stackSize}"
                                              stopOnError="${prop.stopOnError}">

The error I get is;

BUILD FAILED
C:\BambooBuilds\PETL-PETL-JOB1\build\build.xml:120: java.lang.NullPointerException
        at com.phenix.pct.GenericExecuteOptions.setIniFile(GenericExecuteOptions.java:181)
        at com.phenix.pct.CompilationWrapper.setIniFile(CompilationWrapper.java:351)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

The Bamboo build folder structure is;

Bamboo BUILD FOLDER

-->build folder

  -->assemblies folder

    -->assemblies.xml

  -->Compile.ini

I've got the script working and building a library on my local PC but I'm really struggling with the Bamboo side of things. I'm sure it must be something quite simple that I've missed but I can't see the wood for the trees at the moment :-)

Thanks,

Mark.

View online

 

You received this notification because you subscribed to the forum.  To stop receiving updates from only this thread, go here.

Flag this post as spam/abuse.

 
Posted by Riverside Software on 09-Jan-2018 02:45

Which version of PCT ?

Posted by MBeynon on 09-Jan-2018 03:13

PCT Version : jenkins-QA-PCT-206

Posted by MBeynon on 09-Jan-2018 03:25

It does look to be correct;

[echo] build\Compile.ini

[echo] build\assemblies

Posted by Riverside Software on 09-Jan-2018 03:27

Please try with version 208, available on GitHub. Given your stack trace, the problem has been fixed in this new version.

Posted by MBeynon on 09-Jan-2018 04:20

Thanks, that's fixed the error. I just need to sort out the paths now as ANT can't seem to find my assemblies!

Posted by MBeynon on 09-Jan-2018 05:42

It's now working! Thanks everyone for your help - much appreciated :-)

Mark.

This thread is closed