• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • 3.1.4, 3.2 M1, 3.2
    • None
    • None
    • None

      Under Configuration -> Builder -> Builder Configuration -> Argument, Bamboo will remove any quotes that are not in the beginning or at the end of the argument string. Examples:

      If the following is set in the Argument field:

      /project:"Master Project"
      

      Bamboo runs this:

      Starting to build 'TheProjectName - BuildPlanName'
      ... running command line: /bin/sh /test/test.bat "/project:Master Project"
      ... in : /Users/rbattaglin/SANDBOX/bamboo262-Home/xml-data/build-dir/PROJKEY-BUILDPLANKEY
      

      If the following is set in the Argument field:

      /project:\"Master Project\"
      

      Bamboo runs this:

      Starting to build 'TheProjectName - BuildPlanName'
      ... running command line: /bin/sh /test/test.bat "/project:\Master Project\"
      ... in : /Users/rbattaglin/SANDBOX/bamboo262-Home/xml-data/build-dir/PROJKEY-BUILDPLANKEY
      

      A workaround is to call the full command, builder and it's arguments from the another script (that would be called by Bamboo).

          Form Name

            [BAM-7265] Bamboo removes quotes from builder Argument field

            It should be backported to 3.1.x

            Przemek Bruski added a comment - It should be backported to 3.1.x

            A patched version of CommandBuildTask attached. This version does not remove quotes from the arguments.

            Marcin Gardias added a comment - A patched version of CommandBuildTask attached. This version does not remove quotes from the arguments.

            Hi It also looks like this is now also happening for commands executable arguemnents in Bamboo 3.1.

            This is really calusing problems now. Can we please off a hot fix at least for this.

            Thanks

            Gary

            Gary Howlett added a comment - Hi It also looks like this is now also happening for commands executable arguemnents in Bamboo 3.1. This is really calusing problems now. Can we please off a hot fix at least for this. Thanks Gary

            AntonA added a comment -

            When looking at this issue please have a look at BAM-8745 as well, as it could be the same thing.

            AntonA added a comment - When looking at this issue please have a look at BAM-8745 as well, as it could be the same thing.

            AntonA added a comment -

            Another manifestation of this:

            "C:\Program Files\IIS\Microsoft Web Deploy\msdeploy.exe" -verb:sync -source:contentPath="Default Web Site/AgencyService",computerName=srvdevquotes -dest:package=Backups/Build_17/backup_before_BuildNumber_17.zip -enableLink:AppPoolExtension -skip:objectName=filePath,absolutePath=log*

            (FYI: The above is on one line.)

            Is executed as:

            "C:\Program Files\IIS\Microsoft Web Deploy\msdeploy.exe" -verb:sync "-source:contentPath=Default Web Site/AgencyService,computerName=srvdevquotes" -dest:package=Backups/Build_17/backup_before_BuildNumber_17.zip -enableLink:AppPoolExtension -skip:objectName=filePath,absolutePath=log*

            (FYI: The above is also on one line.)

            The problem is with the argument:

            -source:contentPath="Default Web Site/AgencyService",computerName=srvdevquotes

            Which Bamboo incorrectly translates to:

            "-source:contentPath=Default Web Site/AgencyService,computerName=srvdevquotes"

            AntonA added a comment - Another manifestation of this: "C:\Program Files\IIS\Microsoft Web Deploy\msdeploy.exe" -verb:sync -source:contentPath="Default Web Site/AgencyService",computerName=srvdevquotes -dest:package=Backups/Build_17/backup_before_BuildNumber_17.zip -enableLink:AppPoolExtension -skip:objectName=filePath,absolutePath=log* (FYI: The above is on one line.) Is executed as: "C:\Program Files\IIS\Microsoft Web Deploy\msdeploy.exe" -verb:sync "-source:contentPath=Default Web Site/AgencyService,computerName=srvdevquotes" -dest:package=Backups/Build_17/backup_before_BuildNumber_17.zip -enableLink:AppPoolExtension -skip:objectName=filePath,absolutePath=log* (FYI: The above is also on one line.) The problem is with the argument: -source:contentPath="Default Web Site/AgencyService",computerName=srvdevquotes Which Bamboo incorrectly translates to: "-source:contentPath=Default Web Site/AgencyService,computerName=srvdevquotes"

            Marko Lahma added a comment - - edited

            We are now experiencing with at least NAnt builder that there are maybe extra quotes added. When we run target(s) that are defined in job as "clean build test" (without quotes) we get error from NAnt:

            Target 'clean build test' does not exist in this project.
            

            It seems to consider these arguments as single. I can reproduce this error by calling NAnt with all arguments in single quotes. The build log however does not show that any quotes are used with these.

            Edit (Krystian Brazulewicz):
            This problem was handled in BAM-8745

            Marko Lahma added a comment - - edited We are now experiencing with at least NAnt builder that there are maybe extra quotes added. When we run target(s) that are defined in job as "clean build test" (without quotes) we get error from NAnt: Target 'clean build test' does not exist in this project. It seems to consider these arguments as single. I can reproduce this error by calling NAnt with all arguments in single quotes. The build log however does not show that any quotes are used with these. Edit (Krystian Brazulewicz): This problem was handled in BAM-8745

            I've raised a support ticked BSP-4609.

            For example when calling MSBuild with

            C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe /p:Configuration=Release;AssemblyBuildNumber=54;AssemblyFileBuildNumber=54;WixBuildNumber=54 /t:Build DataFlowAgent.sln

            This now fails where as with 3.0.3 this worked fine. Is this related? I dont know.

            Regards

            Gary

            Gary Howlett added a comment - I've raised a support ticked BSP-4609. For example when calling MSBuild with C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe /p:Configuration=Release;AssemblyBuildNumber=54;AssemblyFileBuildNumber=54;WixBuildNumber=54 /t:Build DataFlowAgent.sln This now fails where as with 3.0.3 this worked fine. Is this related? I dont know. Regards Gary

            Could you give an example of a command line that does not work as expected?

            Przemek Bruski added a comment - Could you give an example of a command line that does not work as expected?

            Im also seeing some strange going ons with the new bamboo version 3.1 - On builder aka executables the command arguments passed is not whats being called on the command.

            Something is definatly not quite right in the new 3.1 bamboo server.

            Gary Howlett added a comment - Im also seeing some strange going ons with the new bamboo version 3.1 - On builder aka executables the command arguments passed is not whats being called on the command. Something is definatly not quite right in the new 3.1 bamboo server.

            In Bamboo 3.0.1 - I am seeing the same thing happening with Maven 2 goal parameters. It changes:

            /usr/share/maven2/bin/mvn -Djava.io.tmpdir=/opt/atlassian-bamboo/temp/REVACTIVESPRINT-CRSACCEPTANCETEST-JOB1 -Dmaven.repo.local=/home/bamboo/.m2/repository_current_sprint -DENV=dev -DcmdLineArg"=-Dnum=123 -Dkey='val'" --batch-mode clean install

            Into this (look how the double quote moves before -DcmdLineArg):

            /usr/share/maven2/bin/mvn -Djava.io.tmpdir=/opt/atlassian-bamboo/temp/REVACTIVESPRINT-CRSACCEPTANCETEST-JOB1 -Dmaven.repo.local=/home/bamboo/.m2/repository_current_sprint -DENV=dev "-DcmdLineArg=-Dnum=123 -Dkey='val'" --batch-mode clean install

            My work around was to put the value I was trying to set for -DcmdLineArg as an environment variable and then passing it to the command line variable.

            Allen

            Allen Servedio added a comment - In Bamboo 3.0.1 - I am seeing the same thing happening with Maven 2 goal parameters. It changes: /usr/share/maven2/bin/mvn -Djava.io.tmpdir=/opt/atlassian-bamboo/temp/REVACTIVESPRINT-CRSACCEPTANCETEST-JOB1 -Dmaven.repo.local=/home/bamboo/.m2/repository_current_sprint -DENV=dev -DcmdLineArg"=-Dnum=123 -Dkey='val'" --batch-mode clean install Into this (look how the double quote moves before -DcmdLineArg): /usr/share/maven2/bin/mvn -Djava.io.tmpdir=/opt/atlassian-bamboo/temp/REVACTIVESPRINT-CRSACCEPTANCETEST-JOB1 -Dmaven.repo.local=/home/bamboo/.m2/repository_current_sprint -DENV=dev "-DcmdLineArg=-Dnum=123 -Dkey='val'" --batch-mode clean install My work around was to put the value I was trying to set for -DcmdLineArg as an environment variable and then passing it to the command line variable. Allen

              pstefaniak PiotrA
              rbattaglin Renan Battaglin
              Affected customers:
              10 This affects my team
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: