Remote directory per Jenkins job build

Sysprogs forums Forums VisualGDB Remote directory per Jenkins job build

Tagged: ,

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #34480
    Assaf Katz
    Participant

    Hello,

    I am interested in running a Jenkins build with concurrent builds. The build includes VisualGDB with a Linux target, and it will be executed on the same Linux server for all builds. To achieve this, I would like to create a separate directory for each build. Is there a way to utilize a remote directory that incorporates both the name and the build number?

    Thank you.

    #34482
    support
    Keymaster

    Hi,

    Sure, VisualGDB expands the Windows environment variables the same way it does for internal variables like $(ProjectDir). So you could update your Jenkins script to set a variable (e.g. BuildNumber) and then use $(BuildNumber) in the remote directory path in VisualGDB Project Properties.

    #34490
    Assaf Katz
    Participant

    Hello,

    Sure, is there a way to set the default value to another variable? Additionally, can it be used in a user file? My intention is to utilize /home/${user} when executed from the user interface and /tmp/${build_name}/${build_number} when executed from Jenkins.

    Thank you.

    #34504
    support
    Keymaster

    Hi,

    Sure, you can use the per-user variables as shown below

    • Set the default value to the normal location.
    • Try redefining it for your own user account and check the <Project>-<Configuration>.vgdbsettings.<User name>.user file where VisualGDB would store the per-user value.
    • Update the Jenkins build script to generate a similar .user file (with the user account name used by Jenkins, try “echo %USERNAME%” if not sure) with the correct per-build value.

    If you are not planning to use any other per-user settings, you can also use the following syntax when generating the .user file (instead of XML):

    #comment
    VariableName1 := VariableValue1
    VariableName2 := VariableValue2
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.