VCS Tasks do not work with SPECS defined plans when targeting a linked repository

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Low
    • 11.0.0, 10.2.4, 9.6.13
    • Affects Version/s: 9.6.0, 10.0.0, 10.1.0, 10.2.0
    • Component/s: VCS task
    • None
    • 1
    • Severity 3 - Minor

      Issue Summary

      VCS Tasks do not work with SPECS-defined plans when targeting a specific repository. The problem appears to be related to the way data is prepared from Bamboo Specs Java form for those tasks, which don't have native YAML support. 

      Steps to Reproduce

      1. Define a VCS task in specs yaml with a target repositoryID
      2.   - any-task:
              plugin-key: com.atlassian.bamboo.plugins.vcs:task.vcs.commit
              configuration:
                commitMessage: test
                selectedRepository: '688131'
              description: test 
      1. Execute the build 
      2. VCS task fails with:
        • "Repository id 688131 is invalid. Please reselect from the configuration screen."
      Additional Notes

      We confirmed the specs repository has 'access all repositories' enabled:

      We also confirmed the specs repository has access to the target repository that is being committed to during the (specs-defined) plan execution:

      We configured a plan on the UI with the vcs task (commit), which succeeds when running it. When converting to yaml, we see a similar YAML to the failing one:

      any-task:
            plugin-key: com.atlassian.bamboo.plugins.vcs:task.vcs.commit
            configuration:
              commitMessage: test
              selectedRepository: '688131'
            description: test 

      However, when we copy it to our yaml file, we continue to see the same error "Repository id 688131 is invalid. Please reselect from the configuration screen."

      Expected Results

      VCS Task to succeed when defining a target linked repository with specs YAML. 

      This forum suggests that it previously worked.

      Actual Results

      The below exception is thrown in the build plan

      "Repository id 688131 is invalid. Please reselect from the configuration screen."
      

      When viewing the tasks configuration on UI, the repository drop-down states 'No access to the repository'.

      Workaround

      1. Define script task in SPECS YAML to execute git commit push.
        Example:
         - script:
              interpreter: SHELL
              scripts:
              - |-
                cd repob
                echo '1234' >> test.txt
                git remote set-url origin https://admin:${bamboo.gitPassword}@linux-<REDACTED>/bitbucket/scm/proj/repob.git        
                git add test.txt
                git commit -m "adding test.txt modification"
                git push origin master  
      1. OR Convert YAML specs to Java Specs and use vcs tasks via anyplugin. Click here for details.

       

        1. image-2025-04-09-09-54-09-167.png
          162 kB
          Abhi Phull
        2. image-2025-04-09-09-55-48-766.png
          162 kB
          Abhi Phull
        3. image-2025-04-09-09-56-55-318.png
          78 kB
          Abhi Phull
        4. image-2025-04-09-09-57-46-257.png
          90 kB
          Abhi Phull

            Assignee:
            Alexey Chystoprudov
            Reporter:
            Abhi Phull
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: