GitHub Actions Importer๋ฅผ ์ฌ์ฉํ์ฌ Azure DevOps์์ ๋ง์ด๊ทธ๋ ์ด์ ํ๊ธฐ ์ ๋ณด
์๋ ์ง์นจ์ GitHub Actions Importer์(๋ฅผ) ์ฌ์ฉํ์ฌ Azure DevOps ํ์ดํ๋ผ์ธ์ GitHub Actions(์ผ)๋ก ๋ง์ด๊ทธ๋ ์ด์ ํ๋๋ก ํ๊ฒฝ์ ๊ตฌ์ฑํ๋ ๋ฐฉ๋ฒ์ ์๋ดํฉ๋๋ค.
ํ์ ์กฐ๊ฑด
- GitHub Actions ์ํฌํ๋ก๋ก ๋ณํํ ํ๋ก์ ํธ ๋ฐ ํ์ดํ๋ผ์ธ์ ๋ณด์ ํ Azure DevOps ๊ณ์ ๋๋ ์กฐ์ง.
- ๊ณ์ ๋๋ ์กฐ์ง์ Azure DevOps personal access token์(๋ฅผ) ๋ง๋ค ์ ์๋ ์ก์ธ์ค ๊ถํ.
- Linux ๊ธฐ๋ฐ ์ปจํ
์ด๋๋ฅผ ์คํํ๊ณ ํ์ํ ๋๊ตฌ๋ฅผ ์ค์นํ ์ ์๋ ํ๊ฒฝ์
๋๋ค.
-
Docker๊ฐ ์ค์น๋์ด ์คํ ์ค์ ๋๋ค.
-
GitHub CLI๊ฐ ์ค์น๋ฉ๋๋ค.
์ฐธ๊ณ ํญ๋ชฉ
GitHub Actions Importer ์ปจํ ์ด๋์ CLI๋ CI ํ๋ซํผ๊ณผ ๋์ผํ ์๋ฒ์ ์ค์นํ ํ์๊ฐ ์์ต๋๋ค.
-
์ ํ ์ฌํญ
GitHub Actions Importer์(๋ฅผ) ์ฌ์ฉํ์ฌ Azure DevOps์์ GitHub Actions(์ผ)๋ก ๋ง์ด๊ทธ๋ ์ด์ ํ๋ ๊ฒฝ์ฐ ๋ช ๊ฐ์ง ์ ํ ์ฌํญ์ด ์์ต๋๋ค.
- GitHub Actions Importer์๋ Azure DevOps Services ๋๋ Azure DevOps Server 2019์์ ์ฌ์ฉํ ์ ์๋ Azure DevOps API ๋ฒ์ 5.0์ด ํ์ํฉ๋๋ค. ์ด์ ๋ฒ์ ์ Azure DevOps Server๋ ํธํ๋์ง ์์ต๋๋ค.
- ์์ค ์ฝ๋ ๊ฒ์ฌ์ ๊ฐ์ด Azure DevOps ํ์ดํ๋ผ์ธ์ ์์์ ์ผ๋ก ์ถ๊ฐ๋๋ ์์
์ GitHub Actions Importer ๊ฐ์ฌ์ GUID ์ด๋ฆ์ผ๋ก ์ถ๊ฐ๋ ์ ์์ต๋๋ค. GUID์ ์ฌ์ฉํ๊ธฐ ์ข์ ์์
์ด๋ฆ์ ์ฐพ์ผ๋ ค๋ฉด ์ด URL(
https://dev.azure.com/:organization/_apis/distributedtask/tasks/:guid
)์ ์ฌ์ฉํ ์ ์์ต๋๋ค.
์๋ ์์
ํน์ Azure DevOps ๊ตฌ๋ฌธ์ Azure DevOps์์ GitHub Actions ๊ตฌ์ฑ์ผ๋ก ์๋ ๋ง์ด๊ทธ๋ ์ด์ ํด์ผ ํฉ๋๋ค. ์ฌ๊ธฐ์๋ ๋ค์์ด ํฌํจ๋ฉ๋๋ค.
- ์กฐ์ง, ๋ฆฌํฌ์งํ ๋ฆฌ ๋ฐ ํ๊ฒฝ ๋น๋ฐ
- OIDC ์ฐ๊ฒฐ, GitHub Apps, personal access tokens ๋ฑ์ ์๋น์ค ์ฐ๊ฒฐ
- ์ ์ ์๋ ์์
- ์์ฒด ํธ์คํ ์์ด์ ํธ
- ํ๊ฒฝ
- ๋ฐฐํฌ ์ ์น์ธ
์๋ ๋ง์ด๊ทธ๋ ์ด์ ์ ๋ํ ์์ธํ ๋ด์ฉ์ Azure Pipelines์์ GitHub Actions๋ก ๋ง์ด๊ทธ๋ ์ด์ ์(๋ฅผ) ์ฐธ์กฐํ์ธ์.
์ง์๋์ง ์๋ ์์
GitHub Actions Importer์(๋) ๋ค์ ์์ ๋ง์ด๊ทธ๋ ์ด์ ์ ์ง์ํ์ง ์์ต๋๋ค.
- ๋ฐฐํฌ ์ ๊ฒ์ดํธ
- ๋ฐฐํฌ ํ ๊ฒ์ดํธ
- ๋ฐฐํฌ ํ ์น์ธ
- ์ผ๋ถ ๋ฆฌ์์ค ํธ๋ฆฌ๊ฑฐ
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 ๋ช
๋ น์ Azure DevOps ๋ฐ GitHub(์ผ)๋ก ์์
ํ ๋ GitHub Actions Importer์ ํ์ํ ์๊ฒฉ ์ฆ๋ช
๋ฐ ์ต์
์ ์ค์ ํ๋ ๋ฐ ์ฌ์ฉ๋ฉ๋๋ค.
-
GitHub personal access token (classic)์(๋ฅผ) ๋ง๋ญ๋๋ค. ์์ธํ ๋ด์ฉ์ ๊ฐ์ธ์ฉ ์ก์ธ์ค ํ ํฐ ๊ด๋ฆฌ์(๋ฅผ) ์ฐธ์กฐํ์ธ์.
์ด ํ ํฐ์๋
workflow
๋ฒ์๊ฐ ์์ด์ผ ํฉ๋๋ค.ํ ํฐ์ ๋ง๋ ํ ๋ณต์ฌํ๊ณ ๋์ค์ ์ฌ์ฉํ ์ ์๋๋ก ์์ ํ ์์น์ ์ ์ฅํฉ๋๋ค.
-
Azure DevOps personal access token์(๋ฅผ) ์์ฑํฉ๋๋ค. ์์ธํ ๋ด์ฉ์ Azure DevOps ์ค๋ช ์์ personal access tokens ์ฌ์ฉํ๊ธฐ๋ฅผ ์ฐธ์กฐํ์ธ์. ํ ํฐ์๋ ๋ค์ ๋ฒ์๊ฐ ์์ด์ผ ํฉ๋๋ค.
- ์์ด์ ํธ ํ:
Read
- ๋น๋:
Read
- ์ฝ๋:
Read
- ๋ฆด๋ฆฌ์ค:
Read
- ์๋น์ค ์ฐ๊ฒฐ:
Read
- ์์
๊ทธ๋ฃน:
Read
- ๋ณ์ ๊ทธ๋ฃน:
Read
ํ ํฐ์ ๋ง๋ ํ ๋ณต์ฌํ๊ณ ๋์ค์ ์ฌ์ฉํ ์ ์๋๋ก ์์ ํ ์์น์ ์ ์ฅํฉ๋๋ค.
- ์์ด์ ํธ ํ:
-
ํฐ๋ฏธ๋์์ GitHub Actions Importer
configure
CLI ๋ช ๋ น์ ์คํํฉ๋๋ค.gh actions-importer configure
configure
๋ช ๋ น์ ์คํํ๋ฉด ๋ค์ ์ ๋ณด๋ฅผ ์ ๋ ฅํ๋ผ๋ ๋ฉ์์ง๊ฐ ํ์๋ฉ๋๋ค:- "์ด๋ค CI ๊ณต๊ธ์๋ฅผ ๊ตฌ์ฑํ๊ณ ์๋์?"์ ๋ํด ํ์ดํ ํค๋ฅผ ์ฌ์ฉํ์ฌ
Azure DevOps
์(๋ฅผ) ์ ํํ๊ณ Space์ ๋๋ฌ ์ ํํ ๋ค์Enter๋ฅผ ๋๋ฆ ๋๋ค. - "Personal access token for GitHub"์ ์์ ๋ง๋ personal access token (classic)์ ๊ฐ์ ์ ๋ ฅํ๊ณ EnterEnter๋ค.
- โGitHub ์ธ์คํด์ค์ ๊ธฐ๋ณธ URLโ์ ๊ฒฝ์ฐ ์
๋ ฅ์ ๋๋ฌ ๊ธฐ๋ณธ๊ฐ(
https://github.com
)์ ์๋ฝํฉ๋๋ค. - "Azure DevOps์ฉ Personal access token"์ ๊ฒฝ์ฐ, ์ด์ ์ ๋ง๋ Azure DevOps personal access token์ ๊ฐ์ ์ ๋ ฅํ๊ณ Enter ํค๋ฅผ ๋๋ฆ ๋๋ค.
- "Azure DevOps ์ธ์คํด์ค์ ๊ธฐ๋ณธ URL"์ ๊ฒฝ์ฐ, Enter ํค๋ฅผ ๋๋ฌ ๊ธฐ๋ณธ๊ฐ(
https://dev.azure.com
)์ ์ ์ฉํฉ๋๋ค. - "Azure DevOps ์กฐ์ง ์ด๋ฆ"์ ๊ฒฝ์ฐ, Azure DevOps ์กฐ์ง์ ์ด๋ฆ์ ์ ๋ ฅํ๊ณ Enter ํค๋ฅผ ๋๋ฆ ๋๋ค.
- "Azure DevOps ํ๋ก์ ํธ ์ด๋ฆ"์ ๊ฒฝ์ฐ, Azure DevOps ํ๋ก์ ํธ์ ์ด๋ฆ์ ์ ๋ ฅํ๊ณ Enter ํค๋ฅผ ๋๋ฆ ๋๋ค.
configure
๋ช ๋ น์ ์๊ฐ ์๋์ ๋์ ์์ต๋๋ค:$ gh actions-importer configure โ Which CI providers are you configuring?: Azure DevOps Enter the following values (leave empty to omit): โ Personal access token for GitHub: *************** โ Base url of the GitHub instance: https://github.com โ Personal access token for Azure DevOps: *************** โ Base url of the Azure DevOps instance: https://dev.azure.com โ Azure DevOps organization name: :organization โ Azure DevOps project name: :project Environment variables successfully updated.
- "์ด๋ค CI ๊ณต๊ธ์๋ฅผ ๊ตฌ์ฑํ๊ณ ์๋์?"์ ๋ํด ํ์ดํ ํค๋ฅผ ์ฌ์ฉํ์ฌ
-
ํฐ๋ฏธ๋์์ GitHub Actions Importer
update
CLI ๋ช ๋ น์ ์คํํ์ฌ GitHub Packages Container registry์ ์ฐ๊ฒฐํ๊ณ , ์ปจํ ์ด๋ ์ด๋ฏธ์ง๊ฐ ์ต์ ๋ฒ์ ์ผ๋ก ์ ๋ฐ์ดํธ๋์๋์ง ํ์ธํฉ๋๋ค.gh actions-importer update
๋ช ๋ น์ ์ถ๋ ฅ์ ์๋์ ๋น์ทํด์ผ ํฉ๋๋ค:
Updating ghcr.io/actions-importer/cli:latest... ghcr.io/actions-importer/cli:latest up-to-date
Azure DevOps ๊ฐ์ฌ ์ํ
audit
๋ช
๋ น์ผ๋ก Azure DevOps ์กฐ์ง์ ๋ชจ๋ ํ๋ก์ ํธ๋ฅผ ๊ฐ๋ต์ ์ผ๋ก ๋ณผ ์ ์์ต๋๋ค.
audit
๋ช
๋ น์ ๋ค์ ๋จ๊ณ๋ฅผ ์ํํฉ๋๋ค:
- Azure DevOps ์กฐ์ง์ ์ ์๋ ๋ชจ๋ ํ๋ก์ ํธ๋ฅผ ๊ฐ์ ธ์ต๋๋ค.
- ๊ฐ ํ์ดํ๋ผ์ธ์ ํด๋นํ๋ GitHub Actions ์ํฌํ๋ก๋ก ๋ณํํฉ๋๋ค.
- GitHub Actions Importer์(๋ฅผ) ์ฌ์ฉํ์ฌ ๋ง์ด๊ทธ๋ ์ด์ ์ ์์ ํ๊ณ ๋ณต์กํ ์์ ์ด ๊ฐ๋ฅํ ๋ฐฉ๋ฒ์ ์์ฝํ๋ ๋ณด๊ณ ์๋ฅผ ์์ฑํฉ๋๋ค.
๊ฐ์ฌ ๋ช ๋ น ์คํ
Azure DevOps ์กฐ์ง ๊ฐ์ฌ๋ฅผ ์ํํ๋ ค๋ฉด ํฐ๋ฏธ๋์์ ๋ค์ ๋ช ๋ น์ ์คํํฉ๋๋ค.
gh actions-importer audit azure-devops --output-dir tmp/audit
๊ฐ์ฌ ๊ฒฐ๊ณผ ๊ฒ์ฌํ๊ธฐ
์ง์ ๋ ์ถ๋ ฅ ๋๋ ํฐ๋ฆฌ์ ํ์ผ์๋ ๊ฐ์ฌ์ ๊ฒฐ๊ณผ๊ฐ ํฌํจ๋ฉ๋๋ค. ๊ฐ์ฌ ๊ฒฐ๊ณผ์ ๋ํ ์์ฝ์ 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
ํ์ผ์๋ ์ฑ๊ณต์ ์ผ๋ก ๋ณํ๋ ๊ฐ ํ์ดํ๋ผ์ธ์์ ์ฌ์ฉ๋๋ ๋ชจ๋ ์์
, ๋น๋ฐ ๋ฐ ์คํ๊ธฐ์ ์ผํ๋ก ๊ตฌ๋ถ๋ ๋ชฉ๋ก์ด ํฌํจ๋ฉ๋๋ค. ์ด๋ ์์
, ๋น๋ฐ ๋๋ ์คํ๊ธฐ๋ฅผ ์ฌ์ฉํ๋ ์ํฌํ๋ก๋ฅผ ๊ฒฐ์ ํ๋ ๋ฐ ์ ์ฉํ ์ ์์ผ๋ฉฐ, ๋ณด์ ๊ฒํ ๋ฅผ ์ํํ๋ ๋ฐ ์ ์ฉํ ์ ์์ต๋๋ค.
์ ์ฌ์ ์ธ GitHub Actions ์ฌ์ฉ๋ ์์ธก
forecast
๋ช
๋ น์ผ๋ก Azure DevOps์์ ์๋ฃ๋ ํ์ดํ๋ผ์ธ ์คํ์ ๋ฉํธ๋ฆญ์ ๊ณ์ฐํ์ฌ ์ ์ฌ์ ์ธ GitHub Actions ์ฌ์ฉ๋์ ์์ธกํ ์ ์์ต๋๋ค.
์์ธก ๋ช ๋ น ์คํํ๊ธฐ
์ ์ฌ์ ์ธ GitHub Actions ์ฌ์ฉ๋์ ์์ธกํ๋ ค๋ฉด ํฐ๋ฏธ๋์์ ๋ค์ ๋ช ๋ น์ ์คํํฉ๋๋ค. ๊ธฐ๋ณธ์ ์ผ๋ก GitHub Actions Importer์(๋) ์์ธก ๋ณด๊ณ ์์ ์ด์ 7์ผ์ ํฌํจํฉ๋๋ค.
gh actions-importer forecast azure-devops --output-dir tmp/forecast_reports
์์ธก ๋ณด๊ณ ์ ๊ฒ์ฌํ๊ธฐ
์ง์ ๋ ์ถ๋ ฅ ๋๋ ํฐ๋ฆฌ์ forecast_report.md
ํ์ผ์ ์์ธก ๊ฒฐ๊ณผ๊ฐ ํฌํจ๋์ด ์์ต๋๋ค.
๋ค์์ ์์ ๋ณด๊ณ ์์ ํ์๋ ์ ์๋ ๋ช ๊ฐ์ง ์ฃผ์ ์ฉ์ด์ ๋๋ค:
-
์์ ์๋ ์๋ฃ๋ ์์ ์ ์ด ๊ฐ์์ ๋๋ค.
-
ํ์ดํ๋ผ์ธ ์๋ ์ฌ์ฉ๋ ๊ณ ์ ํ์ดํ๋ผ์ธ์ ์์ ๋๋ค.
-
์คํ ์๊ฐ: ์ ๋ฌ๋๊ฐ ์์ ์ ์๋นํ ์๊ฐ์ ๋ํ๋ ๋๋ค. ์ด ๋ฉํธ๋ฆญ์ ์ฌ์ฉํ์ฌ GitHubํธ์คํฐ๋ ์คํ๊ธฐ์ ๋น์ฉ์ ๊ณํํ๋ ๋ฐ ๋์์ด ๋ ์ ์์ต๋๋ค.
์ด ๋ฉํธ๋ฆญ์ GitHub Actions์ ์ง์ถํด์ผ ํ๋ ๊ธ์ก๊ณผ ์๊ด ๊ด๊ณ๊ฐ ์์ต๋๋ค. ํด๋น ๊ธ์ก์ ์์ ์๊ฐ(๋ถ) ๋์ ์ฌ์ฉ๋๋ ํ๋์จ์ด์ ๋ฐ๋ผ ๋ฌ๋ผ์ง๋๋ค. GitHub Actions ๊ฐ๊ฒฉ ๊ณ์ฐ๊ธฐ๋ฅผ ์ฌ์ฉํ์ฌ ๋น์ฉ์ ์ถ์ ํ ์ ์์ต๋๋ค.
-
ํ ์๊ฐ: ๋ฉํธ๋ฆญ์ ์์ ์ด ์คํํ ์ ์๋ ๋ฌ๋๋ฅผ ๊ธฐ๋ค๋ฆฌ๋ ๋ฐ ์์๋๋ ์๊ฐ์ ๋ํ๋ ๋๋ค.
-
๋์ ์์ ๋ฉํธ๋ฆญ์ ํน์ ์๊ฐ์ ์คํ ์ค์ธ ์์ ์ ์์ ์ค๋ช ํฉ๋๋ค. ์ด ๋ฉํธ๋ฆญ์ ๊ตฌ์ฑํด์ผ ํ๋ ๋ฌ๋ ์๋ฅผ ์ ์ํ๋ ๋ฐ ์ฌ์ฉํ ์ ์์ต๋๋ค.
๋ํ ์ด๋ฌํ ๋ฉํธ๋ฆญ์ Azure DevOps์ ๊ฐ ์คํ๊ธฐ ํ์ ๋ฐ๋ผ ์ ์๋ฉ๋๋ค. ์ด ๊ธฐ๋ฅ์ ํธ์คํธํ ๋๋ ์์ฒด ํธ์คํ ํ ๋ฐ๋ ๋๋ ๊ณ ์ฌ์ ๋๋ ์ ์ฌ์ ์ปดํจํฐ๊ฐ ํผํฉ๋์ด ์๋ ๊ฒฝ์ฐ ํนํ ์ ์ฉํ๋ฏ๋ก ๋ค์ํ ์ ํ์ ๋ฐ๋์ ํน์ ํ ๋ฉํธ๋ฆญ์ ํ์ธํ ์ ์์ต๋๋ค.
์ํ ์คํ ๋ง์ด๊ทธ๋ ์ด์ ์ํ
dry-run
๋ช
๋ น์ ์ฌ์ฉํ์ฌ Azure DevOps ํ์ดํ๋ผ์ธ์ ํด๋น GitHub Actions ์ํฌํ๋ก๋ก ๋ณํํ ์ ์์ต๋๋ค. ๋๋ผ์ด๋ฐ์ ์ง์ ๋ ๋๋ ํฐ๋ฆฌ์ ์ถ๋ ฅ ํ์ผ์ ๋ง๋ค์ง๋ง ํ์ดํ๋ผ์ธ ๋ง์ด๊ทธ๋ ์ด์
์ ์ํ ํ ๋ฆฌํ์คํธ๋ฅผ ์ด์ง ์์ต๋๋ค.
GitHub Actions Importer์ด(๊ฐ) ์ ์ ์๋ ๋น๋ ๋จ๊ณ ๋๋ ๋ถ๋ถ์ ์ผ๋ก ์ฑ๊ณตํ ํ์ดํ๋ผ์ธ๊ณผ ๊ฐ์ด ์๋์ผ๋ก ๋ณํํ ์ ์๋ ํญ๋ชฉ์ด ์๋ ๊ฒฝ์ฐ ๋ณํ ํ๋ก์ธ์ค๋ฅผ ์ถ๊ฐ๋ก ์ฌ์ฉ์ ์ง์ ํ๋ ์ฌ์ฉ์ ์ง์ ๋ณํ๊ธฐ๋ฅผ ๋ง๋ค ์ ์์ต๋๋ค. ์์ธํ ๋ด์ฉ์ ์ฌ์ฉ์ ์ง์ ๋ณํ๊ธฐ๋ฅผ ์ฌ์ฉํ์ฌ GitHub Actions ๊ฐ์ ธ์ค๊ธฐ ํ์ฅ์(๋ฅผ) ์ฐธ์กฐํ์ธ์.
๋น๋ ํ์ดํ๋ผ์ธ์ ๋ํ ๋๋ผ์ด ๋ฐ ๋ช ๋ น ์คํํ๊ธฐ
Azure DevOps ๋น๋ ํ์ดํ๋ผ์ธ์ GitHub Actions(์ผ)๋ก ๋ง์ด๊ทธ๋ ์ด์
ํ๋ ๋๋ผ์ด ๋ฐ์ ์ํํ๋ ค๋ฉด ํฐ๋ฏธ๋์์ ๋ค์ ๋ช
๋ น์ ์คํํ์ฌ pipeline_id
์(๋ฅผ) ๋ณํํ๋ ค๋ ํ์ดํ๋ผ์ธ์ ID๋ก ๋ฐ๊ฟ๋๋ค.
gh actions-importer dry-run azure-devops pipeline --pipeline-id :pipeline_id --output-dir tmp/dry-run
์ง์ ๋ ์ถ๋ ฅ ๋๋ ํฐ๋ฆฌ์์ ๋๋ผ์ด๋ฐ ๋ก๊ทธ ๋ฐ ๋ณํ๋ ์ํฌํ๋ก ํ์ผ์ ๋ณผ ์ ์์ต๋๋ค.
๋ฆด๋ฆฌ์ค ํ์ดํ๋ผ์ธ์ ๋ํ ๋๋ผ์ด ๋ฐ ๋ช ๋ น ์คํํ๊ธฐ
Azure DevOps ๋ฆด๋ฆฌ์ค ํ์ดํ๋ผ์ธ์ GitHub Actions(์ผ)๋ก ๋ง์ด๊ทธ๋ ์ด์
ํ๋ ๋๋ผ์ด ๋ฐ์ ์ํํ๋ ค๋ฉด ํฐ๋ฏธ๋์์ ๋ค์ ๋ช
๋ น์ ์คํํ์ฌ pipeline_id
์(๋ฅผ) ๋ณํํ๋ ค๋ ํ์ดํ๋ผ์ธ์ ID๋ก ๋ฐ๊ฟ๋๋ค.
gh actions-importer dry-run azure-devops release --pipeline-id :pipeline_id --output-dir tmp/dry-run
์ง์ ๋ ์ถ๋ ฅ ๋๋ ํฐ๋ฆฌ์์ ๋๋ผ์ด๋ฐ ๋ก๊ทธ ๋ฐ ๋ณํ๋ ์ํฌํ๋ก ํ์ผ์ ๋ณผ ์ ์์ต๋๋ค.
์์ฐ ๋ง์ด๊ทธ๋ ์ด์ ์ํ
migrate
๋ช
๋ น์ผ๋ก Azure DevOps ํ์ดํ๋ผ์ธ์ ๋ณํํ๊ณ ํด๋นํ๋ GitHub Actions ์ํฌํ๋ก๋ฅผ ์ฌ์ฉํ์ฌ ๋์ด์ค๊ธฐ ์์ฒญ์ ์ด ์ ์์ต๋๋ค.
๋น๋ ํ์ดํ๋ผ์ธ์ ๋ํ ๋ง์ด๊ทธ๋ ์ด์ ๋ช ๋ น ์คํํ๊ธฐ
Azure DevOps ๋น๋ ํ์ดํ๋ผ์ธ์ GitHub Actions(์ผ)๋ก ๋ง์ด๊ทธ๋ ์ด์
ํ๋ ค๋ฉด ํฐ๋ฏธ๋์์ ๋ค์ ๋ช
๋ น์ ์คํํ์ฌ target-url
๊ฐ์ ๋ฆฌํฌ์งํ ๋ฆฌ์ URL๋ก ๋ฐ๊พธ๊ณ , pipeline_id
์(๋ฅผ) ๋ณํํ๋ ํ์ดํ๋ผ์ธ์ ID๋ก ๋ฐ๊ฟ๋๋ค.
gh actions-importer migrate azure-devops pipeline --pipeline-id :pipeline_id --target-url https://github.com/octo-org/octo-repo --output-dir tmp/migrate
๋ช ๋ น์ ์ถ๋ ฅ์๋ ๋ณํ๋ ์ํฌํ๋ก๋ฅผ ๋ฆฌํฌ์งํ ๋ฆฌ์ ์ถ๊ฐํ๋ ํ ๋ฆฌํ์คํธ์ URL์ด ํฌํจ๋ฉ๋๋ค. ์ฑ๊ณต์ ์ธ ์ถ๋ ฅ์ ์๋ ๋ค์๊ณผ ์ ์ฌํฉ๋๋ค:
$ gh actions-importer migrate azure-devops pipeline --target-url https://github.com/octo-org/octo-repo --output-dir tmp/migrate --azure-devops-project my-azure-devops-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'
๋ฆด๋ฆฌ์ค ํ์ดํ๋ผ์ธ์ ๋ํ ๋ง์ด๊ทธ๋ ์ด์ ๋ช ๋ น ์คํํ๊ธฐ
Azure DevOps ๋ฆด๋ฆฌ์ค ํ์ดํ๋ผ์ธ์ GitHub Actions(์ผ)๋ก ๋ง์ด๊ทธ๋ ์ด์
ํ๋ ค๋ฉด ํฐ๋ฏธ๋์์ ๋ค์ ๋ช
๋ น์ ์คํํ์ฌ target-url
๊ฐ์ ๋ฆฌํฌ์งํ ๋ฆฌ์ URL๋ก ๋ฐ๊พธ๊ณ , pipeline_id
์(๋ฅผ) ๋ณํํ๋ ํ์ดํ๋ผ์ธ์ ID๋ก ๋ฐ๊ฟ๋๋ค.
gh actions-importer migrate azure-devops release --pipeline-id :pipeline_id --target-url https://github.com/octo-org/octo-repo --output-dir tmp/migrate
๋ช ๋ น์ ์ถ๋ ฅ์๋ ๋ณํ๋ ์ํฌํ๋ก๋ฅผ ๋ฆฌํฌ์งํ ๋ฆฌ์ ์ถ๊ฐํ๋ ํ ๋ฆฌํ์คํธ์ URL์ด ํฌํจ๋ฉ๋๋ค. ์ฑ๊ณต์ ์ธ ์ถ๋ ฅ์ ์๋ ๋ค์๊ณผ ์ ์ฌํฉ๋๋ค:
$ gh actions-importer migrate azure-devops release --target-url https://github.com/octo-org/octo-repo --output-dir tmp/migrate --azure-devops-project my-azure-devops-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์(๋ฅผ) ์ฌ์ฉํ์ฌ Azure DevOps์์ ๋ง์ด๊ทธ๋ ์ด์ ํ ๋์ ํ๊ฒฝ ๋ณ์, ์ ํํ ์ธ์, ์ง์๋๋ ๊ตฌ๋ฌธ์ ๋ํ ์ฐธ์กฐ ์ ๋ณด๊ฐ ํฌํจ๋์ด ์์ต๋๋ค.
๊ตฌ์ฑ ํ๊ฒฝ ๋ณ์
GitHub Actions Importer์(๋) ์ธ์ฆ ๊ตฌ์ฑ์ ํ๊ฒฝ ๋ณ์๋ฅผ ์ฌ์ฉํฉ๋๋ค. ์ด๋ฌํ ๋ณ์๋ configure
๋ช
๋ น์ ์ฌ์ฉํ์ฌ ๊ตฌ์ฑ ํ๋ก์ธ์ค๋ฅผ ๋ฐ๋ฅด๋ฉด ์ค์ ๋ฉ๋๋ค. ์์ธํ ์ ๋ณด๋ ์๊ฒฉ ์ฆ๋ช
๊ตฌ์ฑ ์น์
์ ์ฐธ์กฐํ์ธ์.
GitHub Actions Importer์(๋) ๋ค์ ํ๊ฒฝ ๋ณ์๋ฅผ ์ฌ์ฉํ์ฌ Azure DevOps ์ธ์คํด์ค์ ์ฐ๊ฒฐํฉ๋๋ค.
GITHUB_ACCESS_TOKEN
: ๋ณํ๋ ์ํฌํ๋ก(workflow
๋ฒ์ ํ์)๋ฅผ ์ฌ์ฉํ์ฌ ๋์ด์ค๊ธฐ ์์ฒญ์ ๋ง๋๋ ๋ฐ ์ฌ์ฉ๋๋ personal access token (classic)์ ๋๋ค.GITHUB_INSTANCE_URL
: ๋์ GitHub ์ธ์คํด์ค์ URL์ ๋๋ค(์:https://github.com
).AZURE_DEVOPS_ACCESS_TOKEN
: Azure DevOps ์ธ์คํด์ค๋ฅผ ์ธ์ฆํ๋ ๋ฐ ์ฌ์ฉ๋๋ personal access token์ ๋๋ค. ์ด ํ ํฐ์๋ ๋ค์ ๋ฒ์๊ฐ ํ์ํฉ๋๋ค.- ๋น๋:
Read
- ์์ด์ ํธ ํ:
Read
- ์ฝ๋:
Read
- ๋ฆด๋ฆฌ์ค:
Read
- ์๋น์ค ์ฐ๊ฒฐ:
Read
- ์์
๊ทธ๋ฃน:
Read
- ๋ณ์ ๊ทธ๋ฃน:
Read
- ๋น๋:
AZURE_DEVOPS_PROJECT
: ํ์ดํ๋ผ์ธ์ ๋ง์ด๊ทธ๋ ์ด์ ํ ๋ ์ฌ์ฉํ ํ๋ก์ ํธ ์ด๋ฆ ๋๋ GUID์ ๋๋ค. ๋ชจ๋ ํ๋ก์ ํธ์ ๋ํด ๊ฐ์ฌ๋ฅผ ์ํํ๋ ค๋ ๊ฒฝ์ฐ ์ด๋ ์ ํ ์ฌํญ์ ๋๋ค.AZURE_DEVOPS_ORGANIZATION
: Azure DevOps ์ธ์คํด์ค์ค์ ์กฐ์ง ์ด๋ฆ์ ๋๋ค.AZURE_DEVOPS_INSTANCE_URL
: Azure DevOps ์ธ์คํด์ค์ URL(์:https://dev.azure.com
)์ ๋๋ค.
์ด๋ฌํ ํ๊ฒฝ ๋ณ์๋ .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 azure-devops pipeline --output-dir ./output/ --source-file-path ./path/to/azure_devops/pipeline.yml
--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 azure-devops pipeline --output-dir ./output/ --config-file-path ./path/to/azure_devops/config.yml
๊ตฌ์ฑ ํ์ผ์ ์ฌ์ฉํ์ฌ Azure DevOps ์ธ์คํด์ค๋ฅผ ๊ฐ์ฌํ๋ ค๋ฉด ๊ตฌ์ฑ ํ์ผ์ด ๋ค์๊ณผ ๊ฐ์ ํ์์ด์ด์ผ ํ๋ฉฐ, ๊ฐ repository_slug
๊ฐ์ ๊ณ ์ ํด์ผ ํฉ๋๋ค.
source_files:
- repository_slug: azdo-project/1
path: file.yml
- repository_slug: azdo-project/2
paths: path.yml
Azure DevOps ์กฐ์ง ์ด๋ฆ, ํ๋ก์ ํธ ์ด๋ฆ ๋ฐ ํ์ดํ๋ผ์ธ ID๋ฅผ ๊ฒฐํฉํ์ฌ ํ์ดํ๋ผ์ธ์ ๋ํด repository_slug
์(๋ฅผ) ์์ฑํ ์ ์์ต๋๋ค. ์๋ค ๋ค์ด my-organization-name/my-project-name/42
์
๋๋ค.
๋๋ผ์ด ์คํ ์
์ด ์์ ์์ GitHub Actions Importer๋ ์ง์ ๋ YAML ๊ตฌ์ฑ ํ์ผ์ ์์ค ํ์ผ๋ก ์ฌ์ฉํ์ฌ ๋๋ผ์ด๋ฐ์ ์ํํฉ๋๋ค.
ํ์ดํ๋ผ์ธ์ ๊ตฌ์ฑ ํ์ผ์ repository_slug
์(๋ฅผ) --azure-devops-organization
๋ฐ --azure-devops-project
์ต์
๊ฐ๊ณผ ์ผ์น์์ผ ์ ํํฉ๋๋ค. ๊ทธ๋ฐ ๋ค์ path
์ ์ง์ ๋ ์์ค ํ์ผ์ ๊ฐ์ ธ์ค๋ ๋ฐ ์ฌ์ฉ๋ฉ๋๋ค.
gh actions-importer dry-run azure-devops pipeline --output-dir ./output/ --config-file-path ./path/to/azure_devops/config.yml
๋ณํ๋๊ณ ์ฌ์ฌ์ฉ ๊ฐ๋ฅํ ์ํฌํ๋ก ๋ฐ ๋ณตํฉ ์์ ์ ๋ฆฌํฌ์งํ ๋ฆฌ ์ง์
GitHub Actions Importer์(๋) --config-file-path
์ธ์์ ์ ๊ณต๋ YAML ํ์ผ์ ์ฌ์ฉํ์ฌ ๋ณํ๋๊ณ ์ฌ์ฌ์ฉ ๊ฐ๋ฅํ ์ํฌํ๋ก์ ๋ณตํฉ ์์
์ด ๋ง์ด๊ทธ๋ ์ด์
๋๋ ๋ฆฌํฌ์งํ ๋ฆฌ๋ฅผ ๊ฒฐ์ ํฉ๋๋ค.
์์ํ๋ ค๋ฉด --config-file-path
์ธ์ ์์ด ๊ฐ์ฌ๋ฅผ ์คํํด์ผ ํฉ๋๋ค.
gh actions-importer audit azure-devops --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
composite_actions:
- name: my-composite-action.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 azure-devops pipeline --config-file-path config.yml --target-url https://github.com/my-org/my-repo
Azure DevOps ํ์ดํ๋ผ์ธ์ ์ง์๋๋ ๊ตฌ๋ฌธ
๋ค์ ํ์๋ GitHub Actions Importer๊ฐ ํ์ฌ ๋ณํํ ์ ์๋ ์์ฑ ์ ํ์ด ๋์ ์์ต๋๋ค.
Azure Pipelines | GitHub Actions | ์ํ |
---|---|---|
condition |
| ์ง์ ์ฌ๋ถ |
์ปจํ ์ด๋ |
| ์ง์ ์ฌ๋ถ |
continuousIntegration |
| ์ง์ ์ฌ๋ถ |
์์ (job) |
| ์ง์ ์ฌ๋ถ |
pullRequest |
| ์ง์ ์ฌ๋ถ |
stage(๋จ๊ณ) |
| ์ง์ ์ฌ๋ถ |
steps |
| ์ง์ ์ฌ๋ถ |
์ ๋ต |
| ์ง์ ์ฌ๋ถ |
timeoutInMinutes |
| ์ง์ ์ฌ๋ถ |
variables |
| ์ง์ ์ฌ๋ถ |
์๋ ๋ฐฐํฌ |
| ๋ถ๋ถ์ ์ผ๋ก ์ง์๋จ |
ํ |
| ๋ถ๋ถ์ ์ผ๋ก ์ง์๋จ |
services |
| ๋ถ๋ถ์ ์ผ๋ก ์ง์๋จ |
์ ๋ต |
| ๋ถ๋ถ์ ์ผ๋ก ์ง์๋จ |
ํธ๋ฆฌ๊ฑฐ |
| ๋ถ๋ถ์ ์ผ๋ก ์ง์๋จ |
pullRequest |
| ์ง์๋์ง ์์ |
์ค์ผ์ค |
| ์ง์๋์ง ์์ |
ํธ๋ฆฌ๊ฑฐ |
| ์ง์๋์ง ์์ |
์ง์๋๋ Azure DevOps ์์
์ ๋ํ ์์ธํ ๋ด์ฉ์ github/gh-actions-importer
๋ฆฌํฌ์งํ ๋ฆฌ๋ฅผ ์ฐธ์กฐํ์ธ์.
ํ๊ฒฝ ๋ณ์ ๋งคํ
GitHub Actions Importer์(๋) ์๋ ํ์ ๋งคํ์ ์ฌ์ฉํ์ฌ ๊ธฐ๋ณธ Azure DevOps ํ๊ฒฝ ๋ณ์๋ฅผ GitHub Actions ๋ด์ ๊ฐ์ฅ ๊ฐ๊น์ด ๊ฐ์ผ๋ก ๋ณํํฉ๋๋ค.
Azure Pipelines | GitHub Actions |
---|---|
$(Agent.BuildDirectory) | ${{ runner.workspace }} |
$(Agent.HomeDirectory) | ${{ env.HOME }} |
$(Agent.JobName) | ${{ github.job }} |
$(Agent.OS) | ${{ runner.os }} |
$(Agent.ReleaseDirectory) | ${{ github.workspace}} |
$(Agent.RootDirectory) | ${{ github.workspace }} |
$(Agent.ToolsDirectory) | ${{ runner.tool_cache }} |
$(Agent.WorkFolder) | ${{ github.workspace }} |
$(Build.ArtifactStagingDirectory) | ${{ runner.temp }} |
$(Build.BinariesDirectory) | ${{ github.workspace }} |
$(Build.BuildId) | ${{ github.run_id }} |
$(Build.BuildNumber) | ${{ github.run_number }} |
$(Build.DefinitionId) | ${{ github.workflow }} |
$(Build.DefinitionName) | ${{ github.workflow }} |
$(Build.PullRequest.TargetBranch) | ${{ github.base_ref }} |
$(Build.PullRequest.TargetBranch.Name) | ${{ github.base_ref }} |
$(Build.QueuedBy) | ${{ github.actor }} |
$(Build.Reason) | ${{ github.event_name }} |
$(Build.Repository.LocalPath) | ${{ github.workspace }} |
$(Build.Repository.Name) | ${{ github.repository }} |
$(Build.Repository.Provider) | GitHub |
$(Build.Repository.Uri) | ${{ github.server.url }}/${{ github.repository }} |
$(Build.RequestedFor) | ${{ github.actor }} |
$(Build.SourceBranch) | ${{ github.ref }} |
$(Build.SourceBranchName) | ${{ github.ref }} |
$(Build.SourceVersion) | ${{ github.sha }} |
$(Build.SourcesDirectory) | ${{ github.workspace }} |
$(Build.StagingDirectory) | ${{ runner.temp }} |
$(Pipeline.Workspace) | ${{ runner.workspace }} |
$(Release.DefinitionEnvironmentId) | ${{ github.job }} |
$(Release.DefinitionId) | ${{ github.workflow }} |
$(Release.DefinitionName) | ${{ github.workflow }} |
$(Release.Deployment.RequestedFor) | ${{ github.actor }} |
$(Release.DeploymentID) | ${{ github.run_id }} |
$(Release.EnvironmentId) | ${{ github.job }} |
$(Release.EnvironmentName) | ${{ github.job }} |
$(Release.Reason) | ${{ github.event_name }} |
$(Release.RequestedFor) | ${{ github.actor }} |
$(System.ArtifactsDirectory) | ${{ github.workspace }} |
$(System.DefaultWorkingDirectory) | ${{ github.workspace }} |
$(System.HostType) | build |
$(System.JobId) | ${{ github.job }} |
$(System.JobName) | ${{ github.job }} |
$(System.PullRequest.PullRequestId) | ${{ github.event.number }} |
$(System.PullRequest.PullRequestNumber) | ${{ github.event.number }} |
$(System.PullRequest.SourceBranch) | ${{ github.ref }} |
$(System.PullRequest.SourceRepositoryUri) | ${{ github.server.url }}/${{ github.repository }} |
$(System.PullRequest.TargetBranch) | ${{ github.event.base.ref }} |
$(System.PullRequest.TargetBranchName) | ${{ github.event.base.ref }} |
$(System.StageAttempt) | ${{ github.run_number }} |
$(System.TeamFoundationCollectionUri) | ${{ github.server.url }}/${{ github.repository }} |
$(System.WorkFolder) | ${{ github.workspace }} |
ํ ํ๋ฆฟ
GitHub Actions Importer์(๋ฅผ) ์ฌ์ฉํ์ฌ Azure DevOps ํ ํ๋ฆฟ์ ๋ณํํ ์ ์์ต๋๋ค.
์ ํ ์ฌํญ
GitHub Actions Importer์(๋) ๋ช ๊ฐ์ง ์ ํ ํ์ Azure DevOps ํ ํ๋ฆฟ์ ๋ณํํ ์ ์์ต๋๋ค.
stages
๋ฐdeployments
์์ ์ฌ์ฉ๋๋ Azure DevOps ํ ํ๋ฆฟ๊ณผjobs
ํค๋ GitHub Actions์์ ์ฌ์ฌ์ฉ ๊ฐ๋ฅํ ์ํฌํ๋ก๋ก ๋ณํ๋ฉ๋๋ค. ์์ธํ ๋ด์ฉ์ ์ํฌํ๋ก ๋ค์ ์ฌ์ฉ์(๋ฅผ) ์ฐธ์กฐํ์ธ์.steps
ํค์์ ์ฌ์ฉ๋๋ Azure DevOps ํ ํ๋ฆฟ์ ๋ณตํฉ ์์ ์ผ๋ก ๋ณํ๋ฉ๋๋ค. ์์ธํ ๋ด์ฉ์ ๋ณตํฉ ์์ ๋ง๋ค๊ธฐ์(๋ฅผ) ์ฐธ์กฐํ์ธ์.- ํ์ฌ ๋ค๋ฅธ ์์ ํ ํ๋ฆฟ์ ์ฐธ์กฐํ๋ ์์ ํ ํ๋ฆฟ์ด ์๋ ๊ฒฝ์ฐ, GitHub Actions Importer์(๋) ํ ํ๋ฆฟ์ ์ฌ์ฌ์ฉ ๊ฐ๋ฅํ ์ํฌํ๋ก๋ก ๋ณํํฉ๋๋ค. ์ฌ์ฌ์ฉ ๊ฐ๋ฅํ ์ํฌํ๋ก๋ ๋ค๋ฅธ ์ฌ์ฌ์ฉ ๊ฐ๋ฅํ ์ํฌํ๋ก๋ฅผ ์ฐธ์กฐํ ์ ์์ผ๋ฏ๋ก, ์ด ๊ตฌ๋ฌธ์ GitHub Actions์์ ์ ํจํ์ง ์์ต๋๋ค. ์ค์ฒฉ๋ ์ฌ์ฌ์ฉ ๊ฐ๋ฅํ ์ํฌํ๋ก๋ ์๋์ผ๋ก ์์ ํด์ผ ํฉ๋๋ค.
- ํ
ํ๋ฆฟ์ด ์ธ๋ถ Azure DevOps ์กฐ์ง ๋๋ GitHub ๋ฆฌํฌ์งํ ๋ฆฌ๋ฅผ ์ฐธ์กฐํ๋ ๊ฒฝ์ฐ, ์ด ํ
ํ๋ฆฟ์ ์ก์ธ์คํ๊ธฐ ์ํ ์๊ฒฉ ์ฆ๋ช
์ ์ ๊ณตํ๋
--credentials-file
์ต์ ์ ์ฌ์ฉํด์ผ ํฉ๋๋ค. ์์ธํ ๋ด์ฉ์ ์ถ๊ฐ ์ธ์ ๋ฐ ์ค์ ์(๋ฅผ) ์ฐธ์กฐํ์ธ์. - ๋ค์ ์ฃผ์ ์ฌํญ๊ณผ ํจ๊ป
each
์์ ์ฌ์ฉํ์ฌ YAML์ ๋์ ์ผ๋ก ์์ฑํ ์ ์์ต๋๋ค.- ์ค์ฒฉ๋
each
๋ธ๋ก์ ์ง์๋์ง ์๊ธฐ ๋๋ฌธ์ ์์each
๋ธ๋ก๋ ์ง์๋์ง ์์ต๋๋ค. each
๋ฐ ํฌํจ๋if
์กฐ๊ฑด์ GitHub Actions์ด(๊ฐ) ์ด ์ฝ์ ์คํ์ผ์ ์ง์ํ์ง ์์ผ๋ฏ๋ก ๋ณํ ์ ํ๊ฐ๋ฉ๋๋ค.elseif
๋ธ๋ก์ ์ง์๋์ง ์์ต๋๋ค. ์ด ๊ธฐ๋ฅ์ด ํ์ํ ๊ฒฝ์ฐ ์๋์ผ๋ก ์์ ํด์ผ ํฉ๋๋ค.- ์ค์ฒฉ๋
if
๋ธ๋ก์ ์ง์๋์ง๋งif
์กฐ๊ฑด ํ์์ ์ค์ฒฉ๋if/elseif/else
๋ธ๋ก์ ์ง์๋์ง ์์ต๋๋ค. - ๋ฏธ๋ฆฌ ์ ์๋ Azure DevOps ๋ณ์๋ฅผ ์ฌ์ฉํ๋
if
๋ธ๋ก์ ์ง์๋์ง ์์ต๋๋ค.
- ์ค์ฒฉ๋
์ง์๋๋ ํ ํ๋ฆฟ
GitHub Actions Importer์(๋) ์๋ ํ์ ๊ธฐ์ฌ๋ ํ ํ๋ฆฟ์ ์ง์ํฉ๋๋ค.
Azure Pipelines | GitHub Actions | ์ํ |
---|---|---|
ํ ํ๋ฆฟ์์ ํ์ฅํ๊ธฐ | Reusable workflow | ์ง์ ์ฌ๋ถ |
์์ ํ ํ๋ฆฟ | Reusable workflow | ์ง์ ์ฌ๋ถ |
์คํ ์ด์ง ํ ํ๋ฆฟ | Reusable workflow | ์ง์ ์ฌ๋ถ |
๋จ๊ณ ํ ํ๋ฆฟ | Composite action | ์ง์ ์ฌ๋ถ |
ํด๋์ ํธ์ง๊ธฐ ๋ด ์์ ๊ทธ๋ฃน | ์ํฉ์ ๋ฐ๋ผ ๋ค๋ฆ | ์ง์ ์ฌ๋ถ |
๋ค๋ฅธ Azure DevOps ์กฐ์ง, ํ๋ก์ ํธ ๋๋ ๋ฆฌํฌ์งํ ๋ฆฌ์ ํ ํ๋ฆฟ | ์ํฉ์ ๋ฐ๋ผ ๋ค๋ฆ | ์ง์ ์ฌ๋ถ |
GitHub ๋ฆฌํฌ์งํ ๋ฆฌ์ ํ ํ๋ฆฟ | ์ํฉ์ ๋ฐ๋ผ ๋ค๋ฆ | ์ง์ ์ฌ๋ถ |
๋ณ์ ํ ํ๋ฆฟ | env | ์ง์ ์ฌ๋ถ |
์กฐ๊ฑด๋ถ ์ฝ์ | ์์
/๋จ๊ณ์ if ์กฐ๊ฑด | ๋ถ๋ถ์ ์ผ๋ก ์ง์๋จ |
๋ฐ๋ณต์ ์ฝ์ | ํด๋น ์์ | ๋ถ๋ถ์ ์ผ๋ก ์ง์๋จ |
๋งค๊ฐ ๋ณ์๊ฐ ์๋ ํ ํ๋ฆฟ | ์ํฉ์ ๋ฐ๋ผ ๋ค๋ฆ | ๋ถ๋ถ์ ์ผ๋ก ์ง์๋จ |
ํ ํ๋ฆฟ ํ์ผ ๊ฒฝ๋ก ์ด๋ฆ
GitHub Actions Importer์(๋) ํ์ผ ์ด๋ฆ์ ๋ณ์, ๋งค๊ฐ ๋ณ์ ๋ฐ ๋ฐ๋ณต ์์ด ์๋ ์๋ ๋๋ ๋์ ํ์ผ ๊ฒฝ๋ก๊ฐ ์๋ ํ ํ๋ฆฟ์ ์ถ์ถํ ์ ์์ต๋๋ค. ๊ทธ๋ฌ๋ ๊ธฐ๋ณธ๊ฐ ์งํฉ์ด ์์ด์ผ ํฉ๋๋ค.
๋ณ์ ํ์ผ ๊ฒฝ๋ก ์ด๋ฆ ์์
# File: azure-pipelines.yml
variables:
- template: 'templates/vars.yml'
steps:
- template: "./templates/$"
# File: templates/vars.yml
variables:
one: 'simple_step.yml'
๋งค๊ฐ ๋ณ์ ํ์ผ ๊ฒฝ๋ก ์ด๋ฆ ์์
parameters:
- name: template
type: string
default: simple_step.yml
steps:
- template: "./templates/${{ parameters.template }}"
๋ฐ๋ณต ํ์ผ ๊ฒฝ๋ก ์ด๋ฆ ์์
parameters:
- name: steps
type: object
default:
- build_step
- release_step
steps:
- ${{ each step in parameters.steps }}:
- template: "$-variables.yml"
ํ ํ๋ฆฟ ๋งค๊ฐ ๋ณ์
GitHub Actions Importer์(๋) ์๋ ํ์ ๊ธฐ์ฌ๋ ๋งค๊ฐ ๋ณ์๋ฅผ ์ง์ํฉ๋๋ค.
Azure Pipelines | GitHub Actions | ์ํ |
---|---|---|
string | inputs.string | ์ง์ ์ฌ๋ถ |
๋ฒํธ | inputs.number | ์ง์ ์ฌ๋ถ |
๋ถ์ธ ๊ฐ | inputs.boolean | ์ง์ ์ฌ๋ถ |
๊ฐ์ฒด | fromJSON ์์ด ์๋ inputs.string | ๋ถ๋ถ์ ์ผ๋ก ์ง์๋จ |
step | step | ๋ถ๋ถ์ ์ผ๋ก ์ง์๋จ |
stepList | step | ๋ถ๋ถ์ ์ผ๋ก ์ง์๋จ |
์์ (job) | job | ๋ถ๋ถ์ ์ผ๋ก ์ง์๋จ |
jobList | job | ๋ถ๋ถ์ ์ผ๋ก ์ง์๋จ |
ํ์ธ | job | ๋ถ๋ถ์ ์ผ๋ก ์ง์๋จ |
deploymentList | job | ๋ถ๋ถ์ ์ผ๋ก ์ง์๋จ |
stage(๋จ๊ณ) | job | ๋ถ๋ถ์ ์ผ๋ก ์ง์๋จ |
stageList | job | ๋ถ๋ถ์ ์ผ๋ก ์ง์๋จ |
์ฐธ๊ณ ํญ๋ชฉ
์ด ๋งค๊ฐ ๋ณ์ ์ ํ์ ํฌํจํ๋ฉฐ step
ํค์์ ์ฌ์ฉ๋๋ ํ
ํ๋ฆฟ์ ํ
ํ๋ฆฟ ๋จ๊ณ์ ์์ ๋๋ ๋์์ ๋จ๊ณ๋ฅผ ์ฌ์ฉํ๋ ๊ฒฝ์ฐ์๋ง ๋ณตํฉ ์์
์ผ๋ก ์ง๋ ฌํ๋ฉ๋๋ค. ์ด ๋งค๊ฐ ๋ณ์ ์ ํ์ ํฌํจํ๋ฉฐ stage
, deployment
, job
ํค์์ ์ฌ์ฉ๋๋ ํ
ํ๋ฆฟ์ ์ฌ์ฌ์ฉ ๊ฐ๋ฅํ ์ํฌํ๋ก๋ก ๋ณํ๋์ง ์๊ณ ๋
๋ฆฝ ์คํํ ์ํฌํ๋ก๋ก ์ง๋ ฌํ๋ฉ๋๋ค.
๋ฒ์ ๊ณ ์ง
๋ถ๋ถ์ 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.