-
Notifications
You must be signed in to change notification settings - Fork 30
[tre] add initial code management docs #251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
rkm
wants to merge
7
commits into
main
Choose a base branch
from
shs-git-docs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 3 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
c8f6e7c
initial gitea docs
rkm 3d9b14c
initial gitea docs
rkm 1d4de90
add info on cloning repositories
rkm 346190d
clarify mirroring
rkm 755facc
add mermaidjs plugin
rkm 5a6e1bc
update gitea docs and add diagram
rkm ea23ad3
drop invalid line
rkm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
69 changes: 69 additions & 0 deletions
69
docs/safe-haven-services/code-management-mirroring-service.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# \[Beta] TRE Code Management and Mirroring Service | ||
|
||
!!! warning "Beta Service" | ||
This service is in early development, and the content of this page may change significantly. Please provide all feedback to your IG team. | ||
|
||
The Code Management and Mirroring Service provides Researchers and IG teams with access to a platform similar to GitHub for managing code inside the TRE. Automatic inbound mirroring of external code repositories is also available if permitted by the IG team. | ||
|
||
A separate instance of the service is available to each TRE tenancy, and each instance is accessible only within the tenancy it is deployed to. | ||
|
||
!!! note "Availabilty" | ||
This service is an add-on to the base tenancy offering, and so may not be available to all TRE users. Please enquire with your IG team to determine if it is available to you. | ||
|
||
## Overview | ||
|
||
The service is based on the [Gitea](https://about.gitea.com/) collaborative version control system, which offers many of the same features as GitHub and GitLab. Some restrictions, such as the ability to freely create repositories, are in place in order to ensure separation of project data as per IG requirements. | ||
|
||
Available features include: | ||
|
||
- Software version control | ||
- Pull and push while inside the TRE | ||
- Bug and issue tracking | ||
- Pull Requests | ||
- Code review | ||
- Wikis | ||
|
||
This page provides information on accessing and using the service, however is not intended as a guide to Gitea. Please see Gitea's own [documentation][gitea_docs] for general usage information. It is also assumed that users are familiar with git and the use of version control services. | ||
|
||
## Access | ||
|
||
Access must be requested from your Research Coordinator (RC). On being granted access, you will be provided with the following information: | ||
|
||
- Gitea URL | ||
- Username | ||
- Initial Password | ||
|
||
Gitea can be accessed from your VM desktop by opening a Web Browser and navigating to the provided URL. After logging in for the first time, you will be prompted to change your password. | ||
|
||
Once logged-in, you will be presented with a dashboard showing recent activity in your organization. In Gitea, an "organization" is analagous to a project group, and you will be automatically granted access to the organization matching your TRE project identifier. | ||
|
||
## Request a Repository | ||
|
||
To request the creation of a repository in your organization, contact your RC and let them know the desired name. Multiple repositories may be created under each organization. | ||
|
||
Once created, your repository will be visible from your Gitea dashboard or under the "Explore" tab. | ||
|
||
!!! note "Repository Permissions" | ||
All members of an organization (TRE project) have full read/write access to each of its repositories, regardless of who requested its creation. This is the intended behaviour and will not be changed e.g., to restrict repository access to a subset of a TRE project's members. This is equivalent to the files in each `/safe_data/<project_id>` directory being accessible to all project members. | ||
|
||
## Clone a Repository | ||
|
||
SSH access is not enabled, so HTTPS must be used to clone repositories. | ||
|
||
When running `git clone`, `git fetch`, and `git push`, you will be prompted for your Gitea username and password each time. For convenience, you may wish to generate an access token to avoid re-entering your credentials on each operation. To do this: | ||
|
||
1. Click your profile picture in the top right and then on Settings | ||
1. Click Applications in the sidebar | ||
1. Create a new token | ||
1. Enter a descriptive name | ||
1. Expand "Select permissions" and change "repository" to "Read and Write" | ||
1. Clone the repo using the token, for example `git clone https://<token>@<url>/<organization>/<repo>.git` | ||
|
||
## Further Reading and Help | ||
|
||
- The [Gitea docs][gitea_docs] are the best reference for using this service | ||
- Contact your IG team if you require and help accessing or using the service | ||
|
||
<!-- Links --> | ||
|
||
[gitea_docs]: https://docs.gitea.com/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Has this been decided, and is it something that we need to tell the users?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've fixed this now, as the type of mirrororing discussed in the design is an egress from the TRE. The design didn't actually cover automatic ingress mirroring, though that would be a straightforward extension.