Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-23217

Specify owner of cloned files in Pipelines builds

    XMLWordPrintable

Details

    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

    Description

      Problem Definition

      In Pipelines builds that run on Atlassian's infrastructure, the owner of the cloned files is always root even when using the run-as-user option.

      This may create issues for users who need the owner to be a different user. One use case is starting a container within the build container, where the user is not root. A volume is shared with this new container, so permissions problems arise when the owner of the cloned files is root.

      Suggested Solution

      Provide an option to users to specify the owner of the cloned files in a Pipelines build.

      Workaround

      If pipelines is the name of a user and a group in the Docker image used as a build container, it is possible to change ownership of the files in the Bitbucket clone directory to this user and group by using a command like the following in the bitbucket-pipelines.yml file:

      - sudo chown -R pipelines:pipelines /opt/atlassian/pipelines/agent/build
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            tboudale Theodora Boudale
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: