Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

Server name variable not being populated



  • I recently upgraded Build Master from version 4.9.7 to version 6.0.6 following the instructions according to the upgrade notes. After sorting a few issues I was able to make the new version work.

    However, there is an issue I cannot fix and don't know exactly what is happening. For some reason, the context variable $ServerName is not being populated with current server's name.

    On my deployment plan, one of the steps is to copy files from the source server to target servers. Files to be copied are stored in a folder named with the server name. Therefore, the path to the files on my deployment plan looks as follows:

    /builds/DevServers/$ServerName/WebApp

    During the execution of the plan I'm getting a 'file not found' error as Build Master is looking for the files on the following path:

    DEBUG: Copying files from: /builds/DevServers//WebApp

    I tried to find any documentation related to this issue but nothing has been written about this. The only solution I have found to solve this issue is to hard-code server's name.

    Hope you can help me with this.

    Thanks

    Gustavo

    Product: Build Master
    Version: 6.0.6

    Product: BuildMaster
    Version: 6.0.6



  • There are two ways to ensure that value is populated, either wrap the operation/plan in a general block, e.g.:

    for server MyServer
    {
       # ... Copy-Files...
    }
    

    or edit the pipeline stage target to target a specific server (which effectively wraps the whole plan in that block transparently).

    I am not sure how it could have worked before... it's possible that there was an implicit fallback to the local server (or server ID #1) in the v4 version.



  • Now I did see one version of BuildMaster (v6.0.5... maybe?) having some issue resolving $ServeRName, but it was fixed. Try upgrading to latest v6 as well...



Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation