-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New release pipeline in operator (#260)
- Loading branch information
Showing
20 changed files
with
154 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Changelog |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## v0.5.31 - 2024-11-04 | ||
### Added | ||
* Initialized a changelog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
changesDir: .changes | ||
unreleasedDir: unreleased | ||
headerPath: header.tpl.md | ||
changelogPath: CHANGELOG.md | ||
versionExt: md | ||
versionFormat: '## {{.Version}} - {{.Time.Format "2006-01-02"}}' | ||
kindFormat: '### {{.Kind}}' | ||
changeFormat: '* {{.Body}}' | ||
kinds: | ||
- label: Added | ||
auto: minor | ||
- label: Changed | ||
auto: major | ||
- label: Deprecated | ||
auto: minor | ||
- label: Removed | ||
auto: major | ||
- label: Fixed | ||
auto: patch | ||
- label: Security | ||
auto: patch | ||
newlines: | ||
afterChangelogHeader: 1 | ||
beforeChangelogVersion: 1 | ||
endOfVersion: 1 | ||
envPrefix: CHANGIE_ |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: create-release-pr | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
create-release-pr: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: batch-changes | ||
uses: miniscruff/changie-action@v2 | ||
with: | ||
version: latest | ||
args: batch patch | ||
|
||
- name: merge-changes | ||
uses: miniscruff/changie-action@v2 | ||
with: | ||
version: latest | ||
args: merge | ||
|
||
- name: print the latest version | ||
id: latest | ||
uses: miniscruff/changie-action@v2 | ||
with: | ||
version: latest | ||
args: latest | ||
|
||
- name: print the latest version without "v" | ||
id: latest-no-v | ||
uses: miniscruff/changie-action@v2 | ||
with: | ||
version: latest | ||
args: latest --remove-prefix | ||
|
||
- name: check-chart-version | ||
run: | | ||
VERSION=${{ steps.latest-no-v.outputs.output }} | ||
APP_VERSION=$(grep '^appVersion:' ./deploy/ydb-operator/Chart.yaml | awk '{print $2}' | tr -d '"') | ||
CHART_VERSION=$(grep '^version:' ./deploy/ydb-operator/Chart.yaml | awk '{print $2}' | tr -d '"') | ||
if [ "$APP_VERSION" != "$VERSION" ] || [ "$CHART_VERSION" != "$VERSION" ]; then | ||
echo "Version mismatch: appVersion ($APP_VERSION) or version ($CHART_VERSION) does not match expected version ($VERSION). You most likely forgot to bump the version in Chart.yaml, please do so." | ||
exit 1 | ||
else | ||
echo "Version matches: appVersion ($APP_VERSION) and version ($CHART_VERSION) are both $VERSION." | ||
fi | ||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v7 | ||
with: | ||
title: Release ${{ steps.latest.outputs.output }} | ||
branch: release/${{ steps.latest.outputs.output }} | ||
commit-message: Release ${{ steps.latest.outputs.output }} | ||
token: ${{ github.token }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,35 +12,11 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
- name: setup-go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: '1.20' | ||
uses: actions/checkout@v4 | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v2 | ||
with: | ||
version: v1.58.1 | ||
code-format-check: | ||
concurrency: | ||
group: lint-autoformat-${{ github.head_ref || github.ref_name }} | ||
cancel-in-progress: true | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
- name: setup-go | ||
uses: actions/setup-go@v3 | ||
uses: golangci/golangci-lint-action@v6 | ||
with: | ||
go-version: '1.20' | ||
- name: install-utilities | ||
run: | | ||
go install mvdan.cc/[email protected] | ||
go install github.com/rinchsan/gosimports/cmd/[email protected] | ||
- name: format all files with auto-formatter | ||
run: bash ./.github/scripts/format-all-go-code.sh "$PWD" | ||
- name: check-repository-diff | ||
run: bash ./.github/scripts/check-work-copy-equals-to-committed.sh "auto-format broken" | ||
version: v1.61.0 | ||
run-unit-tests: | ||
concurrency: | ||
group: run-unit-tests-${{ github.head_ref || github.ref_name }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,45 @@ | ||
name: upload-artifacts | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- 'CHANGELOG.md' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
tag-job: | ||
tag-and-release: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
tagcreated: ${{steps.tag-step.outputs.tagcreated}} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- id: tag-step | ||
uses: butlerlogic/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: actions/checkout@v4 | ||
|
||
- name: get-latest-version | ||
uses: miniscruff/changie-action@v2 | ||
with: | ||
strategy: regex | ||
root: "./deploy/ydb-operator/Chart.yaml" | ||
regex_pattern: 'version:[\s]*(["]?[0-9\.]{3,}["]?)' | ||
upload-artifacts: | ||
runs-on: ubuntu-latest | ||
needs: tag-job | ||
if: ${{ needs.tag-job.outputs.tagcreated == 'yes' }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
version: latest | ||
args: latest | ||
- name: get-latest-no-v-version | ||
uses: miniscruff/changie-action@v2 | ||
with: | ||
version: latest | ||
# Echoes the same version as previous step, but without "v" prefix. | ||
# Is used as a docker image tag in the release step. | ||
# E.g. "v0.5.31" -> "0.5.31" | ||
args: latest --remove-prefix | ||
|
||
- name: update-chart-version-with-release-version | ||
run: | | ||
RELEASE_VERSION=${{ steps.get-latest-no-v-version.outputs.output }} | ||
sed -i 's/<IS_SUBSTITUTED_IN_CI_RELEASE_JOB>/'"$RELEASE_VERSION"'/g' ./deploy/ydb-operator/Chart.yaml | ||
- name: create-tag | ||
uses: mathieudutour/[email protected] | ||
with: | ||
tag_prefix: "" | ||
custom_tag: ${{ steps.get-latest-version.outputs.output }} | ||
github_token: ${{ github.token }} | ||
|
||
- name: install-dependencies | ||
run: | | ||
HELM_PKG="helm-v3.10.3-linux-amd64.tar.gz" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Changelog | ||
|
||
|
||
## v0.5.31 - 2024-11-04 | ||
### Added | ||
* Initialized a changelog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,8 @@ | ||
This document attempts to be some sort of a table of contents: | ||
|
||
## Operator release flow | ||
|
||
See [here](./release-flow.md). | ||
## Working on a feature | ||
|
||
## Writing and running tests | ||
|
||
See [here](./tests.md). | ||
|
||
## Storage | ||
|
||
#### [Storage state machine schema](./storage-state-machine-schema.md) | ||
|
||
This describes which states the Storage object has and in what order they are | ||
traversed. | ||
- don't forget to use `changie` to generate a changelog entry, whenever you complete a feature | ||
- see [here](./tests.md) to learn how to run tests | ||
- see [here](./tests.md) to learn how to release a new version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters