GitHub ์์ ๊ฐ์ ธ์ค๊ธฐ ๋๊ตฌ๋ฅผ ์ฌ์ฉํ์ฌ GitLab์์ ๋ง์ด๊ทธ๋ ์ด์ ํ๋ ๊ฒ์ ๋ํ ์ ๋ณด
์๋ ์ง์นจ์ GitHub Actions Importer๋ฅผ ์ฌ์ฉํ์ฌ GitLab ํ์ดํ๋ผ์ธ์ GitHub Actions๋ก ๋ง์ด๊ทธ๋ ์ด์ ํ๋๋ก ํ๊ฒฝ์ ๊ตฌ์ฑํ๋ ๊ณผ์ ์ ์๋ดํฉ๋๋ค.
ํ์ ์กฐ๊ฑด
- GitHub Actions ์ํฌํ๋ก๋ก ๋ณํํ๋ ค๋ ํ์ดํ๋ผ์ธ ๋ฐ ์์ ์ด ์๋ GitLab ๊ณ์ ๋๋ ์กฐ์ง์ ๋๋ค.
- ๊ณ์ ๋๋ ์กฐ์ง์ ๋ํ GitLab personal access token์ ๋ง๋ค๊ธฐ ์ํ ์ก์ธ์ค ๊ถํ์ ๋๋ค.
- Linux ๊ธฐ๋ฐ ์ปจํ
์ด๋๋ฅผ ์คํํ๊ณ ํ์ํ ๋๊ตฌ๋ฅผ ์ค์นํ ์ ์๋ ํ๊ฒฝ์
๋๋ค.
-
Docker๊ฐ ์ค์น๋์ด ์คํ ์ค์ ๋๋ค.
-
GitHub CLI๊ฐ ์ค์น๋ฉ๋๋ค.
์ฐธ๊ณ ํญ๋ชฉ
GitHub Actions Importer ์ปจํ ์ด๋์ CLI๋ CI ํ๋ซํผ๊ณผ ๋์ผํ ์๋ฒ์ ์ค์นํ ํ์๊ฐ ์์ต๋๋ค.
-
์ ํ ์ฌํญ
๋ฐ์ดํฐ ๋ณ์ GitHub Actions Importer๋ฅผ ์ฌ์ฉํ์ฌ GitLab ํ์ดํ๋ผ์ธ์์ GitHub Actions๋ก ํ๋ก์ธ์ค๋ฅผ ์๋์ผ๋ก ๋ง์ด๊ทธ๋ ์ด์ ํ๋ ๋ฐ๋ ๋ช ๊ฐ์ง ์ ํ ์ฌํญ์ด ์์ต๋๋ค.
- ์๋ก ๋ค๋ฅธ ์ํฌํ๋ก์ฐ์ ์์ ๊ฐ ์๋ ์บ์ฑ์ ์ง์๋์ง ์์ต๋๋ค.
audit
๋ช ๋ น์ ์กฐ์ง ๊ณ์ ์ ์ฌ์ฉํ ๋๋ง ์ง์๋ฉ๋๋ค. ๊ทธ๋ฌ๋dry-run
๋ฐmigrate
๋ช ๋ น์ ์กฐ์ง ๋๋ ์ฌ์ฉ์ ๊ณ์ ๊ณผ ํจ๊ป ์ฌ์ฉํ ์ ์์ต๋๋ค.
์๋ ์์
ํน์ GitLab ๊ตฌ์ฑ์ ์๋์ผ๋ก ๋ง์ด๊ทธ๋ ์ด์ ํด์ผ ํฉ๋๋ค. ์ฌ๊ธฐ์๋ ๋ค์์ด ํฌํจ๋ฉ๋๋ค.
- ํ๋ก์ ํธ ๋๋ ๊ทธ๋ฃน ๋ณ์ ๊ฐ ๋ง์คํน
- ์ํฐํฉํธ ๋ณด๊ณ ์
์๋ ๋ง์ด๊ทธ๋ ์ด์ ์ ๋ํ ์์ธํ ๋ด์ฉ์ GitLab CI/CD์์ GitHub Actions๋ก ๋ง์ด๊ทธ๋ ์ด์ ์(๋ฅผ) ์ฐธ์กฐํ์ธ์.
GitHub Actions Importer CLI ํ์ฅ ํ๋ก๊ทธ๋จ ์ค์นํ๊ธฐ
-
GitHub Actions Importer CLI ํ์ฅ์ ์ค์นํฉ๋๋ค.
Bash gh extension install github/gh-actions-importer
gh extension install github/gh-actions-importer
-
๋ค์ ํ์ฅ์ด ์ค์น๋์ด ์๋์ง ํ์ธ:
$ gh actions-importer -h Options: -?, -h, --help Show help and usage information Commands: update Update to the latest version of GitHub Actions Importer. version Display the version of GitHub Actions Importer. configure Start an interactive prompt to configure credentials used to authenticate with your CI server(s). audit Plan your CI/CD migration by analyzing your current CI/CD footprint. forecast Forecast GitHub Actions usage from historical pipeline utilization. dry-run Convert a pipeline to a GitHub Actions workflow and output its yaml file. migrate Convert a pipeline to a GitHub Actions workflow and open a pull request with the changes.
์๊ฒฉ ์ฆ๋ช ๊ตฌ์ฑํ๊ธฐ
configure
CLI ๋ช
๋ น์ GitLab ๋ฐ GitHub Actions Importer๋ก ์์
ํ ๋ ์ ํ์ํ ์๊ฒฉ ์ฆ๋ช
๋ฐ ์ต์
์ ์ค์ ํ๋ ๋ฐ ์ฌ์ฉ๋ฉ๋๋ค.
-
GitHub personal access token (classic)์(๋ฅผ) ๋ง๋ญ๋๋ค. ์์ธํ ๋ด์ฉ์ ๊ฐ์ธ์ฉ ์ก์ธ์ค ํ ํฐ ๊ด๋ฆฌ์(๋ฅผ) ์ฐธ์กฐํ์ธ์.
์ด ํ ํฐ์๋
workflow
๋ฒ์๊ฐ ์์ด์ผ ํฉ๋๋ค.ํ ํฐ์ ๋ง๋ ํ ๋ณต์ฌํ๊ณ ๋์ค์ ์ฌ์ฉํ ์ ์๋๋ก ์์ ํ ์์น์ ์ ์ฅํฉ๋๋ค.
-
GitLab personal access token์ ์์ฑํฉ๋๋ค. ์์ธํ ๋ด์ฉ์ GitLab ์ค๋ช ์์์ Personal access tokens์ ์ฐธ์กฐํ์ธ์.
์ด ํ ํฐ์๋
read_api
๋ฒ์๊ฐ ์์ด์ผ ํฉ๋๋ค.ํ ํฐ์ ๋ง๋ ํ ๋ณต์ฌํ๊ณ ๋์ค์ ์ฌ์ฉํ ์ ์๋๋ก ์์ ํ ์์น์ ์ ์ฅํฉ๋๋ค.
-
ํฐ๋ฏธ๋์์ GitHub Actions Importer
configure
CLI ๋ช ๋ น์ ์คํํฉ๋๋ค.gh actions-importer configure
configure
๋ช ๋ น์ ์คํํ๋ฉด ๋ค์ ์ ๋ณด๋ฅผ ์ ๋ ฅํ๋ผ๋ ๋ฉ์์ง๊ฐ ํ์๋ฉ๋๋ค:- "์ด๋ค CI ๊ณต๊ธ์๋ฅผ ๊ตฌ์ฑํ๊ณ ์๋์?"์ ๋ํด ํ์ดํ ํค๋ฅผ ์ฌ์ฉํ์ฌ
GitLab
์(๋ฅผ) ์ ํํ๊ณ Space์ ๋๋ฌ ์ ํํ ๋ค์Enter๋ฅผ ๋๋ฆ ๋๋ค. - "Personal access token for GitHub"์ ์์ ๋ง๋ personal access token (classic)์ ๊ฐ์ ์ ๋ ฅํ๊ณ EnterEnter๋ค.
- โGitHub ์ธ์คํด์ค์ ๊ธฐ๋ณธ URLโ์ ๊ฒฝ์ฐ ์
๋ ฅ์ ๋๋ฌ ๊ธฐ๋ณธ๊ฐ(
https://github.com
)์ ์๋ฝํฉ๋๋ค. - "GitLab์ฉ ๋น๊ณต๊ฐ ํ ํฐ"์ ์์ ๋ง๋ GitLab personal access token์ ๊ฐ์ ์ ๋ ฅํ๊ณ Enter ํค๋ฅผ ๋๋ฆ ๋๋ค.
- "GitLab ์ธ์คํด์ค์ ๊ธฐ๋ณธ URL"์ GitLab ์ธ์คํด์ค์ URL์ ์ ๋ ฅํ๊ณ Enter ํค๋ฅผ ๋๋ฆ ๋๋ค.
configure
๋ช ๋ น์ ์ถ๋ ฅ ์๋ ์๋์ ๊ฐ์ต๋๋ค.$ gh actions-importer configure โ Which CI providers are you configuring?: GitLab Enter the following values (leave empty to omit): โ Personal access token for GitHub: *************** โ Base url of the GitHub instance: https://github.com โ Private token for GitLab: *************** โ Base url of the GitLab instance: http://localhost Environment variables successfully updated.
- "์ด๋ค CI ๊ณต๊ธ์๋ฅผ ๊ตฌ์ฑํ๊ณ ์๋์?"์ ๋ํด ํ์ดํ ํค๋ฅผ ์ฌ์ฉํ์ฌ
-
ํฐ๋ฏธ๋์์ GitHub Actions Importer๋ฅผ ์คํํฉ๋๋ค.
update
CLI ๋ช ๋ น์ ์คํํ์ฌ GitHub Packages์ ์ฐ๊ฒฐํฉ๋๋ค. {data variables.product.prodname_container_registry %}์ ์ฐ๊ฒฐํ๊ณ ์ปจํ ์ด๋ ์ด๋ฏธ์ง๊ฐ ์ต์ ๋ฒ์ ์ผ๋ก ์ ๋ฐ์ดํธ๋์๋์ง ํ์ธํฉ๋๋ค.gh actions-importer update
๋ช ๋ น์ ์ถ๋ ฅ์ ์๋์ ๋น์ทํด์ผ ํฉ๋๋ค:
Updating ghcr.io/actions-importer/cli:latest... ghcr.io/actions-importer/cli:latest up-to-date
GitLab ๊ฐ์ฌ ์ํ
audit
๋ช
๋ น์ ์ฌ์ฉํ์ฌ GitLab ์๋ฒ์ ๋ชจ๋ ํ์ดํ๋ผ์ธ์ ๊ฐ๋ต์ ์ผ๋ก ๋ณผ ์ ์์ต๋๋ค.
audit
๋ช
๋ น์ ๋ค์ ๋จ๊ณ๋ฅผ ์ํํฉ๋๋ค:
- GitLab ์๋ฒ์ ์ ์๋ ๋ชจ๋ ํ๋ก์ ํธ๋ฅผ ๊ฐ์ ธ์ต๋๋ค.
- ๊ฐ ํ์ดํ๋ผ์ธ์ ํด๋นํ๋ GitHub Actions ์ํฌํ๋ก๋ก ๋ณํํฉ๋๋ค.
- GitHub Actions Importer์(๋ฅผ) ์ฌ์ฉํ์ฌ ๋ง์ด๊ทธ๋ ์ด์ ์ ์์ ํ๊ณ ๋ณต์กํ ์์ ์ด ๊ฐ๋ฅํ ๋ฐฉ๋ฒ์ ์์ฝํ๋ ๋ณด๊ณ ์๋ฅผ ์์ฑํฉ๋๋ค.
๊ฐ์ฌ ๋ช ๋ น์ ๋ํ ํ์ ๊ตฌ์ฑ ์์
audit
๋ช
๋ น์ ์ฌ์ฉํ๋ ค๋ฉด GitLab ์กฐ์ง ๊ณ์ ์ผ๋ก ๊ตฌ์ฑ๋ personal access token์ด(๊ฐ) ์์ด์ผ ํฉ๋๋ค.
๊ฐ์ฌ ๋ช ๋ น ์คํ
GitLab ์๋ฒ์ ๋ํ ๊ฐ์ฌ๋ฅผ ์ํํ๋ ค๋ฉด ํฐ๋ฏธ๋์์ ๋ค์ ๋ช
๋ น์ ์คํํ์ฌ ๊ฐ์ฌํ๋ ๋ค์์คํ์ด์ค ๋๋ ๊ทธ๋ฃน์ผ๋ก my-gitlab-namespace
์ ๋ฐ๊ฟ๋๋ค.
gh actions-importer audit gitlab --output-dir tmp/audit --namespace my-gitlab-namespace
๊ฐ์ฌ ๊ฒฐ๊ณผ ๊ฒ์ฌํ๊ธฐ
์ง์ ๋ ์ถ๋ ฅ ๋๋ ํฐ๋ฆฌ์ ํ์ผ์๋ ๊ฐ์ฌ์ ๊ฒฐ๊ณผ๊ฐ ํฌํจ๋ฉ๋๋ค. ๊ฐ์ฌ ๊ฒฐ๊ณผ์ ๋ํ ์์ฝ์ audit_summary.md
ํ์ผ์ ์ฐธ์กฐํ์ธ์.
๊ฐ์ฌ ์์ฝ์๋ ๋ค์์ ์น์ ์ด ์์ต๋๋ค.
Pipelines
"ํ์ดํ๋ผ์ธ" ์น์ ์๋ GitHub Actions Importer์ด(๊ฐ) ์ํํ ๋ณํ๋ฅ ์ ๋ํ ๊ฐ๋ต์ ์ธ ํต๊ณ๊ฐ ํฌํจ๋์ด ์์ต๋๋ค.
์๋์ "ํ์ดํ๋ผ์ธ" ์น์ ์ ๋ํ๋ ์ ์๋ ๋ช ๊ฐ์ง ์ฃผ์ ์ฉ์ด๊ฐ ๋์ ์์ต๋๋ค.
- ์ฑ๊ณตํ ํ์ดํ๋ผ์ธ์๋ ํ์ดํ๋ผ์ธ ๊ตฌ๋ฌธ์ 100%๊ฐ ์๊ณ ๊ฐ๋ณ ํญ๋ชฉ์ ํด๋น GitHub Actions(์ผ)๋ก ์๋์ผ๋ก ๋ณํ๋ฉ๋๋ค.
- ๋ถ๋ถ์ ์ผ๋ก ์ฑ๊ณตํ ํ์ดํ๋ผ์ธ์๋ ๋ชจ๋ ํ์ดํ๋ผ์ธ ๊ตฌ๋ฌธ์ด ๋ณํ๋์ง๋ง ํด๋น GitHub Actions์ผ๋ก ์๋์ผ๋ก ๋ณํ๋์ง ์์ ์ผ๋ถ ๊ฐ๋ณ ํญ๋ชฉ์ด ์์ต๋๋ค.
- ์ง์ ๋์ง ์๋ ํ์ดํ๋ผ์ธ์ GitHub Actions Importer์์ ์ง์๋์ง ์๋ ์ ์ ํ์์ ๋๋ค.
- ์คํจํ ํ์ดํ๋ผ์ธ์ ๋ณํํ ๋๋ ์ฌ๊ฐํ ์ค๋ฅ๊ฐ ๋ฐ์ํ๋ค๋ ์๋ฏธ์
๋๋ค. ์ด ํ์์ ๋ค์์ 3๊ฐ์ง ์ด์ ๋ก ๋ฐ์ํ ์ ์์ต๋๋ค.
- ํ์ดํ๋ผ์ธ์ด ์๋ ์๋ชป ๊ตฌ์ฑ๋์ด ์ ํจํ์ง ์์ต๋๋ค.
- GitHub Actions Importer์(๋ฅผ) ๋ณํํ ๋ ๋ด๋ถ ์ค๋ฅ๊ฐ ๋ฐ์ํ์ต๋๋ค.
- ํ์ดํ๋ผ์ธ์ ์ก์ธ์คํ ์ ์๊ฒ ๋๋ ์คํจํ ๋คํธ์ํฌ ์๋ต์ด ์์ผ๋ฉฐ, ์ด๋ ์ข ์ข ์๋ชป๋ ์๊ฒฉ ์ฆ๋ช ๋๋ฌธ์ ๋๋ค.
๋น๋ ๋จ๊ณ
"๋น๋ ๋จ๊ณ" ์น์ ์๋ ๋ชจ๋ ํ์ดํ๋ผ์ธ์์ ์ฌ์ฉ๋๋ ๊ฐ๋ณ ๋น๋ ๋จ๊ณ ๋ฐ GitHub Actions Importer์์ ์๋์ผ๋ก ๋ณํ๋ ๊ฐ์์ ๋ํ ๊ฐ์๊ฐ ํฌํจ๋์ด ์์ต๋๋ค.
์๋ "ํ์ดํ๋ผ์ธ" ์น์ ์ ๋ํ๋ ์ ์๋ ๋ช ๊ฐ์ง ์ฃผ์ ์ฉ์ด๊ฐ ๋์ ์์ต๋๋ค.
- ์๋ ค์ง ๋น๋ ๋จ๊ณ๋ ํด๋น ๋์์ผ๋ก ์๋์ผ๋ก ๋ณํ๋ ๋จ๊ณ์ ๋๋ค.
- ์๋ ค์ง ๋น๋ ๋จ๊ณ๋ ํด๋น ๋์์ผ๋ก ์๋์ผ๋ก ๋ณํ๋์ง ์์ ๋จ๊ณ์ ๋๋ค.
- ์ง์๋์ง ์๋ ๋น๋ ๋จ๊ณ๋ ๋ค์๊ณผ ๊ฐ์ ๋จ๊ณ์
๋๋ค.
- GitHub Actions์์ ๊ธฐ๋ณธ์ ์ผ๋ก ์ง์๋์ง ์์ต๋๋ค.
- GitHub Actions๊ณผ(์) ํธํ๋์ง ์๋ ๋ฐฉ์์ผ๋ก ๊ตฌ์ฑ๋ฉ๋๋ค.
- ์์
์ ๋ณํ๋ ์ํฌํ๋ก์์ ์ฌ์ฉ๋ ์์
์ ๋ชฉ๋ก์
๋๋ค. ์ด ์์
์ ๋ค์๊ณผ ๊ฐ์ ๊ฒฝ์ฐ์ ์ค์ํ ์ ์์ต๋๋ค.
- GitHub Enterprise Server์(๋ฅผ) ์ฌ์ฉํ๋ ๊ฒฝ์ฐ ์ธ์คํด์ค์ ๋๊ธฐํํ ์์ ๋ชฉ๋ก์ ์์งํฉ๋๋ค.
- ์ฌ์ฉ๋๋ ์์ ์ ์กฐ์ง ์์ค ํ์ฉ ๋ชฉ๋ก์ ์ ์ํฉ๋๋ค. ์ด ์์ ๋ชฉ๋ก์ ๋ณด์ ๋๋ ๊ท์ ์ค์ ํ์์ ๊ฒํ ํด์ผ ํ ์๋ ์๋ ํฌ๊ด์ ์ธ ์์ ๋ชฉ๋ก์ ๋๋ค.
์๋ ์์
"์๋ ์์ " ์น์ ์๋ GitHub Actions Importer์ด(๊ฐ) ์๋์ผ๋ก ์๋ฃํ ์ ์์ผ๋ฉฐ ์๋์ผ๋ก ์๋ฃํด์ผ ํ๋ ์์ ์ ๋ํ ๊ฐ์๊ฐ ํฌํจ๋์ด ์์ต๋๋ค.
์๋ "ํ์ดํ๋ผ์ธ" ์น์ ์ ๋ํ๋ ์ ์๋ ๋ช ๊ฐ์ง ์ฃผ์ ์ฉ์ด๊ฐ ๋์ ์์ต๋๋ค.
- ๋น๋ฐ์ ๋ณํ๋ ํ์ดํ๋ผ์ธ์์ ์ฌ์ฉ๋๋ ๋ฆฌํฌ์งํ ๋ฆฌ ๋๋ ์กฐ์ง ์์ค์ ๋น๋ฐ์ ๋๋ค. ์ด๋ฌํ ํ์ดํ๋ผ์ธ์ด ์ ๋๋ก ์๋ํ๋ ค๋ฉด GitHub Actions์์ ์ด๋ฌํ ๋น๋ฐ์ ์๋์ผ๋ก ๋ง๋ค์ด์ผ ํฉ๋๋ค. ์์ธํ ๋ด์ฉ์ GitHub Actions์์ ๋น๋ฐ ์ฌ์ฉ์(๋ฅผ) ์ฐธ์กฐํ์ธ์.
- ์์ฒด ํธ์คํ ์คํ๊ธฐ๋ GitHubํธ์คํฐ๋ ๋ฌ๋๊ฐ ์๋ ๋ณํ๋ ํ์ดํ๋ผ์ธ์์ ์ฐธ์กฐ๋๋ ์คํ๊ธฐ์ ๋ ์ด๋ธ์ ๋ํ๋ ๋๋ค. ์ด๋ฌํ ํ์ดํ๋ผ์ธ์ ์ ๋๋ก ์๋์ํค๋ ค๋ฉด ์ด๋ฌํ ์คํ๊ธฐ๋ฅผ ์๋์ผ๋ก ์ ์ํด์ผ ํฉ๋๋ค.
Files
๊ฐ์ฌ ๋ณด๊ณ ์์ ๋ง์ง๋ง ์น์ ์๋ ๊ฐ์ฌ ์ค ๋์คํฌ์ ๊ธฐ๋ก๋ ๋ชจ๋ ํ์ผ์ ๋งค๋ํ์คํธ๋ฅผ ์ ๊ณตํฉ๋๋ค.
๊ฐ ํ์ดํ๋ผ์ธ ํ์ผ์๋ ๋ค์์ ํฌํจํ๋ฉฐ, ๊ฐ์ฌ์ ํฌํจ๋ ๋ค์ํ ํ์ผ์ด ์์ต๋๋ค.
- GitHub์ ์ ์๋ ์๋ ํ์ดํ๋ผ์ธ์ ๋๋ค.
- ํ์ดํ๋ผ์ธ์ ๋ณํํ๊ธฐ ์ํด ์ฌ์ฉ๋๋ ๋ชจ๋ ๋คํธ์ํฌ ์๋ต์ ๋๋ค.
- ๋ณํ๋ ์ํฌํ๋ก ํ์ผ์ ๋๋ค.
- ์คํจํ ํ์ดํ๋ผ์ธ ๋ณํ ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ๊ธฐ ์ํด ์ฌ์ฉํ ์ ์๋ ์คํ ์ถ์ ์ ๋๋ค.
๋ํ workflow_usage.csv
ํ์ผ์๋ ์ฑ๊ณต์ ์ผ๋ก ๋ณํ๋ ๊ฐ ํ์ดํ๋ผ์ธ์์ ์ฌ์ฉ๋๋ ๋ชจ๋ ์์
, ๋น๋ฐ ๋ฐ ์คํ๊ธฐ์ ์ผํ๋ก ๊ตฌ๋ถ๋ ๋ชฉ๋ก์ด ํฌํจ๋ฉ๋๋ค. ์ด๋ ์์
, ๋น๋ฐ ๋๋ ์คํ๊ธฐ๋ฅผ ์ฌ์ฉํ๋ ์ํฌํ๋ก๋ฅผ ๊ฒฐ์ ํ๋ ๋ฐ ์ ์ฉํ ์ ์์ผ๋ฉฐ, ๋ณด์ ๊ฒํ ๋ฅผ ์ํํ๋ ๋ฐ ์ ์ฉํ ์ ์์ต๋๋ค.
์ ์ฌ์ ๋น๋ ์คํ๊ธฐ ์ฌ์ฉ๋ ์์ธก
forecast
๋ช
๋ น์ ์ฌ์ฉํ์ฌ GitLab ์๋ฒ์์ ์๋ฃ๋ ํ์ดํ๋ผ์ธ ์คํ์ ๋ฉํธ๋ฆญ์ ๊ณ์ฐํ์ฌ ์ ์ฌ์ ์ธ GitHub Actions ์ฌ์ฉ๋์ ์์ธกํ ์ ์์ต๋๋ค.
์์ธก ๋ช ๋ น ์คํํ๊ธฐ
์ ์ฌ์ ์ธ GitHub Actions ์ฌ์ฉ๋์ ๋ํ ์์ธก์ ์ํํ๋ ค๋ฉด ํฐ๋ฏธ๋์์ ๋ค์ ๋ช
๋ น์ ์คํํ์ฌ ์์ธกํ๋ ค๋ ๋ค์์คํ์ด์ค ๋๋ ๊ทธ๋ฃน์ผ๋ก ๋ฐ๊ฟ my-gitlab-namespace
๋๋ค. ๊ธฐ๋ณธ์ ์ผ๋ก GitHub Actions Importer์(๋) ์์ธก ๋ณด๊ณ ์์ ์ด์ 7์ผ์ ํฌํจํฉ๋๋ค.
gh actions-importer forecast gitlab --output-dir tmp/forecast --namespace my-gitlab-namespace
์ ์ฒด ๋ค์์คํ์ด์ค ์์ธก
์ ์ฒด ๋ค์์คํ์ด์ค์ ๋ชจ๋ ํ์ ๊ทธ๋ฃน์ ์์ธกํ๋ ค๋ฉด ์ธ์ ๋๋ NAMESPACE
ํ๊ฒฝ ๋ณ์์์ --namespace
๊ฐ ํ์ ๊ทธ๋ฃน์ ์ง์ ํด์ผ ํฉ๋๋ค.
์์:
gh actions-importer forecast gitlab --namespace my-gitlab-namespace my-gitlab-namespace/subgroup-one my-gitlab-namespace/subgroup-two ...
์์ธก ๋ณด๊ณ ์ ๊ฒ์ฌํ๊ธฐ
์ง์ ๋ ์ถ๋ ฅ ๋๋ ํฐ๋ฆฌ์ forecast_report.md
ํ์ผ์ ์์ธก ๊ฒฐ๊ณผ๊ฐ ํฌํจ๋์ด ์์ต๋๋ค.
๋ค์์ ์์ ๋ณด๊ณ ์์ ํ์๋ ์ ์๋ ๋ช ๊ฐ์ง ์ฃผ์ ์ฉ์ด์ ๋๋ค:
- ์์ ์๋ ์๋ฃ๋ ์์ ์ ์ด ๊ฐ์์ ๋๋ค.
- ํ์ดํ๋ผ์ธ ์๋ ์ฌ์ฉ๋ ๊ณ ์ ํ์ดํ๋ผ์ธ์ ์์ ๋๋ค.
- ์คํ ์๊ฐ: ์ ๋ฌ๋๊ฐ ์์
์ ์๋นํ ์๊ฐ์ ๋ํ๋
๋๋ค. ์ด ๋ฉํธ๋ฆญ์ ์ฌ์ฉํ์ฌ GitHubํธ์คํฐ๋ ์คํ๊ธฐ์ ๋น์ฉ์ ๊ณํํ๋ ๋ฐ ๋์์ด ๋ ์ ์์ต๋๋ค.
- ์ด ๋ฉํธ๋ฆญ์ GitHub Actions์ ์ง์ถํด์ผ ํ๋ ๊ธ์ก๊ณผ ์๊ด ๊ด๊ณ๊ฐ ์์ต๋๋ค. ํด๋น ๊ธ์ก์ ์์ ์๊ฐ(๋ถ) ๋์ ์ฌ์ฉ๋๋ ํ๋์จ์ด์ ๋ฐ๋ผ ๋ฌ๋ผ์ง๋๋ค. GitHub Actions ๊ฐ๊ฒฉ ๊ณ์ฐ๊ธฐ๋ฅผ ์ฌ์ฉํ์ฌ ๋น์ฉ์ ์ถ์ ํ ์ ์์ต๋๋ค.
- ํ ์๊ฐ: ๋ฉํธ๋ฆญ์ ์์ ์ด ์คํํ ์ ์๋ ๋ฌ๋๋ฅผ ๊ธฐ๋ค๋ฆฌ๋ ๋ฐ ์์๋๋ ์๊ฐ์ ๋ํ๋ ๋๋ค.
- ๋์ ์์ ๋ฉํธ๋ฆญ์ ํน์ ์๊ฐ์ ์คํ ์ค์ธ ์์ ์ ์์ ์ค๋ช ํฉ๋๋ค. ์ด ๋ฉํธ๋ฆญ์ ๊ตฌ์ฑํด์ผ ํ๋ ๋ฌ๋ ์๋ฅผ ์ ์ํ๋ ๋ฐ ์ฌ์ฉํ ์ ์์ต๋๋ค.
๋ํ ์ด๋ฌํ ๋ฉํธ๋ฆญ์ GitLab์ ๊ฐ ์คํ๊ธฐ ํ์ ๋ํด ์ ์๋ฉ๋๋ค. ์ด ๊ธฐ๋ฅ์ ํธ์คํธํ ๋๋ ์์ฒด ํธ์คํ ํ ๋ฐ๋ ๋๋ ๊ณ ์ฌ์ ๋๋ ์ ์ฌ์ ์ปดํจํฐ๊ฐ ํผํฉ๋์ด ์๋ ๊ฒฝ์ฐ ํนํ ์ ์ฉํ๋ฏ๋ก ๋ค์ํ ์ ํ์ ๋ฐ๋์ ํน์ ํ ๋ฉํธ๋ฆญ์ ํ์ธํ ์ ์์ต๋๋ค.
GitLab ํ์ดํ๋ผ์ธ์ ์ํ ์คํ ๋ง์ด๊ทธ๋ ์ด์ ์ํ
์ด dry-run
๋ช
๋ น์ ์ฌ์ฉํ์ฌ GitLab ํ์ดํ๋ผ์ธ์ ํด๋น GitHub Actions ์ํฌํ๋ก๋ก ๋ณํํ ์ ์์ต๋๋ค.
์ํ ์คํ ๋ช ๋ น ์คํ
์ด dry-run
๋ช
๋ น์ ์ฌ์ฉํ์ฌ GitLab ํ์ดํ๋ผ์ธ์ ํด๋นํ๋ GitHub Actions ์ํฌํ๋ก๋ก ๋ณํํ ์ ์์ต๋๋ค. ๋๋ผ์ด๋ฐ์ ์ง์ ๋ ๋๋ ํฐ๋ฆฌ์ ์ถ๋ ฅ ํ์ผ์ ๋ง๋ค์ง๋ง ํ์ดํ๋ผ์ธ ๋ง์ด๊ทธ๋ ์ด์
์ ์ํ ํ ๋ฆฌํ์คํธ๋ฅผ ์ด์ง ์์ต๋๋ค.
GitLab ํ์ดํ๋ผ์ธ์ GitHub Actions๋ก ๋ง์ด๊ทธ๋ ์ด์
ํ๋ ๋๋ผ์ด๋ฐ์ ์ํํ๋ ค๋ฉด ํฐ๋ฏธ๋์์ ๋ค์ ๋ช
๋ น์ ์คํํ์ฌ my-gitlab-project
์(๋ฅผ) GitLab ํ๋ก์ ํธ ์ฌ๋ฌ๊ทธ๋ก, my-gitlab-namespace
์(๋ฅผ) ๋๋ผ์ด๋ฐ์ ์ํํ๋ ค๋ ๋ค์์คํ์ด์ค ๋๋ ๊ทธ๋ฃน(ํ์ ๊ทธ๋ฃน์ ๊ฒฝ์ฐ ์ ์ฒด ๊ทธ๋ฃน ๊ฒฝ๋ก, ์: my-org/my-team
)์ผ๋ก ๋ฐ๊ฟ๋๋ค.
gh actions-importer dry-run gitlab --output-dir tmp/dry-run --namespace my-gitlab-namespace --project my-gitlab-project
๋ณํ๋ ์ํฌํ๋ก ์ ๊ฒ
์ง์ ๋ ์ถ๋ ฅ ๋๋ ํฐ๋ฆฌ์์ ๋๋ผ์ด๋ฐ ๋ก๊ทธ ๋ฐ ๋ณํ๋ ์ํฌํ๋ก ํ์ผ์ ๋ณผ ์ ์์ต๋๋ค.
GitHub Actions Importer์ด(๊ฐ) ์ ์ ์๋ ๋น๋ ๋จ๊ณ ๋๋ ๋ถ๋ถ์ ์ผ๋ก ์ฑ๊ณตํ ํ์ดํ๋ผ์ธ๊ณผ ๊ฐ์ด ์๋์ผ๋ก ๋ณํํ ์ ์๋ ํญ๋ชฉ์ด ์๋ ๊ฒฝ์ฐ ๋ณํ ํ๋ก์ธ์ค๋ฅผ ์ถ๊ฐ๋ก ์ฌ์ฉ์ ์ง์ ํ๋ ์ฌ์ฉ์ ์ง์ ๋ณํ๊ธฐ๋ฅผ ๋ง๋ค ์ ์์ต๋๋ค. ์์ธํ ๋ด์ฉ์ ์ฌ์ฉ์ ์ง์ ๋ณํ๊ธฐ๋ฅผ ์ฌ์ฉํ์ฌ GitHub Actions ๊ฐ์ ธ์ค๊ธฐ ํ์ฅ์(๋ฅผ) ์ฐธ์กฐํ์ธ์.
GitLab ํ์ดํ๋ผ์ธ์ ํ๋ก๋์ ๋ง์ด๊ทธ๋ ์ด์ ์ํ
์ด migrate
๋ช
๋ น์ ์ฌ์ฉํ์ฌ GitLab ํ์ดํ๋ผ์ธ์ ๋ณํํ๊ณ ํด๋น GitHub Actions ์ํฌํ๋ก๋ฅผ ์ฌ์ฉํ์ฌ ๋์ด์ค๊ธฐ ์์ฒญ์ ์ด ์ ์์ต๋๋ค.
๋ง์ด๊ทธ๋ ์ด์ ๋ช ๋ น ์คํ
GitLab ํ์ดํ๋ผ์ธ์ GitHub Actions๋ก ๋ง์ด๊ทธ๋ ์ด์ ํ๋ ค๋ฉด ํฐ๋ฏธ๋์์ ๋ค์ ๋ช ๋ น์ ์คํํ์ฌ ๋ค์ ๊ฐ์ ๋์ฒดํฉ๋๋ค.
- GitHub ๋ฆฌํฌ์งํ ๋ฆฌ์ ๋ํ URL์ด ์๋
target-url
๊ฐ my-gitlab-project
GitLab ํ๋ก์ ํธ ๋์ ํ๋ ์ฌ์ฉ- ๋ง์ด๊ทธ๋ ์ด์
ํ ๋ค์์คํ์ด์ค ๋๋ ๊ทธ๋ฃน์ด ํฌํจ๋
my-gitlab-namespace
(ํ์ ๊ทธ๋ฃน์ ๊ฒฝ์ฐ ์ ์ฒด ๊ฒฝ๋ก, ์:my-org/my-team
)
gh actions-importer migrate gitlab --target-url https://github.com/:owner/:repo --output-dir tmp/migrate --namespace my-gitlab-namespace --project my-gitlab-project
๋ช ๋ น์ ์ถ๋ ฅ์๋ ๋ณํ๋ ์ํฌํ๋ก๋ฅผ ๋ฆฌํฌ์งํ ๋ฆฌ์ ์ถ๊ฐํ๋ ๋์ด์ค๊ธฐ ์์ฒญ์ ๋ํ URL์ด ํฌํจ๋ฉ๋๋ค. ์ฑ๊ณต์ ์ธ ์ถ๋ ฅ์ ์๋ ๋ค์๊ณผ ์ ์ฌํฉ๋๋ค:
$ gh actions-importer migrate gitlab --target-url https://github.com/octo-org/octo-repo --output-dir tmp/migrate --namespace octo-org --project monas-project
[2022-08-20 22:08:20] Logs: 'tmp/migrate/log/actions-importer-20220916-014033.log'
[2022-08-20 22:08:20] Pull request: 'https://github.com/octo-org/octo-repo/pull/1'
๋์ด์ค๊ธฐ ์์ฒญ ๊ฒ์ฌํ๊ธฐ
migrate
๋ช
๋ น์ ์ฑ๊ณต์ ์ธ ์คํ์ ์ถ๋ ฅ์๋ ๋ณํ๋ ์ํฌํ๋ก๋ฅผ ๋ฆฌํฌ์งํ ๋ฆฌ์ ์ถ๊ฐํ๋ ์ ๋์ด์ค๊ธฐ ์์ฒญ์ ๋ํ ๋งํฌ๊ฐ ํฌํจ๋์ด ์์ต๋๋ค.
๋์ด์ค๊ธฐ ์์ฒญ์ ๋ช ๊ฐ์ง ์ค์ ์์๋ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
- ๋์ด์ค๊ธฐ ์์ฒญ ์ค๋ช ์์ ์๋์ผ๋ก ์๋ฃํด์ผ ํ๋ ๋จ๊ณ๋ฅผ ๋์ดํ๋ ์น์ ์ ํ์ดํ๋ผ์ธ์ GitHub Actions๋ก ๋ง์ด๊ทธ๋ ์ด์ ์ ์๋ฃํ ์ ์์ต๋๋ค. ์๋ฅผ ๋ค์ด, ์ด ์น์ ์์๋ ์ํฌํ๋ก์ ์ฌ์ฉ๋๋ ๋น๋ฐ์ ๋ง๋ค๋๋ก ์ง์ํ ์ ์์ต๋๋ค.
- ๋ณํ๋ ์ํฌํ๋ก ํ์ผ์ ๋๋ค. ๋์ด์ค๊ธฐ ์์ฒญ์์ Files changed ํญ์ ์ ํํ์ฌ GitHub ๋ฆฌํฌ์งํ ๋ฆฌ์ ์ถ๊ฐ๋ ์ํฌํ๋ก ํ์ผ์ ๋ด ๋๋ค.
๋์ด์ค๊ธฐ ์์ฒญ ๊ฒ์ฌ๋ฅผ ๋ง์น๋ฉด ๋ณํฉํ์ฌ ์ํฌํ๋ก๋ฅผ GitHub ๋ฆฌํฌ์งํ ๋ฆฌ์ ์ถ๊ฐํ ์ ์์ต๋๋ค.
์ฐธ์กฐ
์ด ์น์ ์๋ GitHub Actions Importer์(๋ฅผ) ์ฌ์ฉํ์ฌ GitLab์์ ๋ง์ด๊ทธ๋ ์ด์ ํ ๋ ํ๊ฒฝ ๋ณ์, ์ ํ์ ์ธ์ ๋ฐ ์ง์๋๋ ๊ตฌ๋ฌธ์ ๋ํ ์ฐธ์กฐ ์ ๋ณด๊ฐ ํฌํจ๋์ด ์์ต๋๋ค.
ํ๊ฒฝ ๋ณ์ ์ฌ์ฉ
GitHub Actions Importer์(๋) ์ธ์ฆ ๊ตฌ์ฑ์ ํ๊ฒฝ ๋ณ์๋ฅผ ์ฌ์ฉํฉ๋๋ค. ์ด๋ฌํ ๋ณ์๋ configure
๋ช
๋ น์ ์ฌ์ฉํ์ฌ ๊ตฌ์ฑ ํ๋ก์ธ์ค๋ฅผ ๋ฐ๋ฅด๋ฉด ์ค์ ๋ฉ๋๋ค. ์์ธํ ์ ๋ณด๋ ์๊ฒฉ ์ฆ๋ช
๊ตฌ์ฑ ์น์
์ ์ฐธ์กฐํ์ธ์.
GitHub Actions Importer์(๋) ๋ค์ ํ๊ฒฝ ๋ณ์๋ฅผ ์ฌ์ฉํ์ฌ GitLab ์ธ์คํด์ค์ ์ฐ๊ฒฐํฉ๋๋ค.
GITHUB_ACCESS_TOKEN
: ๋ณํ๋ ์ํฌํ๋ก(workflow
๋ฒ์ ํ์)๋ฅผ ์ฌ์ฉํ์ฌ ๋์ด์ค๊ธฐ ์์ฒญ์ ๋ง๋๋ ๋ฐ ์ฌ์ฉ๋๋ personal access token (classic)์ ๋๋ค.GITHUB_INSTANCE_URL
: ๋์ GitHub ์ธ์คํด์ค์ URL์ ๋๋ค(์:https://github.com
).GITLAB_ACCESS_TOKEN
: GitLab ๋ฆฌ์์ค๋ฅผ ๋ณด๋ ๋ฐ ์ฌ์ฉ๋๋ GitLab personal access token์ ๋๋ค.GITLAB_INSTANCE_URL
: GitLab ์ธ์คํด์ค์ URL์ ๋๋ค.NAMESPACE
: GitLab ํ์ดํ๋ผ์ธ์ ํฌํจํ๋ ๋ค์์คํ์ด์ค ๋๋ ๊ทธ๋ฃน์ ๋๋ค.
์ด๋ฌํ ํ๊ฒฝ ๋ณ์๋ .env.local
ํ์ผ์ ์ง์ ํ ์ ์์ผ๋ฉฐ, ์ด ํ์ผ์ ์คํ ์ GitHub Actions Importer์ ์ํด ๋ก๋๋ฉ๋๋ค.
์ ํ์ ์ธ์ ์ฌ์ฉ
GitHub Actions Importer ํ์ ๋ช ๋ น๊ณผ ํจ๊ป ์ฌ์ฉํ์ฌ ๋ง์ด๊ทธ๋ ์ด์ ์ ์ฌ์ฉ์ ์ง์ ํ ์ ์๋ ์ ํ์ ์ธ์๊ฐ ์์ต๋๋ค.
--source-file-path
--source-file-path
์ธ์๋ฅผ forecast
, dry-run
๋๋ migrate
ํ์ ๋ช
๋ น๊ณผ ํจ๊ป ์ฌ์ฉํ ์ ์์ต๋๋ค.
๊ธฐ๋ณธ์ ์ผ๋ก GitHub Actions Importer์(๋) ์์ค ์ ์ด์์ ํ์ดํ๋ผ์ธ ์ฝํ
์ธ ๋ฅผ ๊ฐ์ ธ์ต๋๋ค. --source-file-path
์ธ์๋ GitHub Actions Importer์ ์ง์ ๋ ์์ค ํ์ผ ๊ฒฝ๋ก๋ฅผ ๋์ ์ฌ์ฉํ๋๋ก ์ง์ํฉ๋๋ค.
์์:
gh actions-importer dry-run gitlab --output-dir output/ --namespace my-gitlab-namespace --project my-gitlab-project --source-file-path path/to/.gitlab-ci.yml
ํ์ ๋ช
๋ น์ ์คํํ forecast
๋ ์ฌ๋ฌ ์๋ณธ ํ์ผ์ ์ ๊ณตํ๋ ค๋ ๊ฒฝ์ฐ ํ์ผ ๊ฒฝ๋ก ๊ฐ์์ ํจํด ์ผ์น๋ฅผ ์ฌ์ฉํ ์ ์์ต๋๋ค. ๋ค์ ์์์์๋ GitHub Actions Importer์ ํ์ผ ๊ฒฝ๋ก์ ์ผ์นํ๋ ./tmp/previous_forecast/jobs/*.json
์๋ณธ ํ์ผ์ ์ ๊ณตํฉ๋๋ค.
gh actions-importer forecast gitlab --output-dir output/ --namespace my-gitlab-namespace --project my-gitlab-project --source-file-path ./tmp/previous_forecast/jobs/*.json
--config-file-path
--config-file-path
์ธ์๋ฅผ audit
, dry-run
๋ฐ migrate
ํ์ ๋ช
๋ น๊ณผ ํจ๊ป ์ฌ์ฉํ ์ ์์ต๋๋ค.
๊ธฐ๋ณธ์ ์ผ๋ก GitHub Actions Importer์(๋) ์์ค ์ ์ด์์ ํ์ดํ๋ผ์ธ ์ฝํ
์ธ ๋ฅผ ๊ฐ์ ธ์ต๋๋ค. --config-file-path
์ธ์๋ GitHub Actions Importer์ ์ง์ ๋ ์์ค ํ์ผ์ ๋์ ์ฌ์ฉํ๋๋ก ์ง์ํฉ๋๋ค.
์ด ์ธ์๋ฅผ --config-file-path
์ฌ์ฉํ์ฌ ๋ณํ๋ ์ฌ์ฌ์ฉ ๊ฐ๋ฅํ ์ํฌํ๋ก๋ฅผ ๋ง์ด๊ทธ๋ ์ด์
ํ ๋ฆฌํฌ์งํ ๋ฆฌ๋ฅผ ์ง์ ํ ์๋ ์์ต๋๋ค.
๊ฐ์ฌ ์
์ด ์์์ GitHub Actions Importer๋ ์ง์ ๋ YAML ๊ตฌ์ฑ ํ์ผ์ ์ฌ์ฉํ์ฌ ๊ฐ์ฌ๋ฅผ ์ํํฉ๋๋ค.
gh actions-importer audit gitlab --output-dir path/to/output/ --namespace my-gitlab-namespace --config-file-path path/to/gitlab/config.yml
๊ตฌ์ฑ ํ์ผ์ ์ฌ์ฉํ์ฌ GitLab ์ธ์คํด์ค๋ฅผ ๊ฐ์ฌํ๋ ค๋ฉด ํ์ผ์ด ๋ค์ ํ์์ด์ด์ผ ํ๋ฉฐ ๊ฐ repository_slug
๊ฐ์ ๊ณ ์ ํด์ผ ํฉ๋๋ค.
source_files:
- repository_slug: namespace/project-name
path: path/to/.gitlab-ci.yml
- repository_slug: namespace/some-other-project-name
path: path/to/.gitlab-ci.yml
๋๋ผ์ด ์คํ ์
์ด ์์์์ GitHub Actions Importer๋ ์ง์ ๋ YAML ๊ตฌ์ฑ ํ์ผ์ ์์ค ํ์ผ๋ก ์ฌ์ฉํ์ฌ ๋๋ผ์ด๋ฐ์ ์ํํฉ๋๋ค.
ํ์ดํ๋ผ์ธ์ ๊ตฌ์ฑ ํ์ผ์ repository_slug
๊ฐ์ --namespace
๋ฐ --project
์ต์
๊ฐ๊ณผ ์ผ์น์์ผ ์ ํํฉ๋๋ค. ๊ทธ๋ฐ ๋ค์ path
์ ์ง์ ๋ ์์ค ํ์ผ์ ๊ฐ์ ธ์ค๋ ๋ฐ ์ฌ์ฉ๋ฉ๋๋ค.
gh actions-importer dry-run gitlab --namespace my-gitlab-namespace --project my-gitlab-project-name --output-dir ./output/ --config-file-path ./path/to/gitlab/config.yml
๋ณํ๋ ์ฌ์ฌ์ฉ ๊ฐ๋ฅํ ์ํฌํ๋ก์ ๋ฆฌํฌ์งํ ๋ฆฌ ์ง์
GitHub Actions Importer์(๋) ์ธ์์ --config-file-path
์ ๊ณต๋ YAML ํ์ผ์ ์ฌ์ฉํ์ฌ ๋ณํ๋ ์ฌ์ฌ์ฉ ๊ฐ๋ฅํ ์ํฌํ๋ก๊ฐ ๋ง์ด๊ทธ๋ ์ด์
๋๋ ๋ฆฌํฌ์งํ ๋ฆฌ๋ฅผ ํ์ธํฉ๋๋ค.
์์ํ๋ ค๋ฉด ์ธ์ ์์ด ๊ฐ์ฌ๋ฅผ ์คํํด์ผ ํฉ๋๋ค.--config-file-path
gh actions-importer audit gitlab --output-dir ./output/
์ด ๋ช
๋ น์ ์ถ๋ ฅ์๋ GitHub Actions Importer์ ์ํด ๋ณํ๋ ๋ชจ๋ ๋ณตํฉ ์์
์ ๋ชฉ๋ก์ด ํฌํจ๋ ์ด๋ฆ์ด ์ง์ ๋ config.yml
ํ์ผ์ด ํฌํจ๋ฉ๋๋ค. ์๋ฅผ ๋ค์ด config.yml
ํ์ผ์๋ ๋ค์๊ณผ ๊ฐ์ ๋ด์ฉ์ด ์์ ์ ์์ต๋๋ค.
reusable_workflows:
- name: my-reusable-workflow.yml
target_url: https://github.com/octo-org/octo-repo
ref: main
์ด ํ์ผ์ ์ฌ์ฉํ์ฌ ์ฌ์ฌ์ฉ ๊ฐ๋ฅํ ์ํฌํ๋ก ๋๋ ๋ณตํฉ ์์
์ ์ถ๊ฐํ ๋ฆฌํฌ์งํ ๋ฆฌ ๋ฐ ์ฐธ์กฐ๋ฅผ ์ง์ ํ ์ ์์ต๋๋ค. ๊ทธ๋ฐ ๋ค์ --config-file-path
์ธ์๋ฅผ ์ฌ์ฉํ์ฌ config.yml
ํ์ผ์ GitHub Actions Importer์ ์ ๊ณตํ ์ ์์ต๋๋ค. ์๋ฅผ ๋ค์ด ๋ช
๋ น์ ์คํํ migrate
๋ ์ด ํ์ผ์ ์ฌ์ฉํ์ฌ ๊ตฌ์ฑ ํ์ผ์ ์ ์๋ ๊ฐ ๊ณ ์ ๋ฆฌํฌ์งํ ๋ฆฌ์ ๋ํ ๋์ด์ค๊ธฐ ์์ฒญ์ ์ด ์ ์์ต๋๋ค.
gh actions-importer migrate gitlab --project my-project-name --output-dir output/ --config-file-path config.yml --target-url https://github.com/my-org/my-repo
GitLab ํ์ดํ๋ผ์ธ์ ์ง์๋๋ ๊ตฌ๋ฌธ
๋ค์ ํ์์๋ GitHub Actions Importer์ด(๊ฐ) ํ์ฌ ๋ณํํ ์ ์๋ ์์ฑ์ ํ์์ ๋ณด์ฌ์ค๋๋ค. GitLab ํ์ดํ๋ผ์ธ ๊ตฌ๋ฌธ์ด GitHub Actions์ ๋ง์ถ๋ ๋ฐฉ๋ฒ์ ๋ํ ์์ธํ ๋ด์ฉ์ GitLab CI/CD์์ GitHub Actions๋ก ๋ง์ด๊ทธ๋ ์ด์ ์(๋ฅผ) ์ฐธ์กฐํ์ธ์.
GitLab Pipelines | GitHub Actions | ์ํ |
---|---|---|
after_script | jobs.<job_id>.steps | ์ง์๋จ |
auto_cancel_pending_pipelines | concurrency | ์ง์๋จ |
before_script | jobs.<job_id>.steps | ์ง์๋จ |
build_timeout ๋๋ timeout | jobs.<job_id>.timeout-minutes | ์ง์๋จ |
default | ํด๋น ์์ | ์ง์๋จ |
image | jobs.<job_id>.container | ์ง์๋จ |
job | jobs.<job_id> | ์ง์๋จ |
needs | jobs.<job_id>.needs | ์ง์๋จ |
only_allow_merge_if_pipeline_succeeds | on.pull_request | ์ง์๋จ |
resource_group | jobs.<job_id>.concurrency | ์ง์๋จ |
schedule | on.schedule | ์ง์๋จ |
script | jobs.<job_id>.steps | ์ง์๋จ |
stages | jobs | ์ง์๋จ |
tags | jobs.<job_id>.runs-on | ์ง์๋จ |
variables | env , jobs.<job_id>.env | ์ง์ ์ฌ๋ถ |
์ ์ปค๋ฐ์ ๋ํ ํ์ดํ๋ผ์ธ ์คํ | on.push | ์ง์ ์ฌ๋ถ |
์๋์ผ๋ก ํ์ดํ๋ผ์ธ ์คํ | on.workflow_dispatch | ์ง์๋จ |
environment | jobs.<job_id>.environment | ๋ถ๋ถ์ ์ผ๋ก ์ง์๋จ |
include | ๋ฌธ์์ include ์ฐธ์กฐ๋๋ ํ์ผ์ ๋ณํ๋๊ธฐ ์ ์ ๋จ์ผ ์์
๊ทธ๋ํ๋ก ๋ณํฉ๋ฉ๋๋ค. | ๋ถ๋ถ์ ์ผ๋ก ์ง์๋จ |
only ๋๋ except | jobs.<job_id>.if | ๋ถ๋ถ์ ์ผ๋ก ์ง์๋จ |
parallel | jobs.<job_id>.strategy | ๋ถ๋ถ์ ์ผ๋ก ์ง์๋จ |
rules | jobs.<job_id>.if | ๋ถ๋ถ์ ์ผ๋ก ์ง์๋จ |
services | jobs.<job_id>.services | ๋ถ๋ถ์ ์ผ๋ก ์ง์๋จ |
workflow | if | ๋ถ๋ถ์ ์ผ๋ก ์ง์๋จ |
์ง์๋๋ GitLab ๊ตฌ๋ฌธ์ ๋ํ ์์ธํ ๋ด์ฉ์ ๋ฆฌํฌ์งํ ๋ฆฌ๋ฅผ github/gh-actions-importer
์ฐธ์กฐํ์ธ์.
ํ๊ฒฝ ๋ณ์ ๊ตฌ๋ฌธ
GitHub Actions Importer์(๋) ์๋ ํ์ ๋งคํ์ ์ฌ์ฉํ์ฌ ๊ธฐ๋ณธ GitLab ํ๊ฒฝ ๋ณ์๋ฅผ GitHub Actions์์ ๊ฐ์ฅ ๊ฐ๊น์ด ๊ฐ์ผ๋ก ๋ณํํฉ๋๋ค.
GitLab | GitHub Actions |
---|---|
CI_API_V4_URL | ${{ github.api_url }} |
CI_BUILDS_DIR | ${{ github.workspace }} |
CI_COMMIT_BRANCH | ${{ github.ref }} |
CI_COMMIT_REF_NAME | ${{ github.ref }} |
CI_COMMIT_REF_SLUG | ${{ github.ref }} |
CI_COMMIT_SHA | ${{ github.sha }} |
CI_COMMIT_SHORT_SHA | ${{ github.sha }} |
CI_COMMIT_TAG | ${{ github.ref }} |
CI_JOB_ID | ${{ github.job }} |
CI_JOB_MANUAL | ${{ github.event_name == 'workflow_dispatch' }} |
CI_JOB_NAME | ${{ github.job }} |
CI_JOB_STATUS | ${{ job.status }} |
CI_JOB_URL | ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} |
CI_JOB_TOKEN | ${{ github.token }} |
CI_NODE_INDEX | ${{ strategy.job-index }} |
CI_NODE_TOTAL | ${{ strategy.job-total }} |
CI_PIPELINE_ID | ${{ github.repository}}/${{ github.workflow }} |
CI_PIPELINE_IID | ${{ github.workflow }} |
CI_PIPELINE_SOURCE | ${{ github.event_name }} |
CI_PIPELINE_TRIGGERED | ${{ github.actions }} |
CI_PIPELINE_URL | ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} |
CI_PROJECT_DIR | ${{ github.workspace }} |
CI_PROJECT_ID | ${{ github.repository }} |
CI_PROJECT_NAME | ${{ github.event.repository.name }} |
CI_PROJECT_NAMESPACE | ${{ github.repository_owner }} |
CI_PROJECT_PATH_SLUG | ${{ github.repository }} |
CI_PROJECT_PATH | ${{ github.repository }} |
CI_PROJECT_ROOT_NAMESPACE | ${{ github.repository_owner }} |
CI_PROJECT_TITLE | ${{ github.event.repository.full_name }} |
CI_PROJECT_URL | ${{ github.server_url }}/${{ github.repository }} |
CI_REPOSITORY_URL | ${{ github.event.repository.clone_url }} |
CI_RUNNER_EXECUTABLE_ARCH | ${{ runner.os }} |
CI_SERVER_HOST | ${{ github.server_url }} |
CI_SERVER_URL | ${{ github.server_url }} |
CI_SERVER | ${{ github.actions }} |
GITLAB_CI | ${{ github.actions }} |
GITLAB_USER_EMAIL | ${{ github.actor }} |
GITLAB_USER_ID | ${{ github.actor }} |
GITLAB_USER_LOGIN | ${{ github.actor }} |
GITLAB_USER_NAME | ${{ github.actor }} |
TRIGGER_PAYLOAD | ${{ github.event_path }} |
CI_MERGE_REQUEST_ASSIGNEES | ${{ github.event.pull_request.assignees }} |
CI_MERGE_REQUEST_ID | ${{ github.event.pull_request.number }} |
CI_MERGE_REQUEST_IID | ${{ github.event.pull_request.number }} |
CI_MERGE_REQUEST_LABELS | ${{ github.event.pull_request.labels }} |
CI_MERGE_REQUEST_MILESTONE | ${{ github.event.pull_request.milestone }} |
CI_MERGE_REQUEST_PROJECT_ID | ${{ github.repository }} |
CI_MERGE_REQUEST_PROJECT_PATH | ${{ github.repository }} |
CI_MERGE_REQUEST_PROJECT_URL | ${{ github.server_url }}/${{ github.repository }} |
CI_MERGE_REQUEST_REF_PATH | ${{ github.ref }} |
CI_MERGE_REQUEST_SOURCE_BRANCH_NAME | ${{ github.event.pull_request.head.ref }} |
CI_MERGE_REQUEST_SOURCE_BRANCH_SHA | ${{ github.event.pull_request.head.sha}} |
CI_MERGE_REQUEST_SOURCE_PROJECT_ID | ${{ github.event.pull_request.head.repo.full_name }} |
CI_MERGE_REQUEST_SOURCE_PROJECT_PATH | ${{ github.event.pull_request.head.repo.full_name }} |
CI_MERGE_REQUEST_SOURCE_PROJECT_URL | ${{ github.event.pull_request.head.repo.url }} |
CI_MERGE_REQUEST_TARGET_BRANCH_NAME | ${{ github.event.pull_request.base.ref }} |
CI_MERGE_REQUEST_TARGET_BRANCH_SHA | ${{ github.event.pull_request.base.sha }} |
CI_MERGE_REQUEST_TITLE | ${{ github.event.pull_request.title }} |
CI_EXTERNAL_PULL_REQUEST_IID | ${{ github.event.pull_request.number }} |
CI_EXTERNAL_PULL_REQUEST_SOURCE_REPOSITORY | ${{ github.event.pull_request.head.repo.full_name }} |
CI_EXTERNAL_PULL_REQUEST_TARGET_REPOSITORY | ${{ github.event.pull_request.base.repo.full_name }} |
CI_EXTERNAL_PULL_REQUEST_SOURCE_BRANCH_NAME | ${{ github.event.pull_request.head.ref }} |
CI_EXTERNAL_PULL_REQUEST_SOURCE_BRANCH_SHA | ${{ github.event.pull_request.head.sha }} |
CI_EXTERNAL_PULL_REQUEST_TARGET_BRANCH_NAME | ${{ github.event.pull_request.base.ref }} |
CI_EXTERNAL_PULL_REQUEST_TARGET_BRANCH_SHA | ${{ github.event.pull_request.base.sha }} |
๋ฒ์ ๊ณ ์ง
๋ถ๋ถ์ MIT ๋ผ์ด์ ์ค์ ๋ฐ๋ผ https://github.com/github/gh-actions-importer/์์ ์กฐ์ ๋์์ต๋๋ค.
MIT License
Copyright (c) 2022 GitHub
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.