TMatthews
TMatthews

Reputation: 3

Jenkins VB6 build failures

I'm trying to automate the build of a very old VB6 app. It consists of many projects and solutions all built by a succession of batch files. I've removed all the interactive pieces such as pauses and dialog boxes resulting from build failures but still have problems.

Although projects are being built with a clean and then rebuild they often fail the first time and have to be rebuilt. Apparently that's par for the course with the team building manually also.

The other problem is Jenkins often just hangs up building one of the projects. Rerunning the build may proceed further or not as far before hanging up. These aren't build errors, it just kind of stops. I'm wondering if there are environment setting for jenkins batch files in terms of memory of such that I could try adjusting.

Any input of either of the issues is welcomed.

Upvotes: 0

Views: 863

Answers (1)

Mauricio Sanches
Mauricio Sanches

Reputation: 21

I had a similar problem when trying to compile a VB6 project by calling a batch file from Jenkins:

  • when executing the batch file from command prompt it runs fine (the vb6 project is compiled)
  • when executing the same batch file from Jenkins the vb6.exe process hangs and I need to kill it in order to Jenkins pipeline to proceed (and the vb6 project was not built)

It seems something related to the user context in which the vb6.exe process is executed when launched from within Jenkins Java process. In order to work (when executed from Jenkins) I have to use PsExec (from SysinternalsSuite) to launch the vb6, and pass all the parameters with absolute file paths.

Example of command line I used inside a batch (the batch is called from Jenkins bat pipeline step:

c:\tools\SysinternalsSuite\psexec -accepteula -nobanner -i -h "C:\Program Files (x86)\Microsoft Visual Studio\VB98\VB6.EXE" /m "C:\JenkinsWorkspace\test\build\myproject.vbp" /outdir "C:\JenkinsWorkspace\test\build\Release" /out "C:\JenkinsWorkspace\test\build\Release\build.log"

I have a pipeline job on a Jenkins main server on a Linux machine, launching a Jenkins agent on a Windows 2019 Server node, which in turn calls the batch file which compiles the vb6 project

Upvotes: 2

Related Questions