Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/changelog_prepare.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Changelog prepare

# Manual step of the release flow: translates changelogs missing a .ru.yaml
# counterpart (calls the GPT API) and regenerates release notes.
# Run it on the release-next branch after reviewing the english changelog.

on:
workflow_dispatch:

jobs:
changelog-prepare:
name: Translate changelog and update release notes
runs-on: [self-hosted, large]
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.RELEASE_TOKEN || github.token }}

- name: Translate changelogs missing a .ru.yaml counterpart
env:
GPT_API_TOKEN: ${{ secrets.GPT_API_TOKEN }}
GPT_API_URL: ${{ secrets.GPT_API_URL }}
run: |
for f in CHANGELOG/v*.yaml; do
case "$f" in *.ru.yaml) continue;; esac
ru="${f%.yaml}.ru.yaml"
if [ ! -f "$ru" ]; then
echo "translating $f -> $ru"
hack/chlog.py -o "$ru" translate -f "$f" -l ru
fi
done

- name: Generate release notes
run: |
hack/chlog.py -o docs/RELEASE_NOTES.md release-notes -d CHANGELOG/ -l en
hack/chlog.py -o docs/RELEASE_NOTES.ru.md release-notes -d CHANGELOG/ -l ru

- name: Commit and push changes
run: |
if [ -z "$(git status --porcelain)" ]; then
echo "nothing to commit, translations and release notes are up to date"
exit 0
fi
git config user.name "ci-changelog"
git config user.email "ci-changelog@users.noreply.github.com"
git add CHANGELOG/ docs/
git commit -m "internal(changelog): Add translations and update release notes"
git push origin "HEAD:${GITHUB_REF_NAME}"
78 changes: 78 additions & 0 deletions .github/workflows/release_pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Release PR

# Release-please-like flow: on every push to main, (re)create the release
# branch with the generated changelog and release notes, and open/update
# the release PR. Translation is a manual step ("Changelog prepare" workflow
# dispatched on the release branch) to keep API calls controlled.

on:
push:
branches:
- main

env:
RELEASE_BRANCH: release-next

jobs:
release-pr:
name: Create or update release PR
runs-on: operator-helm-e2e
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout main
uses: actions/checkout@v4
with:
# git-cliff needs full history and tags
fetch-depth: 0
token: ${{ secrets.RELEASE_TOKEN || github.token }}

- name: Generate changelog for the next version
id: changelog
run: |
VERSION="$(git cliff --unreleased --bumped-version)"
echo "next version: ${VERSION}"
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"

# changelog already merged to main -> release awaits tagging
if [ -f "CHANGELOG/${VERSION}.yaml" ]; then
echo "CHANGELOG/${VERSION}.yaml already in main, release is awaiting tag"
echo "skip=true" >> "$GITHUB_OUTPUT"
exit 0
fi
echo "skip=false" >> "$GITHUB_OUTPUT"

git cliff --unreleased -o "CHANGELOG/${VERSION}.yaml"

# keep the translation already made in the release branch (manual step result)
if git fetch origin "${RELEASE_BRANCH}" 2>/dev/null; then
if git show "origin/${RELEASE_BRANCH}:CHANGELOG/${VERSION}.ru.yaml" > /tmp/prev_ru.yaml 2>/dev/null; then
echo "keeping existing translation from ${RELEASE_BRANCH}"
cp /tmp/prev_ru.yaml "CHANGELOG/${VERSION}.ru.yaml"
fi
fi

# release-notes generation is local-only (yq), no API calls
hack/chlog.py -o docs/RELEASE_NOTES.md release-notes -d CHANGELOG/ -l en
hack/chlog.py -o docs/RELEASE_NOTES.ru.md release-notes -d CHANGELOG/ -l ru

