Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-22011

Rerunning a Bamboo build fails if the plans has "bamboo.planRepository.<position>.previousRevision" system variable

    XMLWordPrintable

Details

    Description

      Issue Summary

      If a plan in Bamboo is having "bamboo.planRepository.<position>.previousRevision" system variable and if you try to rerun a build, it will fail with an error

      This is reproducible on Data Center: (yes)

      Steps to Reproduce

      1. Define a plan in Bamboo with a simple script task and link any repository to this plan
      2. In the script task try to print the value of the variable using the below command
        echo ${bamboo.planRepository.previousRevision}
        
      3. Run the build for the first time, it will complete successfully
      4. Rerun the same build

      Expected Results

      • The build should complete successfully

      Actual Results

      • The build fails with the below exception
        /var/atlassian/application-data/bamboo/temp/SCRIP-TIC-JOB1-228-ScriptBuildTask-9328576534053004432.sh: 1: Bad substitution
        Failing task since return code of [/var/atlassian/application-data/bamboo/temp/SCRIP-TIC-JOB1-228-ScriptBuildTask-9328576534053004432.sh] was 2 while expected 0
        

      Workaround

      Workaround is to run a fresh build and the plan will successfully complete.

      Attachments

        Issue Links

          Activity

            People

              mgardias Marcin Gardias
              4f38d6bf51c0 Shashank Kumar
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: