Administering portfolios
A portfolio is a set of projects within an enterprise that enables an aggregate view of their state through various lenses, including releasability, security, reliability, and maintainability.
Creating a portfolio
With the Create Portfolio permission (set at the enterprise level), you can create portfolios in your enterprise. As the portfolio creator, you have complete control over the new portfolio.
To create a portfolio:
- In the top navigation bar of your SonarCloud interface, go to My Portfolios and select your enterprise in the menu. The Portfolios page of your enterprise opens.
- In the top right corner of the page, select Create Portfolio. The Create a portfolio dialog opens.
- Enter the portfolio name and description.
- Select Create. The portfolio is created. You can now add projects to the portfolio and manage the portfolio permissions (see below).
Adding/removing projects to/from a portfolio
With the Edit permission on a portfolio, you can add and remove projects to/from it. Note that you don't add a project, but a long-lived branch within a project. Currently, you can only add a single branch per project.
Proceed as follows:
- In the top navigation bar of your SonarCloud interface, go to My Portfolios and select your enterprise in the menu. The Portfolios page of your enterprise opens.
- On the page, select the portfolio.
- Go to Settings > Portfolio Definition.
- Select Add projects (if your portfolio is empty) or Edit selection (otherwise). The Add projects page opens.
- Under Organizations, select an organization whose projects you want to add/remove. Its projects are listed under Projects.
Alternatively, use the search field to retrieve projects by name. - Under Projects, select or unselect a project to add/remove it to/from the portfolio.
- If the selected project contains several long-lived branches, select the branch to be added (by default, the main branch is selected).
- Select Save.
Setting the portfolio permissions
With the Administer permission on a portfolio, you can set the permissions of the enterprise members on this portfolio. Portfolio permissions are:
- View: can view the portfolio's Overview and Portfolio Breakdown pages. On the Breakdown page, users can only view the projects they have access to (Browse permission).
- Edit: can change the portfolio definition (add or remove projects to/from the portfolio) and can delete the portfolio. Users can only add or remove projects they have access to (Browse permission).
- Administer: can change the portfolio permissions.
To set the enterprise members' permissions on a portfolio:
- In the top navigation bar of your SonarCloud interface, go to My Portfolios and select your enterprise in the menu. The Portfolios page of your enterprise opens.
- On the page, select the portfolio.
- Go to Settings > Permissions.
Deleting a portfolio
With the Edit permission on a portfolio, you can delete this portfolio. Proceed as follows:
- In the top navigation bar of your SonarCloud interface, go to My Portfolios and select your enterprise in the menu. The Portfolios page of your enterprise opens.
- On the page, select the portfolio.
- Go to Settings > Delete portfolio.
Related pages
- Viewing portfolios
This page explains the portfolio metrics and how to view a portfolio and portfolio breakdown. - Managing the enterprise-related permissions in Managing your enterprise
This section is directed at the enterprise admin and explains how to grant the Create Portfolios permission.
Was this page helpful?