- name: Create or update release PR
if: steps.changelog.outputs.skip == 'false'
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.RELEASE_TOKEN || github.token }}
branch: ${{ env.RELEASE_BRANCH }}
base: main
title: "Release ${{ steps.changelog.outputs.version }}"
body: |
Automated release PR. Review `CHANGELOG/${{ steps.changelog.outputs.version }}.yaml` and its translation before merging.

To generate the translation, run the "Changelog prepare" workflow on the `release-next` branch.
commit-message: "internal(changelog): Release ${{ steps.changelog.outputs.version }}"
committer: "ci-changelog <ci-changelog@users.noreply.github.com>"
author: "ci-changelog <ci-changelog@users.noreply.github.com>"
add-paths: |
CHANGELOG/
docs/
delete-branch: true
5 changes: 5 additions & 0 deletions CHANGELOG/v0.0.1.ru.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
features:
- выпущена первоначальная версия с базовыми возможностями
fixes: []
security: []
chore: []
5 changes: 5 additions & 0 deletions CHANGELOG/v0.0.2.ru.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
features:
- применены рекомендации по результатам ревью deckhouse runtime
fixes: []
security: []
chore: []
5 changes: 5 additions & 0 deletions CHANGELOG/v0.0.3.ru.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
features:
- выпущен первый публичный альфа-релиз с поддержкой CRD HelmClusterAddon, HelmClusterAddonChart и HelmClusterAddonRepository
fixes: []
security: []
chore: []
5 changes: 5 additions & 0 deletions CHANGELOG/v0.0.4.ru.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
features: []
fixes: []
security: []
chore:
- обновлено форматирование уведомлений на главной странице документации
5 changes: 5 additions & 0 deletions CHANGELOG/v0.0.5.ru.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
features: []
fixes: []
security: []
chore:
- внесены незначительные обновления документации
6 changes: 6 additions & 0 deletions CHANGELOG/v0.0.6.ru.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
features:
- возможные условия статуса больше не отмечаются как инициализированные при согласовании
fixes: []
security: []
chore:
- добавлены аннотации веса в веб-хук валидации
5 changes: 5 additions & 0 deletions CHANGELOG/v0.0.7.ru.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
features:
- добавлена возможность просматривать значения чарта по умолчанию в консоли при создании дополнения
fixes: []
security: []
chore: []
6 changes: 6 additions & 0 deletions CHANGELOG/v0.0.8.ru.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
features: []
fixes:
- устранена гонка при отключении модуля, которая могла привести к сбою приложения
security: []
chore:
- теневые пользовательские ресурсы теперь отслеживаются только в пространстве имен модуля
2 changes: 1 addition & 1 deletion CHANGELOG/v0.0.8.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
features: []
fixes:
- resolve race on module disable which could lead to application distruption
- resolve race on module disable which could lead to application disruption
security: []
chore:
- watch shadow custom resources in module namespace only
74 changes: 74 additions & 0 deletions cliff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# git-cliff configuration: generates CHANGELOG/vX.Y.Z.yaml for the unreleased version.
# Usage:
# version="$(git cliff --unreleased --bumped-version)"
# git cliff --unreleased -o "CHANGELOG/${version}.yaml"

[changelog]
header = ""
footer = ""
trim = false
# Emit the module changelog yaml: all four categories are always present,
# empty ones are rendered as [].
body = """
{%- set feats = commits | filter(attribute="group", value="features") -%}
{%- set fixes = commits | filter(attribute="group", value="fixes") -%}
{%- set security = commits | filter(attribute="group", value="security") -%}
{%- set chores = commits | filter(attribute="group", value="chore") -%}
features:
{%- if feats | length == 0 %} []
{%- else %}
{%- for c in feats %}
- "{{ c.message | split(pat="\n") | first | trim | replace(from="\\", to="\\\\") | replace(from='"', to='\\"') }}"
{%- endfor %}
{%- endif %}
fixes:
{%- if fixes | length == 0 %} []
{%- else %}
{%- for c in fixes %}
- "{{ c.message | split(pat="\n") | first | trim | replace(from="\\", to="\\\\") | replace(from='"', to='\\"') }}"
{%- endfor %}
{%- endif %}
security:
{%- if security | length == 0 %} []
{%- else %}
{%- for c in security %}
- "{{ c.message | split(pat="\n") | first | trim | replace(from="\\", to="\\\\") | replace(from='"', to='\\"') }}"
{%- endfor %}
{%- endif %}
chore:
{%- if chores | length == 0 %} []
{%- else %}
{%- for c in chores %}
- "{{ c.message | split(pat="\n") | first | trim | replace(from="\\", to="\\\\") | replace(from='"', to='\\"') }}"
{%- endfor %}
{%- endif %}
"""

