다중 에코시스템 업데이트 정보
다중 에코시스템 업데이트를 통해 여러 패키지 에코시스템에 걸쳐 있는 그룹을 만들 수 있으며, 지원되는 모든 에코시스템에서 업데이트가 포함된 단일 Dependabot 끌어오기 요청을 가져올 수 있습니다. 이 방법은 수신하는 Dependabot 끌어오기 요청 수를 줄이고 종속성 업데이트 워크플로를 간소화하는 데 도움이 됩니다.
다중 에코시스템 업데이트는 다음 작업에 특히 유용합니다.
-
여러 기술(Docker, Terraform, Python 스크립트)을 사용하는 **인프라 프로젝트**. -
함께 업데이트해야 하는 프런트 엔드 및 백 엔드 종속성이 있는 **전체 스택 애플리케이션**. -
언어 간에 동기화된 프로토콜 버전이 있어야 하는 **플랫폼 간 라이브러리**.
시작하기
첫 번째 다중 에코시스템 그룹을 설정하려면 다음 지침을 따라야 합니다.
1. .github/dependabot.yml 파일에 multi-ecosystem-groups 추가
먼저 최상위 multi-ecosystem-groups 섹션에서 일정을 사용하여 그룹을 정의합니다.
version: 2
multi-ecosystem-groups:
infrastructure:
schedule:
interval: "weekly"
updates:
# Your existing package ecosystems will go here
version: 2
multi-ecosystem-groups:
infrastructure:
schedule:
interval: "weekly"
updates:
# Your existing package ecosystems will go here
2. 패턴을 사용하여 에코시스템을 그룹에 할당
multi-ecosystem-group키를 추가합니다.- 패키지 에코시스템 구성에
patterns을(를) 추가합니다.
version: 2
multi-ecosystem-groups:
infrastructure:
schedule:
interval: "weekly"
updates:
- package-ecosystem: "docker"
directory: "/"
patterns: ["nginx", "redis", "postgres"]
multi-ecosystem-group: "infrastructure"
- package-ecosystem: "terraform"
directory: "/"
patterns: ["aws", "terraform-*"]
multi-ecosystem-group: "infrastructure"
version: 2
multi-ecosystem-groups:
infrastructure:
schedule:
interval: "weekly"
updates:
- package-ecosystem: "docker"
directory: "/"
patterns: ["nginx", "redis", "postgres"]
multi-ecosystem-group: "infrastructure"
- package-ecosystem: "terraform"
directory: "/"
patterns: ["aws", "terraform-*"]
multi-ecosystem-group: "infrastructure"
중요
patterns 키는 multi-ecosystem-group을(를) 사용할 때 필요합니다. 종속성 패턴을 지정하여 그룹에 특정 종속성만 포함할 수도 있고, ["*"]을(를) 사용하여 모든 종속성을 포함할 수도 있습니다.
3. 통합된 끌어오기 요청 커밋 및 조사
dependabot.yml 파일에 대한 변경 내용을 커밋하면 Dependabot에서는 다음을 수행합니다.
- 그룹의 일정에 따라 업데이트 확인
- 그룹의 일정에 따라 업데이트를 확인합니다.
- 그룹에 지정된 모든 에코시스템에 대한 업데이트를 포함하는 단일 끌어오기 요청을 만듭니다.
- 분기 이름과 끌어오기 요청 제목에 그룹 식별자를 사용합니다.
4. 추가 키로 사용자 지정(선택 사항)
그룹에 assignees, labels 및 기타 설정을 추가합니다.
multi-ecosystem-groups:
infrastructure:
schedule:
interval: "weekly"
assignees: ["@platform-team"]
labels: ["infrastructure", "dependencies"]
updates:
- package-ecosystem: "docker"
directory: "/"
patterns: ["nginx", "redis", "postgres"]
multi-ecosystem-group: "infrastructure"
- package-ecosystem: "terraform"
directory: "/"
patterns: ["aws", "terraform-*"]
multi-ecosystem-group: "infrastructure"
multi-ecosystem-groups:
infrastructure:
schedule:
interval: "weekly"
assignees: ["@platform-team"]
labels: ["infrastructure", "dependencies"]
updates:
- package-ecosystem: "docker"
directory: "/"
patterns: ["nginx", "redis", "postgres"]
multi-ecosystem-group: "infrastructure"
- package-ecosystem: "terraform"
directory: "/"
patterns: ["aws", "terraform-*"]
multi-ecosystem-group: "infrastructure"
다중 에코시스템별 구성
다중 에코시스템 업데이트는 2단계 구성 구조를 사용하여 업데이트 그룹화 및 관리 방법을 유연하게 제어합니다.
-
**그룹 수준**(`multi-ecosystem-groups`): 이 수준에서는 그룹의 모든 패키지 에코시스템에 적용되는 전체 그룹 동작, 일정 및 공유 설정을 정의합니다. -
**에코시스템 수준**(`updates`): 포함할 종속성과 에코시스템별 설정을 포함하여, 그룹 내 개별 패키지 관리자를 구성합니다.
이 구조를 사용하면 그룹 수준에서 일관된 정책을 설정하면서도 개별 패키지 에코시스템을 세분화하여 제어할 수 있습니다.
multi-ecosystem-groups
여러 패키지 에코시스템에 걸쳐 있는 그룹을 정의합니다. 각 그룹에는 다음이 필요합니다.
-
**그룹 식별자**: 분기 이름과 끌어오기 요청 제목에 사용됩니다. -
**일정**: 업데이트를 확인하는 빈도입니다. 사용 가능한 모든 옵션에 대해서는 [일정](/code-security/dependabot/working-with-dependabot/dependabot-options-reference#schedule-)을 참조하세요.
multi-ecosystem-group
패키지 에코시스템을 다중 에코시스템 그룹에 할당합니다. 포함할 종속성을 지정하려면 patterns 키가 필요합니다.
patterns에 대한 자세한 내용은 patterns 및 exclude-patterns을(를) 참조하세요.
추가 구성 옵션
모든 표준 Dependabot 구성 옵션을 다중 에코시스템 그룹에서 사용할 수 있습니다. package-ecosystem, directory, allow, ignore, cooldown, registries을(를) Dependabot 옵션 참조에서 참조하세요.
핵심 구성
다중 에코시스템 그룹을 사용할 때, 키는 두 가지 수준으로 구성됩니다. 다음은 어떤 키를 어디에서 사용할 수 있는지에 대해 완전히 분석한 내용입니다.
그룹 수준(multi-ecosystem-groups)
다음 표에서는 그룹 수준에서 사용할 수 있는 구성 키와 해당 동작 유형이 나와 있습니다. 자세한 내용은 구성 동작을 참조하세요.
| 키 | 필수 | 동작 |
|---|---|---|
schedule | 해당 없음 | |
labels | 더하기 | |
milestone | 그룹만 해당 | |
assignees | 더하기 | |
target-branch | 그룹만 해당 | |
commit-message | 그룹만 해당 | |
pull-request-branch-name | 그룹만 해당 |
에코시스템 수준(updates)
다음 표에서는 에코시스템 수준에서 사용할 수 있는 구성 키와 해당 동작 유형이 나와 있습니다. 자세한 내용은 구성 동작을 참조하세요.
| 키 | 필수 | 동작 |
|---|---|---|
package-ecosystem | 해당 없음 | |
directory / directories | 해당 없음 | |
patterns | 해당 없음 | |
allow | 해당 없음 | |
ignore | 해당 없음 | |
registries | 해당 없음 | |
vendor | 해당 없음 | |
versioning-strategy | 해당 없음 | |
update-types | 해당 없음 | |
cooldown | 해당 없음 | |
labels | 더하기 | |
assignees | 더하기 |
구성 동작
추가 키
추가 키는 다른 수준의 값을 재정의하는 것이 아니라 그룹 수준과 개별 에코시스템 수준의 값을 병합합니다. 이를 통해 그룹 수준에서 일관된 팀 차원의 구성을 설정하고, 개별 수준에서 특정 에코시스템 전문 지식을 추가할 수 있습니다.
-
`assignees` - 그룹 수준과 에코시스템 수준의 모든 담당자가 배정됩니다. -
`labels` - 그룹 수준과 에코시스템 수준의 모든 레이블이 적용됩니다.
다음 표에는 Dependabot이(가) 아래 예시에서 Docker 끌어오기 요청에 대한 그룹 수준의 값과 에코시스템 수준의 값을 결합하는 방법이 나와 있습니다.
| 옵션 | 그룹 수준 값 | 에코시스템 수준 값 | 결과 |
|---|---|---|---|
assignees | @platform-team, @security-lead | @docker-admin |
`@platform-team`, `@security-lead``@docker-admin` |
| labels | infrastructure, dependencies | docker, containers |
infrastructure, dependencies, , docker, containers |
multi-ecosystem-groups:
infrastructure:
assignees: ["@platform-team", "@security-lead"]
labels: ["infrastructure", "dependencies"]
updates:
- package-ecosystem: "docker"
assignees: ["@docker-admin"]
labels: ["docker", "containers"]
multi-ecosystem-group: "infrastructure"
multi-ecosystem-groups:
infrastructure:
assignees: ["@platform-team", "@security-lead"]
labels: ["infrastructure", "dependencies"]
updates:
- package-ecosystem: "docker"
assignees: ["@docker-admin"]
labels: ["docker", "containers"]
multi-ecosystem-group: "infrastructure"
그룹 전용 키
-
`milestone` - 정수 마일스톤 번호 -
`commit-message` - 커밋 메시지 템플릿 -
`target-branch` - 끌어오기 요청에 대한 대상 분기 -
`pull-request-branch-name` - 분기 명명 구성
경고
에코시스템 수준에서 그룹 전용 키를 설정하려는 경우(updates 엔터티에서) Dependabot에서 구성 오류가 발생하며 dependabot.yml 파일을 처리하지 못합니다. 이러한 키는 multi-ecosystem-groups 섹션에서만 지정해야 합니다.
**예:**
다음 표에는 Dependabot이(가) 아래 예시에서 Docker 끌어오기 요청에 대한 그룹 수준의 값과 에코시스템 수준의 값을 결합하는 방법이 나와 있습니다.
| 옵션 | 그룹 수준 값 | 에코시스템 수준 값 | 결과 |
|---|---|---|---|
assignees | @platform-team | @docker-admin | @platform-team, @docker-admin |
labels | infrastructure | docker, containers |
`infrastructure`, `docker``containers`|
multi-ecosystem-groups:
infrastructure:
assignees: ["@platform-team"]
labels: ["infrastructure"]
updates:
- package-ecosystem: "docker"
assignees: ["@docker-admin"]
labels: ["docker", "containers"]
multi-ecosystem-group: "infrastructure"
multi-ecosystem-groups:
infrastructure:
assignees: ["@platform-team"]
labels: ["infrastructure"]
updates:
- package-ecosystem: "docker"
assignees: ["@docker-admin"]
labels: ["docker", "containers"]
multi-ecosystem-group: "infrastructure"
사용 사례 및 예제
다중 에코시스템 업데이트는 여러 패키지 관리자를 사용하고 전체 업데이트를 조정하려는 프로젝트에 특히 유용합니다. 다음은 몇 가지 일반적인 시나리오입니다.
인프라 프로젝트
**시나리오**: 인프라 코드는 Docker 컨테이너, 클라우드 리소스용 Terraform, 자동화용 Python 스크립트 등과 같은 여러 기술을 사용합니다. 모든 인프라 관련 업데이트를 함께 그룹화하여 더 손쉽게 검토하고 배포를 조정하려고 합니다.
**함께 그룹화하는 이유**: 인프라 변경 사항은 함께 배포해야 하는 경우가 많으며, 각 기술에 대해 별도의 PR을 유지하면 조정 오버헤드가 발생합니다.
multi-ecosystem-groups:
infrastructure:
schedule:
interval: "weekly" # Weekly updates to avoid disruption
updates:
- package-ecosystem: "docker"
directory: "/"
patterns: ["nginx", "redis", "postgres"]
multi-ecosystem-group: "infrastructure"
- package-ecosystem: "terraform"
directory: "/"
patterns: ["aws", "terraform-*"]
multi-ecosystem-group: "infrastructure"
- package-ecosystem: "pip"
directory: "/"
patterns: ["boto3", "requests", "pyyaml"]
multi-ecosystem-group: "infrastructure"
multi-ecosystem-groups:
infrastructure:
schedule:
interval: "weekly" # Weekly updates to avoid disruption
updates:
- package-ecosystem: "docker"
directory: "/"
patterns: ["nginx", "redis", "postgres"]
multi-ecosystem-group: "infrastructure"
- package-ecosystem: "terraform"
directory: "/"
patterns: ["aws", "terraform-*"]
multi-ecosystem-group: "infrastructure"
- package-ecosystem: "pip"
directory: "/"
patterns: ["boto3", "requests", "pyyaml"]
multi-ecosystem-group: "infrastructure"
**결과**: 인프라 자동화에 사용되는 Docker 이미지, Terraform 공급자 및 Python 종속성에 대한 업데이트를 포함하는 주간 끌어오기 요청 하나가 생성됩니다.
풀 스택 애플리케이션
**시나리오**: React 프런트 엔드와 Rails 백 엔드가 있는 웹 애플리케이션이 있습니다. 프런트 엔드 및 백 엔드 종속성을 함께 업데이트하여 호환성을 보장하고 테스트를 간소화하려고 합니다.
**함께 그룹화하는 이유**: 프런트 엔드와 백 엔드는 서로 의존하는 경우가 많으며, 함께 업데이트하면 전체 애플리케이션 스택을 한번에 테스트할 수 있습니다.
multi-ecosystem-groups:
app-dependencies:
schedule:
interval: "daily" # More frequent updates for application code
updates:
- package-ecosystem: "npm"
directory: "/frontend"
patterns: ["react", "lodash", "@types/*"] # Core frontend libraries and TypeScript types
multi-ecosystem-group: "app-dependencies"
- package-ecosystem: "bundler"
directory: "/backend"
patterns: ["rails", "pg", "sidekiq"] # Core backend framework and database
multi-ecosystem-group: "app-dependencies"
multi-ecosystem-groups:
app-dependencies:
schedule:
interval: "daily" # More frequent updates for application code
updates:
- package-ecosystem: "npm"
directory: "/frontend"
patterns: ["react", "lodash", "@types/*"] # Core frontend libraries and TypeScript types
multi-ecosystem-group: "app-dependencies"
- package-ecosystem: "bundler"
directory: "/backend"
patterns: ["rails", "pg", "sidekiq"] # Core backend framework and database
multi-ecosystem-group: "app-dependencies"
**결과**: 프런트 엔드 JavaScript/TypeScript 업데이트와 백 엔드 Ruby Gem 업데이트를 모두 포함하는 일일 PR이 구현되어, 전체 애플리케이션을 함께 테스트할 수 있게 됩니다.
플랫폼 간 라이브러리
**시나리오**: 여러 언어에서 동일한 프로토콜(gRPC 및 프로토콜 버퍼 등)을 사용하는 라이브러리나 서비스를 빌드하고 있습니다. 모든 구현에서 라이브러리 버전을 동기화된 상태로 유지하려고 합니다.
**함께 그룹화하는 이유**: 프로토콜 라이브러리는 서로 다른 언어 구현에서 호환성을 유지해야 하므로, 함께 업데이트하면 버전 불일치를 방지할 수 있습니다.
multi-ecosystem-groups:
grpc-and-protobuf:
schedule:
interval: "daily"
updates:
- package-ecosystem: "bundler"
directory: "/grpc-proto-test/"
patterns: ["grpc", "google-protobuf"]
multi-ecosystem-group: "grpc-and-protobuf"
- package-ecosystem: "npm"
directory: "/grpc-proto-test/"
patterns: ["@grpc/grpc-js", "google-protobuf"]
multi-ecosystem-group: "grpc-and-protobuf"
multi-ecosystem-groups:
grpc-and-protobuf:
schedule:
interval: "daily"
updates:
- package-ecosystem: "bundler"
directory: "/grpc-proto-test/"
patterns: ["grpc", "google-protobuf"]
multi-ecosystem-group: "grpc-and-protobuf"
- package-ecosystem: "npm"
directory: "/grpc-proto-test/"
patterns: ["@grpc/grpc-js", "google-protobuf"]
multi-ecosystem-group: "grpc-and-protobuf"
**결과**: Ruby 및 Node.js gRPC 라이브러리를 동기화 상태로 유지하여 프로토콜 호환성 문제를 방지하는 일일 PR이 구현됩니다.
고급 구성 예
이 포괄적인 예에서는 복잡한 프로젝트에서 다양한 업데이트 전략과 키 병합을 통해 여러 그룹을 사용하는 방법을 보여 주었습니다.
version: 2
multi-ecosystem-groups:
infrastructure:
schedule:
interval: "weekly"
assignees: ["@platform-team"] # assign platform team
labels: ["infrastructure", "dependencies"]
milestone: 10 # Track in milestone
commit-message:
prefix: "infra"
include: "scope"
# Application code updates - daily, with development team
full-stack:
schedule:
interval: "daily"
assignees: ["@full-stack-team"] # assign to full-stack team
labels: ["full-stack"]
updates:
# Docker images - infrastructure group with additional docker expertise
- package-ecosystem: "docker"
directory: "/"
patterns: ["nginx", "redis", "postgres"]
assignees: ["@docker-admin"] # adds to @platform-team (additive)
labels: ["docker"] # adds to infrastructure, dependencies (additive)
multi-ecosystem-group: "infrastructure"
# Terraform - infrastructure group with terraform specialists
- package-ecosystem: "terraform"
directory: "/"
patterns: ["aws", "terraform-*"]
multi-ecosystem-group: "infrastructure"
# Frontend - full-stack group with frontend focus
- package-ecosystem: "npm"
directory: "/frontend"
patterns: ["react", "lodash", "@types/*"]
labels: ["frontend"] # adds to full-stack (additive)
multi-ecosystem-group: "full-stack"
# Backend - full-stack group with backend specialist
- package-ecosystem: "bundler"
directory: "/backend"
patterns: ["rails", "pg", "sidekiq"]
assignees: ["@backend-dev"] # adds to @full-stack-team (additive)
multi-ecosystem-group: "full-stack"
version: 2
multi-ecosystem-groups:
infrastructure:
schedule:
interval: "weekly"
assignees: ["@platform-team"] # assign platform team
labels: ["infrastructure", "dependencies"]
milestone: 10 # Track in milestone
commit-message:
prefix: "infra"
include: "scope"
# Application code updates - daily, with development team
full-stack:
schedule:
interval: "daily"
assignees: ["@full-stack-team"] # assign to full-stack team
labels: ["full-stack"]
updates:
# Docker images - infrastructure group with additional docker expertise
- package-ecosystem: "docker"
directory: "/"
patterns: ["nginx", "redis", "postgres"]
assignees: ["@docker-admin"] # adds to @platform-team (additive)
labels: ["docker"] # adds to infrastructure, dependencies (additive)
multi-ecosystem-group: "infrastructure"
# Terraform - infrastructure group with terraform specialists
- package-ecosystem: "terraform"
directory: "/"
patterns: ["aws", "terraform-*"]
multi-ecosystem-group: "infrastructure"
# Frontend - full-stack group with frontend focus
- package-ecosystem: "npm"
directory: "/frontend"
patterns: ["react", "lodash", "@types/*"]
labels: ["frontend"] # adds to full-stack (additive)
multi-ecosystem-group: "full-stack"
# Backend - full-stack group with backend specialist
- package-ecosystem: "bundler"
directory: "/backend"
patterns: ["rails", "pg", "sidekiq"]
assignees: ["@backend-dev"] # adds to @full-stack-team (additive)
multi-ecosystem-group: "full-stack"
이 구성의 작동 방식
인프라 PR
schedule: weekly
| 옵션 | 그룹 수준 값 | 에코시스템 수준 값 | 결과 |
|---|---|---|---|
assignees | @platform-team | @docker-admin(Docker), @terraform-experts(Terraform) | 모두 결합됨 |
labels | infrastructure, dependencies | docker (Docker) | 모두 결합됨 |
schedule | weekly | None | 주간 업데이트 |
milestone | 10 | None | 마일스톤 10에서 추적됨 |
풀 스택 PR
schedule: daily
| 옵션 | 그룹 수준 값 | 에코시스템 수준 값 | 결과 |
|---|---|---|---|
assignees | @full-stack-team | @backend-dev (백 엔드) | 모두 결합됨 |
labels | full-stack | frontend (프런트 엔드) | 모두 결합됨 |
schedule | daily | None | 더 자주 진행되는 업데이트 |
이 방법을 사용하면 각 업데이트 유형에 적합한 사용자가 관여하면서도 관련 기술 전반에서 일관된 정책을 유지할 수 있습니다.
모범 사례
-
**그룹 관련 종속성**: 논리적으로 함께 속한 에코시스템만 그룹화합니다. -
**설명 식별자 사용**: 그룹의 목적을 명확하게 나타내는 그룹 이름을 선택합니다.
추가 참고 자료
-
[AUTOTITLE](/code-security/dependabot/working-with-dependabot/dependabot-options-reference)