|
|
- Re-create groups at Cirad
|
|
|
- For each group
|
|
|
- Transcribe group parameters
|
|
|
- Group Description
|
|
|
- Group Avatar
|
|
|
-
|
|
|
- For each project in Forgemia
|
|
|
- Export project and download export file (`Settings > General > Advanced`)
|
|
|
- Import project from file in Cirad (`New Project > Import > From GitLab export`)
|
|
|
- Transcribe project parameters that were not exported
|
|
|
- Projec avatar
|
|
|
- Project topics (tags and keywords) - no accents allowed in Cirad
|
|
|
- Deprecate the Forgemia repo
|
|
|
- Edit the project description to: `This repository moved to <url>`
|
|
|
- Archive the project (`Settings > General > Advanced > Archive project`)
|
|
|
- Update the URLs in the local repository
|
|
|
- Rename the old origin
|
|
|
|
|
|
```bash
|
|
|
git remote rename origin old-origin
|
|
|
```
|
|
|
- Declare the new remote repository and make sure it's up to date in all branches:
|
|
|
|
|
|
```bash
|
|
|
git remote add origin git@gitlab.cirad.fr:2022/astre/<projectname>.git
|
|
|
git push -u origin --all
|
|
|
git push -u origin --tags
|
|
|
```
|
|
|
- **If the project is a R package**
|
|
|
- Fix URLs in package files
|
|
|
|
|
|
```bash
|
|
|
sed -i 's/umr-astre\.pages\.mia\.inra\.fr/astre\.gitlab\.cirad\.fr/g' DESCRIPTION
|
|
|
sed -i 's/forgemia.inra.fr\/umr-astre/gitlab\.cirad\.fr\/astre/g' DESCRIPTION
|
|
|
sed -i 's/install_github("Cirad-ASTRE\/<projectname>")/install_gitlab("astre\/<projectname>", host = "gitlab.cirad.fr")/g' README.Rmd
|
|
|
```
|
|
|
- Update package web site
|
|
|
|
|
|
```bash
|
|
|
Rscript -e "pkgdown::build_site()"
|
|
|
```
|
|
|
- Push changes
|
|
|
|
|
|
```bash
|
|
|
git add .
|
|
|
git commit -m "Migrate to Cirad"
|
|
|
git push
|
|
|
```
|
|
|
- **If GitLab pages is enabled**
|
|
|
- Create a new tracking branch off `old-origin/main` (or `master`)
|
|
|
|
|
|
```bash
|
|
|
git checkout -b deprecate-forgemia --track old-origin/main
|
|
|
```
|
|
|
- Substitute the contents of `public/index.html` with:
|
|
|
|
|
|
```html
|
|
|
<!DOCTYPE html>
|
|
|
<!-- Generated by pkgdown: do not edit by hand --><html lang="en">
|
|
|
<head>
|
|
|
<meta http-equiv="Refresh" content="0; url='https://astre.gitlab.cirad.fr/<projectname>/'">
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
|
<meta charset="utf-8">
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
<title>Redirect to new website</title>
|
|
|
- </head>
|
|
|
<body>
|
|
|
- This site moved to <a href="https://astre.gitlab.cirad.fr/<projectname>/">https://umr-astre.pages.mia.inra.fr/<projectname>/</a>
|
|
|
- </body>
|
|
|
</html>
|
|
|
```
|
|
|
- Push changes
|
|
|
|
|
|
```bash
|
|
|
git add .
|
|
|
git commit -m "Migrate to Forgemia"
|
|
|
git push -f --set-upstream old-origin deprecate-github:master
|
|
|
```
|
|
|
- Revert to branch `main`
|
|
|
|
|
|
```bash
|
|
|
git checkout main
|
|
|
```
|
|
|
- **If alternative CI/CD systems (Travis-CI, Appveyor) are in use**
|
|
|
- Update the continuous integration systems of the repository |
|
|
\ No newline at end of file |