-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added release workflows with chart-releaser (#5)
Following the automated release process, this time for the helm chart. This patch includes some order on the workflows plus the addition of the chart-releaser action. The steps to release can be found in the RELEASE.md file. Co-authored-by: Jonathan Gonzalez V <[email protected]>
- Loading branch information
Showing
24 changed files
with
170 additions
and
39 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,6 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" |
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,41 +1,9 @@ | ||
name: continuous-delivery | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
linter: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Helm | ||
uses: azure/setup-helm@v1 | ||
with: | ||
version: v3.4.0 | ||
|
||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
|
||
- name: Set up chart-testing | ||
uses: helm/[email protected] | ||
|
||
- name: Run chart-testing (list-changed) | ||
id: list-changed | ||
run: | | ||
changed=$(ct list-changed --target-branch=main) | ||
if [[ -n "$changed" ]]; then | ||
echo "::set-output name=changed::true" | ||
fi | ||
- name: Run chart-testing (lint) | ||
run: ct lint --target-branch=main | ||
|
||
install_deploy: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
|
@@ -55,7 +23,7 @@ jobs: | |
- name: Deploy using helm chart | ||
run: | | ||
helm upgrade --install cnp --namespace postgresql-operator-system \ | ||
--create-namespace cloud-native-postgresql --wait | ||
--create-namespace charts/cloud-native-postgresql --wait | ||
- name: Install kubectl | ||
uses: azure/setup-kubectl@v1 | ||
|
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,36 @@ | ||
name: linter | ||
|
||
on: | ||
push: | ||
|
||
jobs: | ||
linter: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Helm | ||
uses: azure/setup-helm@v1 | ||
with: | ||
version: v3.4.0 | ||
|
||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
|
||
- name: Set up chart-testing | ||
uses: helm/[email protected] | ||
|
||
- name: Run chart-testing (list-changed) | ||
id: list-changed | ||
run: | | ||
changed=$(ct list-changed --target-branch=main) | ||
if [[ -n "$changed" ]]; then | ||
echo "::set-output name=changed::true" | ||
fi | ||
- name: Run chart-testing (lint) | ||
run: ct lint --target-branch=main |
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,31 @@ | ||
# Create a PR for a release when a commit is pushed on a release/v* branch | ||
|
||
name: release-pr | ||
|
||
on: | ||
push: | ||
branches: | ||
- release/v* | ||
|
||
jobs: | ||
pull-request: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/[email protected] | ||
- | ||
name: Get tag | ||
run: | | ||
echo "TAG=${GITHUB_REF##*/}" >> $GITHUB_ENV | ||
- | ||
name: Pull Request | ||
id: open-pr | ||
uses: repo-sync/[email protected] | ||
with: | ||
destination_branch: "main" | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
pr_body: "Automated PR. Will trigger the ${{ env.TAG }} release when approved." | ||
pr_label: release | ||
pr_title: "Release ${{ env.TAG }}" | ||
|
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,30 @@ | ||
name: release-publish | ||
|
||
on: | ||
push: | ||
tags: | ||
- v* | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Configure Git | ||
run: | | ||
git config user.name "$GITHUB_ACTOR" | ||
git config user.email "[email protected]" | ||
- name: Install Helm | ||
uses: azure/setup-helm@v1 | ||
with: | ||
version: v3.4.0 | ||
|
||
- name: Run chart-releaser | ||
uses: helm/[email protected] | ||
env: | ||
CR_TOKEN: "${{ secrets.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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Create a tag when a PR on a release/v* branch is merged | ||
|
||
name: release-tag | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- closed | ||
branches: | ||
- main | ||
|
||
jobs: | ||
tag: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/[email protected] | ||
- | ||
name: Create tag | ||
if: github.event.pull_request.merged == true && startsWith(${{ github.head_ref }}, "release/v") | ||
uses: christophebedard/[email protected] | ||
with: | ||
token: ${{ secrets.REPO_GHA_PAT }} | ||
version_regex: '^Version tag to ([0-9]+\.[0-9]+\.[0-9]+)' | ||
version_tag_prefix: v | ||
dry_run: false | ||
|
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,19 @@ | ||
# Cloud Native PostgreSQL release procedure | ||
|
||
**Steps:** | ||
|
||
The following steps assume version 0.2.0 as the one to be released. Alter the | ||
instructions accordingly. | ||
|
||
1. Create branch `release/v0.2.0` | ||
1. Approve the PR that is automatically generated. | ||
1. The tag 0.2.0 will be created when the PR is merged. | ||
1. The helm chart will be automatically added to the chart index. | ||
|
||
To check the chart was updated correctly, run: | ||
```bash | ||
helm repo add cnp https://enterprisedb.github.io/cloud-native-postgresql-helm/ | ||
# or "helm repo update" if already added | ||
helm search repo cnp | ||
``` | ||
and you should see the latest version available. |
File renamed without changes.
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 |
---|---|---|
|
@@ -33,3 +33,6 @@ keywords: | |
- postgres | ||
- database | ||
home: https://www.enterprisedb.com/products/postgresql-on-kubernetes-ha-clusters-k8s-containers-scalable | ||
maintainers: | ||
- name: phisco | ||
email: [email protected] |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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