Difference between revisions of "Gitlab"
Jump to navigation
Jump to search
Torradeflot (talk | contribs) (Created page with "= Introduction = [https://about.gitlab.com/ Gitlab] is a Dev(Sec)Ops platform to handle all the elements in the software development life cycle. Main features: * Git reposit...") |
Torradeflot (talk | contribs) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | = Introduction = | + | == Introduction == |
[https://about.gitlab.com/ Gitlab] is a Dev(Sec)Ops platform to handle all the elements in the software development life cycle. | [https://about.gitlab.com/ Gitlab] is a Dev(Sec)Ops platform to handle all the elements in the software development life cycle. | ||
Line 13: | Line 13: | ||
− | = Official Gitlab documentation = | + | == Official Gitlab documentation == |
The official Gitlab documentation can be found here: https://docs.gitlab.com/ | The official Gitlab documentation can be found here: https://docs.gitlab.com/ | ||
Line 25: | Line 25: | ||
* [https://docs.gitlab.com/ee/user/project/web_ide/index.html Web IDE] | * [https://docs.gitlab.com/ee/user/project/web_ide/index.html Web IDE] | ||
* [https://docs.gitlab.com/ee/ci/yaml/ CI/CD .yaml file syntax reference] | * [https://docs.gitlab.com/ee/ci/yaml/ CI/CD .yaml file syntax reference] | ||
+ | |||
+ | |||
+ | == Best practices / recommendations == | ||
+ | |||
+ | === General rules === | ||
+ | |||
+ | * '''Make small and atomic changes''' Commit / push often. | ||
+ | * '''Use branches for dedicated/long developments''' | ||
+ | * '''Keep the main branch stable''' the tests should always pass (yes you should have tests!!) | ||
+ | * '''Write descriptive commit messages''' Avoid messages like “changes”, “test” or “.” | ||
+ | * '''Adopt a branching strategy''' [https://nvie.com/posts/a-successful-git-branching-model/ gitflow], trunk-based,... | ||
+ | * '''Do code reviews if possible''' Specially if working in a team | ||
+ | |||
+ | === Our contributions === | ||
+ | |||
+ | * '''Use git!!''' If you work alone or in a team, use it! | ||
+ | * '''Do not upload big binary files to a git repository''' Git is not for data, it is for code. If you still want to do it you can use git LFS (see above). | ||
+ | * '''Use .gitignore to track only relevant files''' [https://git-scm.com/docs/gitignore official docs] and [https://github.com/github/gitignore/tree/main some examples] | ||
+ | * '''Do not track jupyter notebooks (.ipynb)''' pair them with a script using [[JupyterHub#jupytext|jupytext]] | ||
+ | * '''Do not upload confidential data''' passwords, ssh keys, etc will be there forever |
Latest revision as of 11:07, 3 November 2023
Introduction
Gitlab is a Dev(Sec)Ops platform to handle all the elements in the software development life cycle.
Main features:
- Git repository management
- Software development planning
- Continuous Integration and Continuous Deployment (CI/CD)
The service can be accessed at [1] with your PIC account.
The groups inside gitlab are not synced with the LDAP groups, if you want to have access to some specific group or project in gitlab you have to request it through the application.
Official Gitlab documentation
The official Gitlab documentation can be found here: https://docs.gitlab.com/
Make sure that the documentation you are viewing applies to the Free (Community Edition) distribution and the version deployed at gitlab.pic.es. You can easily find the version number in the Help menu.
The official documentation can be overwhelming, here are some useful links:
Best practices / recommendations
General rules
- Make small and atomic changes Commit / push often.
- Use branches for dedicated/long developments
- Keep the main branch stable the tests should always pass (yes you should have tests!!)
- Write descriptive commit messages Avoid messages like “changes”, “test” or “.”
- Adopt a branching strategy gitflow, trunk-based,...
- Do code reviews if possible Specially if working in a team
Our contributions
- Use git!! If you work alone or in a team, use it!
- Do not upload big binary files to a git repository Git is not for data, it is for code. If you still want to do it you can use git LFS (see above).
- Use .gitignore to track only relevant files official docs and some examples
- Do not track jupyter notebooks (.ipynb) pair them with a script using jupytext
- Do not upload confidential data passwords, ssh keys, etc will be there forever