diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 7ff4d480c..02057598d 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,6 +4,9 @@ updates: directory: "/" schedule: interval: "monthly" + commit-message: + prefix: ci + include: scope - package-ecosystem: "docker" directories: @@ -12,6 +15,9 @@ updates: - "/cmd/fluent-watcher/fluentd" schedule: interval: "daily" + commit-message: + prefix: build + include: scope - package-ecosystem: "docker" directory: "/docs/best-practice/forwarding-logs-via-http" @@ -21,6 +27,9 @@ updates: - package-ecosystem: "gomod" directories: - "/" + commit-message: + prefix: build + include: scope groups: k8s.io/*: patterns: diff --git a/.github/release-please-config.json b/.github/release-please-config.json index 3666167f8..b43d0a952 100644 --- a/.github/release-please-config.json +++ b/.github/release-please-config.json @@ -1,6 +1,21 @@ { "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", "release-type": "simple", + "changelog-sections": [ + { "type": "feat", "section": "Features" }, + { "type": "feature", "section": "Features" }, + { "type": "fix", "section": "Bug Fixes" }, + { "type": "perf", "section": "Performance Improvements" }, + { "type": "revert", "section": "Reverts" }, + { "type": "build", "section": "Dependencies", "hidden": false }, + { "type": "deps", "section": "Dependencies", "hidden": false }, + { "type": "chore", "section": "Miscellaneous Chores", "hidden": true }, + { "type": "ci", "section": "Continuous Integration", "hidden": true }, + { "type": "docs", "section": "Documentation", "hidden": true }, + { "type": "refactor", "section": "Code Refactoring", "hidden": true }, + { "type": "test", "section": "Tests", "hidden": true }, + { "type": "style", "section": "Styles", "hidden": true } + ], "packages": { ".": { "extra-files": [ diff --git a/.github/renovate-config.js b/.github/renovate-config.js index 1a683779a..d51dce1c6 100644 --- a/.github/renovate-config.js +++ b/.github/renovate-config.js @@ -17,7 +17,8 @@ module.exports = { dryRun: null, repositories: ["fluent/fluent-operator"], enabledManagers: ["custom.regex"], - extends: ["config:recommended"], + // Match Dependabot / release-please: build(deps): update … + extends: ["config:recommended", ":semanticCommitTypeAll(build)"], customManagers: [ { customType: "regex", diff --git a/.github/workflows/bump-fluent-bit-version.yaml b/.github/workflows/bump-fluent-bit-version.yaml index 820c2b003..280d55510 100644 --- a/.github/workflows/bump-fluent-bit-version.yaml +++ b/.github/workflows/bump-fluent-bit-version.yaml @@ -65,23 +65,29 @@ jobs: fi done - - name: Update version in values.yaml + - name: Update fluent-bit tag in chart values.yaml run: | - if ! sed -i '/repository: "ghcr.io\/fluent\/fluent-operator\/fluent-bit"/!b;n;s/tag: .*/tag: "${{ github.event.inputs.version }}"/' charts/fluent-operator/values.yaml; then - echo "Failed to update values.yaml" + file="charts/fluent-operator/values.yaml" + # Match fluentbit.image (registry + repository); not the old single-line repository form + if ! sed -i '/depName=ghcr.io\/fluent\/fluent-operator\/fluent-bit/,+1 s|tag: .*|tag: "${{ github.event.inputs.version }}"|' "$file"; then + echo "Failed to update fluent-bit tag in $file" + exit 1 + fi + if ! grep -A1 'depName=ghcr.io/fluent/fluent-operator/fluent-bit' "$file" | tail -n1 | grep -q '^ *tag: "${{ github.event.inputs.version }}"$'; then + echo "fluent-bit tag not updated in the depName=ghcr.io/fluent/fluent-operator/fluent-bit block of $file" exit 1 fi - name: Create Pull Request uses: peter-evans/create-pull-request@v8 with: - commit-message: "chore(deps): bump fluent-bit to ${{ github.event.inputs.version }} + commit-message: "build(deps): bump fluent-bit to ${{ github.event.inputs.version }} - Updated VERSION file - Updated manifest files - Updated values.yaml in Helm chart" signoff: true - title: "chore(deps): bump fluent-bit to ${{ github.event.inputs.version }}" + title: "build(deps): bump fluent-bit to ${{ github.event.inputs.version }}" body: | This PR updates the version to ${{ github.event.inputs.version }} in the following files: - cmd/fluent-watcher/fluentbit/VERSION diff --git a/RELEASE.md b/RELEASE.md index e7215f168..d7753855a 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -62,6 +62,7 @@ Version bumps are driven automatically by [Conventional Commits](https://www.con | `feat:` | Minor version bump | | `fix:` | Patch version bump | | `feat!:` or `BREAKING CHANGE:` | Major version bump | +| `build:` or `build(deps):` | Patch version bump | | `chore:`, `docs:`, `ci:`, etc. | No version bump (excluded from changelog) | ## How to cut a new release