I want to understand the difference between projects and subgroups in GitLab.
Please help me on understanding the above.
Project
A project manages one git repository and adds an issue tracker, a wiki, etc:
See: https://docs.gitlab.com/ee/user/project/index.html#doc-nav
Groups
Groups can be used to combine several projects under one topic. Examples:
You could put all your JavaScript projects in a group called "js"
You could create one group for each of your developer teams; then if somebody new joins a team, you can just add them to the group instead of having to grant developer access for every project.
Groups can be referred in issues or commit discussions.
See: https://docs.gitlab.com/ee/user/group/index.html#doc-nav
Different groups may have different permissions
Subgroups
Subgroups are only available in GitLab 9 and above; they allow you to create additional groups inside of groups, e.g. "js/frontend"; this is useful if you are working on a large project with several sub-projects. See the official documentation for some examples:
https://docs.gitlab.com/ee/user/group/subgroups/index.html
Related
we are migrating from self hosted gitlab to gitlab.com subscription. We have parent 28 group and under these groups there are multiple subgroups and projects.
I know I can export one group and it will export all the subgroups under it and then I can import it.
but documentation says to export/import single project at a time. I have almost 3000+ Projects and doing this things 3000+ time is not possible.
Can you please suggest me How can I export/import all the projects under a group regardless it is in a group or under someother subgroup in hierarchy ?
or is there any other way ?
You will need to write scripts that interact with the GitLab API to perform the migration of groups/orgs, projects, branches, and merge requests. See the following post on GitLab's forum for guidance.
I am setting up a on premises instance of Azure DevOps 2019 and have read over the guide for planning the organizational structure. In our situation, having a single organization and several projects and teams seems to be the most appropriate structure.
The question I have is in a situation where people have small utility programs they have written to help with their day to day tasks, where should I have them have place their code. In this situation, it may not pertain to a certain project and I feel like creating projects for every individual user that wants their own little playground to put code would be messy.
Is there a way I can have a project where users can have their own little area of repositories for their use and not see all other people's repositories in that project and therefore not look so cluttered?
Is there some better way to give users their own area to have repositories for their own use without cluttering up projects?
You can create a new project to place the repositories of the developers.
You change the repositories permission settings to achieve users can only view their own little area of repositories for their use and not see all other people's repositories in that project. See below:
1, Set the permission on All Repositories Level
Go to project settings of the project--> Repositories under Repos-->Permissions under All Repositories-->Search for the users in the search bar-->Change his permission to Not set or Deny
By denying this user's permission on the All repositories level, so that he willnot be able to see other people's repositories in that project
2, Set the permission on Single Repository Level
Go to project settings of the project--> Repositories under Repos-->Select the repository of this user-->Permissions tab-->Search for the user in the search box-->Set the permission to allow for the user his own repository(override the permission set on above All Repositories level).
By doing above two steps. Users will only be able to view their own repositories on the project portal.
I agree common code or small utilities should reside separately apart from project code base. You can make a new project like CommonScripts or any name then the user can create a separate repository and maintain there own code or utility.
Advantage of doing that other person or multiple project can access that common piece of library in pipeline if required without doing code redundancy.
As an example in our organization we have project name called DevOps then we have separate repositories accordingly.
How to transfer the repository or a whole set of repositories from one gitlab group to another subgroup. For example companyname.gitlab.com/team one/. To gitlab.com/team_first/phase1/
The repositories/projects themselves still need to be exported by API, one by one.
But the new "Group Import/Export " feature from GitLab 13.0 (May 2020) can be a welcome addition.
Export and Import Groups in the UI
Previously, users could only migrate groups by using the Export/Import API to create an Export file, then using the API a second time to upload the file to the target instance.
As a first step toward a more frictionless solution, we have enabled Group Export in the GitLab UI.
We plan to introduce similar Import functionality to the UI within the next few weeks.
See documentation, issue and Epic.
See GitLab 14.2 (August 2021)
Group Migration achieves parity with group import/export
The new GitLab Migration feature can now migrate an entire group with all its subgroups and related data. The data migrated includes everything contained in group exports, making this a much easier way to migrate entire groups.
The pre-existing group import/export is a two-step process that requires exporting a file and then importing it into another GitLab instance.
Now, users can initiate a group migration with a single click. Migration also includes all the subgroups and their data, which previously required separate export and import processes for each subgroup.
See Documentation and Epic.
See GitLab 15.6 (November 2022)
Associate MRs to issues when migrating groups with projects
When migrating groups using GitLab Migration, GitLab now preserves associations of imported merge requests to issues.
This populates the Related merge requests section
on the issue details page.
See Documentation and Issue.
I have just a single instance of jenkins on a local machine which we are using to build our code. We have different project teams working on different projects, and different jobs for each project.
To eliminate the possibility of someone from one team accidentally messing up another team's job, i have created multiple jenkins users.
However, all of the users that can log on still see all of the jobs. Is there a way for certain users to only see the jobs that pertain to them?
I have searched extensively for something like this but no luck. I haven't found any plugins for this. I am using matrix based security currently, and although you can change the permissions of all the users through this, you can not apply specific permissions to specific jobs. At least to my knowledge. Any ideas?
Just to clarify, I want one of the many teams to log in to their user account in jenkins, and only see their jobs. The jobs of the other teams should not be visible, only the ones that they are assigned should be visible when they log on
The closest thing i have found for this is in the Role Strategy Plugin, there is a user-based job filter
Turns out there is a feature already in jenkins for this, no plugins necessary!
In the Configure Global Security section in Manage Jenkins, click "Project-based matrix authorization strategy".
Then you can configure permissions in the job configure screen for that particular job by clicking "enable project-based security".
Now you can configure your Jenkins so that "Joe can access project A, B, and C but he can't see D".
I'm working in a company using one Mantis bug tracker hosting several projects.
The project I am working on needs specific statuses and I don't want these to be seeable in other project pages.
I see in the doc how to add a status but they seem to be global and not project specific.
The only way I see how to do it is to add global states and remove them from all other projects' workflows.
Do you know if (and how) it is possible to add project specific workflows ?
Thanks :)
Almost everything you can set in config_inc.php can also be defined in the database, either globally (all projects) or for specific projects.
You can do this using the Manage | Manage Configuration | Configuration Report page; at the bottom of the page, a section lets you define custom config options. Define the enums as appropriate and described in the documentation (you should still define the translations globally, including all valid values in the string)
To set a custom workflow, just set your current project as appropriate and use the Manage | Manage Configuration | Workflow Transitions to define it.