Skip to content

Commit

Permalink
chore(bors): merge pull request #411
Browse files Browse the repository at this point in the history
411: Helm Testing - develop support r=tiagolobocastro a=tiagolobocastro

<!

Co-authored-by: Tiago Castro <[email protected]>
  • Loading branch information
mayastor-bors and tiagolobocastro committed Jan 31, 2024
2 parents 37aa562 + 687f524 commit ee2f934
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 14 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/develop-to-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
automated-pr
draft: false
signoff: true
token: ${{ secrets.OPENEBS_CI }}
token: ${{ secrets.ORG_CI_GITHUB }}
- name: Approve Pull Request by CI Bot
if: ${{ steps.cpr.outputs.pull-request-number }}
run: |
Expand All @@ -48,10 +48,10 @@ jobs:
run: |
gh pr review ${{ steps.cpr.outputs.pull-request-number }} --approve
env:
GH_TOKEN: ${{ secrets.OPENEBS_CI_2 }}
GH_TOKEN: ${{ secrets.ORG_CI_GITHUB_2 }}
- name: Bors Merge Pull Request
if: ${{ steps.cpr.outputs.pull-request-number }}
run: |
gh pr comment ${{ steps.cpr.outputs.pull-request-number }} --body "bors merge"
env:
GH_TOKEN: ${{ secrets.OPENEBS_CI }}
GH_TOKEN: ${{ secrets.ORG_CI_GITHUB }}
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
name: Main Helm Chart
name: Helm Testing Chart
on:
push:
branches:
- main
- 'helm-testing/**'
- '!helm-testing/**-staging**'
paths:
- 'chart/**'
- '.github/**'

jobs:
main-chart:
helm-testing-chart:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -34,9 +34,7 @@ jobs:
- name: Publish Mayastor Helm chart
uses: stefanprodan/[email protected]
with:
token: ${{ secrets.OPENEBS_CI_GITHUB }}
token: ${{ secrets.ORG_CI_GITHUB }}
charts_dir: .
charts_url: https://openebs.github.io/mayastor-chart-donotuse
owner: openebs
repository: mayastor-chart-donotuse
branch: gh-pages
4 changes: 2 additions & 2 deletions .github/workflows/publish-release-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
echo "Release Tag: ${{ github.event.release.tag_name }}"
./scripts/github/release-artifacts.sh --tag "${{ github.event.release.tag_name }}" --workflow "Release Artifacts" --repo-org "${{ github.repository_owner }}" download
env:
GITHUB_TOKEN: ${{ secrets.OPENEBS_RELEASES }}
GITHUB_TOKEN: ${{ secrets.ORG_CI_GITHUB }}
- name: Upload Artifacts
run: |
repos="mayastor-extensions mayastor-control-plane mayastor"
./scripts/github/release-artifacts.sh --tag "${{ github.event.release.tag_name }}" --repo-org "${{ github.repository_owner }}" --upload "$repos" upload
env:
GITHUB_TOKEN: ${{ secrets.OPENEBS_RELEASES }}
GITHUB_TOKEN: ${{ secrets.ORG_CI_GITHUB }}
6 changes: 3 additions & 3 deletions scripts/helm/publish-chart-yaml.sh
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ branch_chart_version()
else
die "Cannot determine Chart version from branch: $check_branch"
fi
elif [ "$check_branch" == "main" ]; then
elif [[ "$check_branch" == @(helm-testing/develop|main) ]]; then
if [ -z "$LATEST_RELEASE_BRANCH" ]; then
LATEST_RELEASE_BRANCH=$(latest_release_branch)
fi
Expand Down Expand Up @@ -351,7 +351,7 @@ echo "APP_TAG: $APP_TAG"
echo "CHART_VERSION: $CHART_VERSION"
echo "CHART_APP_VERSION: $CHART_APP_VERSION"

if [ "$CHECK_BRANCH" = "main" ]; then
if [[ "$CHECK_BRANCH" == @(helm-testing/develop|main) ]]; then
allowed_diff=("" "major" "minor" "patch" "prerelease")
else
# Allow only for a semver difference of at most patch
Expand All @@ -366,7 +366,7 @@ fi

if [ -n "$CHECK_BRANCH" ]; then
if [ "$(semver get prerel "$APP_TAG")" != "" ]; then
if [ ! "$CHECK_BRANCH" == "main" ]; then
if [[ "$CHECK_BRANCH" != @(helm-testing/develop|main) ]]; then
die "Script expects Branch Name($APP_TAG) to point to a stable release"
fi
fi
Expand Down

0 comments on commit ee2f934

Please sign in to comment.