Skip to content

Commit 4c7c966

Browse files
Merge pull request #588 from eclipse-tractusx/docs_trg_dependabot
docs: new Dependabot TRG
2 parents 72669ea + cc352d9 commit 4c7c966

File tree

1 file changed

+79
-0
lines changed

1 file changed

+79
-0
lines changed

docs/release/trg-0/trg-2-6.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
---
2+
title: TRG 2.06 - Dependabot
3+
---
4+
5+
| Status | Created | Post-History |
6+
|--------|--------------|-----------------|
7+
| Draft | 4-Jan-2024 | Initial release |
8+
9+
## Why
10+
11+
GitHub Dependabot is a powerful tool designed to help keep your project's dependencies up to date. By automating the process of checking for updates and creating pull requests when new versions are available, Dependabot ensures that your project benefits from the latest features, bug fixes, and security patches.
12+
13+
Key Benefits:
14+
15+
- Security: Receive timely updates for security vulnerabilities in your project's dependencies.
16+
- Stability: Keep your project stable by staying current with the latest releases.
17+
- Efficiency: Automate the time consuming task of manually checking for updates and creating pull requests.
18+
19+
## Description
20+
21+
Dependabot is an excellent fit for application dependencies/vulnerabilities. By regularly checking for updates, it allows you to seamlessly integrate the latest improvements into your application.
22+
23+
For Docker images, Dependabot ensures that your [base images](https://eclipse-tractusx.github.io/docs/release/trg-4/trg-4-02) and dependencies are regularly updated, reducing the risk of using outdated or vulnerable components.
24+
25+
Dependabot can also assist in keeping used GitHub Actions up to date. This is crucial for ensuring that your workflows leverage the latest GitHub Actions features and improvements.
26+
27+
### Security updates
28+
29+
To enable Dependabot for security updates, you can leverage GitHub's Security tab. Go to the "Security" tab in your repository and follow the prompts to enable automated security updates.
30+
More information:
31+
<https://docs.github.com/en/code-security/dependabot/dependabot-security-updates/about-dependabot-security-updates>
32+
33+
### Version updates
34+
35+
To enable Dependabot for version updates, create a dependabot.yml file in .github directory the root of your repository. In order to reduce number of generated bump Pull Requests, recommendation is to change default interval to i.e. weekly, as well as limit open PRs. See provided example below.
36+
37+
### Example
38+
39+
This configuration checks for Maven, GitHub Action and Docker updates on a weekly basis and creates pull requests for up to 5 updates at a time.
40+
41+
:::caution
42+
Be careful, Dependabot PR merge can lead to out of date DEPENDENCIES file.
43+
Make sure DEPENDENCIES file is updated by DASH tool.
44+
:::
45+
46+
```yaml
47+
version: 2
48+
updates:
49+
# Maintain dependencies for Maven
50+
- package-ecosystem: "maven"
51+
directory: "/"
52+
schedule:
53+
interval: "weekly"
54+
open-pull-requests-limit: 5
55+
56+
# Maintain dependencies for GitHub Actions
57+
- package-ecosystem: "github-actions"
58+
directory: "/"
59+
schedule:
60+
interval: "weekly"
61+
open-pull-requests-limit: 5
62+
63+
# Maintain dependencies for Docker
64+
- package-ecosystem: "docker"
65+
directory: "/"
66+
schedule:
67+
interval: "weekly"
68+
open-pull-requests-limit: 5
69+
```
70+
71+
More information:
72+
<https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/about-dependabot-version-updates>
73+
<https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file>
74+
75+
:::info
76+
Importance of Implemented Tests:
77+
78+
Ensure that your project has comprehensive test coverage. Automated tests are crucial for quickly validating that updates do not introduce regressions or break existing functionality.
79+
:::

0 commit comments

Comments
 (0)