[git]
conventional_commits = true
# Keep unconventional commits too: they fall through to the "chore" bucket
# instead of silently disappearing from the changelog.
filter_unconventional = false
split_commits = false
protect_breaking_commits = true
# Release tags look like v0.4.17
tag_pattern = "^v[0-9]+\\.[0-9]+\\.[0-9]+$"

commit_parsers = [
# noise: merge commits and generated-changelog commits
{ message = "^Merge", skip = true },
{ message = "^internal\\(changelog\\)", skip = true },
# security first: explicit type or CVE/vex mentions
{ message = "^security", group = "security" },
{ message = "(?i)\\bcve-\\d{4}-\\d+", group = "security" },
{ message = "(?i)\\b(cve|vex)s?\\b", group = "security" },
# standard buckets
{ message = "^feat", group = "features" },
{ message = "^(fix|bug)", group = "fixes" },
# everything else (chore, ci, docs, refactor, unconventional...) is chore
{ message = ".*", group = "chore" },
]

[bump]
features_always_bump_minor = true
breaking_always_bump_major = true
61 changes: 61 additions & 0 deletions docs/RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
title: "Release Notes"
description: "Release notes for Deckhouse operator-helm."
---

## v0.0.8

### Bug Fixes

* resolve race on module disable which could lead to application disruption

### Chore

* watch shadow custom resources in module namespace only

## v0.0.7

### New Features

* add ability to review chart default values in console during addon creation

## v0.0.6

### New Features

* do not mark possible status conditions as intitialized on reconcile

### Chore

* add weight annotations to validation webhook

## v0.0.5

### Chore

* minor documentation updates

## v0.0.4

### Chore

* update main documentation page alerts formatting

## v0.0.3

### New Features

* the first public alpha release with HelmClusterAddon, HelmClusterAddonChart, and HelmClusterAddonRepository CRDs supoort

## v0.0.2

### New Features

* apply deckhouse runtime time review recommendations

## v0.0.1

### New Features

* initial release with basic capabilities

61 changes: 61 additions & 0 deletions docs/RELEASE_NOTES.ru.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
title: "Релизы"
description: "Релизы Deckhouse operator-helm."
---

## v0.0.8

### Исправления

* устранена гонка при отключении модуля, которая могла привести к сбою приложения

### Прочее

* теневые пользовательские ресурсы теперь отслеживаются только в пространстве имен модуля

## v0.0.7

### Новые возможности

* добавлена возможность просматривать значения чарта по умолчанию в консоли при создании дополнения

## v0.0.6

### Новые возможности

* возможные условия статуса больше не отмечаются как инициализированные при согласовании

### Прочее

* добавлены аннотации веса в веб-хук валидации

## v0.0.5

### Прочее

* внесены незначительные обновления документации

## v0.0.4

### Прочее

* обновлено форматирование уведомлений на главной странице документации

## v0.0.3

### Новые возможности

* выпущен первый публичный альфа-релиз с поддержкой CRD HelmClusterAddon, HelmClusterAddonChart и HelmClusterAddonRepository

## v0.0.2

### Новые возможности

* применены рекомендации по результатам ревью deckhouse runtime

## v0.0.1

### Новые возможности

* выпущена первоначальная версия с базовыми возможностями

Loading
Loading