Sysprogs forums › Forums › VisualGDB › Integrating VisualGDB build with Jenkins
Tagged: Command line, Jenkins integration, MSBuild
- This topic has 5 replies, 3 voices, and was last updated 2 years, 9 months ago by support.
-
AuthorPosts
-
July 6, 2020 at 14:13 #28684brillo372Participant
Hi,
On a Windows 10 machine using Visual Studio 2019 and VisualGDB 5.5.4.3540 I am able to successfully build our project from Visual Studio in both release and debug mode. Furthermore, using msbuild, I am able to successfully build the release build from the command line on the same machine. However when I go to integrate it with Jenkins (using the exact same machine that worked), I am experiencing the following error using the same command line arguments:
<pre class=”console-output”><proj-name>.vcxproj” on node 1 (rebuild target(s)).
<span class=”error-inline”>C:\Program Files (x86)\Sysprogs\VisualGDB\MSBuild\SysprogsPlatform.targets(96,2): error : No toolchain found. Please configure the toolchain via VisualGDB Project Properties. [c:\jenkins\workspace\tito-trunk\products\jackson\tito\blimage\visualgdb\bl_tito_iMXRT1064.vcxproj]
</span>Done Building Project “c:\<path>\<proj-name>.vcxproj” (rebuild target(s)) — FAILED.Build FAILED.
I’ve attempted the following same command line arguments that worked fine on the command line:
The build is based on msbuild just like Visual Studio projects for Windows.
To build from the command line, the following steps must be executed:1) Open a cmd.exe window (console)
2) Execute VsDevCmd.bat to establish environment variables which msbuild needs:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat3) Run msbuild:
For the bootloader image:msbuild -nologo -verbosity:minimal -target:rebuild -property:Configuration=Release;Platform=VisualGDB <your-path>\<proj-name>.vcxproj
For the application image:
<p class=”console-output”>msbuild -nologo -verbosity:minimal -target:rebuild -property:Configuration=Release;Platform=VisualGDB <your-path>\<proj-name>.vcxproj</p>
I’ve got to be overlooking something very subtle and appreciate any thoughts in advance!- This topic was modified 4 years, 4 months ago by brillo372.
July 6, 2020 at 14:16 #28686supportKeymasterHi,
Looks like the Jenkins machine is missing VisualGDB toolchain definitions. This is very similar to the issue discussed in this thread, so the workarounds described there should work.
If not, please let us know more details and we will help.
July 8, 2020 at 15:03 #28714brillo372ParticipantThanks for this! It turned out that I needed to make some ENV variables known to the Windows Jenkins Node. Specifically (and for the sake of others who might experience something similar):
BSP_ID
BSP_ROOT
BSP_VERSION
TOOLCHAIN_ROOT
ToolchainID
ToolchainVersion
VISUALGDB_DIR
July 9, 2020 at 09:29 #28722supportKeymasterNo problem and thanks for the update. Just a quick clarification from our side: normally the ID/Version variables would be set inside the project file and the _ROOT and _DIR variables would be computed inside the %LOCALAPPDATA%\VisualGDB\FindXXX.props files that are managed by VisualGDB. So deploying these files to the build machine should get the variables working automatically.
You can find more details on this in our TFS tutorials here: https://visualgdb.com/w/tutorials/tag/tfs/
February 23, 2022 at 09:45 #32305ranwaParticipantHi ,
Where do I find the values of the following ENV :
BSP_ID
BSP_ROOT
BSP_VERSION
TOOLCHAIN_ROOT
ToolchainID
ToolchainVersion
VISUALGDB_DIR
I need help integrating VisualGDB to Jenkins
February 23, 2022 at 16:17 #32307supportKeymasterIt generally depends on your project type. Normally, if you have VisualGDB and the toolchains/BSPs installed on the build server (same user account as used by Jenkins), you do not need to specify them manually.
You can find several tutorials showing how to use VisualGDB with CI/CD systems here: https://visualgdb.com/w/tutorials/tag/tfs/
-
AuthorPosts
- You must be logged in to reply to this topic.