Skip to content

Commit

Permalink
chore(repo): rename master branch to develop (#641)
Browse files Browse the repository at this point in the history
* update workflow from master branch to develop
* add login step to ghcr registry
* add markdown files to ignore path

Signed-off-by: Akhil Mohan <[email protected]>
  • Loading branch information
akhilerm authored Sep 14, 2021
1 parent 9fbcfa8 commit 6745dcf
Show file tree
Hide file tree
Showing 13 changed files with 104 additions and 53 deletions.
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ Where:
* `style` - formatting, missing semi colons, linting fix etc; no significant production code changes
* `test` - adding missing tests, refactoring tests; no production code change
* `refactor` - refactoring production code, eg. renaming a variable or function name, there should not be any significant production code changes
* `cherry-pick` - if PR is merged in master branch and raised to release branch(like v0.4.x)
* `cherry-pick` - if PR is merged in develop branch and raised to release branch(like v0.4.x)

IMPORTANT: Please review the [CONTRIBUTING.md](../CONTRIBUTING.md) file for detailed contributing guidelines.
36 changes: 31 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@ on:
create:
push:
branches:
- master
- develop
- 'v*'
paths-ignore:
- 'docs/**'
- 'changelogs/**'
- 'deploy/helm/**'
- 'CHANGELOG.md'
- '*.md'
- 'LICENSE'
- 'MAINTAINERS'

jobs:
lint:
Expand Down Expand Up @@ -82,7 +84,7 @@ jobs:
run: |
BRANCH="${GITHUB_REF##*/}"
CI_TAG=${BRANCH#v}-ci
if [ ${BRANCH} = "master" ]; then
if [ ${BRANCH} = "develop" ]; then
CI_TAG="ci"
fi
echo "TAG=${CI_TAG}" >> $GITHUB_ENV
Expand All @@ -100,6 +102,7 @@ jobs:
images: |
${{ env.IMAGE_ORG }}/node-disk-manager
quay.io/${{ env.IMAGE_ORG }}/node-disk-manager
ghcr.io/${{ env.IMAGE_ORG }}/node-disk-manager
tag-latest: false
tag-custom-only: true
tag-custom: |
Expand Down Expand Up @@ -133,6 +136,13 @@ jobs:
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_TOKEN }}

- name: Login to GHCR
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build & Push Image
uses: docker/build-push-action@v2
with:
Expand Down Expand Up @@ -164,7 +174,7 @@ jobs:
run: |
BRANCH="${GITHUB_REF##*/}"
CI_TAG=${BRANCH#v}-ci
if [ ${BRANCH} = "master" ]; then
if [ ${BRANCH} = "develop" ]; then
CI_TAG="ci"
fi
echo "TAG=${CI_TAG}" >> $GITHUB_ENV
Expand All @@ -182,6 +192,7 @@ jobs:
images: |
${{ env.IMAGE_ORG }}/node-disk-exporter
quay.io/${{ env.IMAGE_ORG }}/node-disk-exporter
ghcr.io/${{ env.IMAGE_ORG }}/node-disk-exporter
tag-latest: false
tag-custom-only: true
tag-custom: |
Expand Down Expand Up @@ -215,6 +226,13 @@ jobs:
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_TOKEN }}

- name: Login to GHCR
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build & Push Image
uses: docker/build-push-action@v2
with:
Expand Down Expand Up @@ -246,7 +264,7 @@ jobs:
run: |
BRANCH="${GITHUB_REF##*/}"
CI_TAG=${BRANCH#v}-ci
if [ ${BRANCH} = "master" ]; then
if [ ${BRANCH} = "develop" ]; then
CI_TAG="ci"
fi
echo "TAG=${CI_TAG}" >> $GITHUB_ENV
Expand All @@ -264,6 +282,7 @@ jobs:
images: |
${{ env.IMAGE_ORG }}/node-disk-operator
quay.io/${{ env.IMAGE_ORG }}/node-disk-operator
ghcr.io/${{ env.IMAGE_ORG }}/node-disk-operator
tag-latest: false
tag-custom-only: true
tag-custom: |
Expand Down Expand Up @@ -297,6 +316,13 @@ jobs:
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_TOKEN }}

- name: Login to GHCR
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build & Push Image
uses: docker/build-push-action@v2
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/chart-lint-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ on:
paths:
- 'deploy/helm/**'
branches:
- master
- develop
pull_request:
paths:
- 'deploy/helm/**'
branches:
- master
- develop

jobs:
lint-test:
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@ on:
pull_request:
paths-ignore:
- 'docs/**'
- 'deploy/helm/**'
- 'changelogs/**'
- 'CHANGELOG.md'
- 'deploy/helm/**'
- '*.md'
- 'LICENSE'
- 'MAINTAINERS'
branches:
# on pull requests to master and release branches
- master
# on pull requests to develop and release branches
- develop
- 'v*'

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-charts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
paths:
- 'deploy/helm/**'
branches:
- master
- develop

jobs:
release:
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ jobs:
images: |
${{ env.IMAGE_ORG }}/node-disk-manager
quay.io/${{ env.IMAGE_ORG }}/node-disk-manager
ghcr.io/${{ env.IMAGE_ORG }}/node-disk-manager
tag-latest: true
tag-semver: |
{{version}}
Expand Down Expand Up @@ -83,6 +84,13 @@ jobs:
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_TOKEN }}

- name: Login to GHCR
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build & Push Image
uses: docker/build-push-action@v2
with:
Expand Down Expand Up @@ -129,6 +137,7 @@ jobs:
images: |
${{ env.IMAGE_ORG }}/node-disk-exporter
quay.io/${{ env.IMAGE_ORG }}/node-disk-exporter
ghcr.io/${{ env.IMAGE_ORG }}/node-disk-exporter
tag-latest: true
tag-semver: |
{{version}}
Expand Down Expand Up @@ -162,6 +171,13 @@ jobs:
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_TOKEN }}

- name: Login to GHCR
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build & Push Image
uses: docker/build-push-action@v2
with:
Expand Down Expand Up @@ -208,6 +224,7 @@ jobs:
images: |
${{ env.IMAGE_ORG }}/node-disk-operator
quay.io/${{ env.IMAGE_ORG }}/node-disk-operator
ghcr.io/${{ env.IMAGE_ORG }}/node-disk-operator
tag-latest: true
tag-semver: |
{{version}}
Expand Down Expand Up @@ -241,6 +258,13 @@ jobs:
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_TOKEN }}

- name: Login to GHCR
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build & Push Image
uses: docker/build-push-action@v2
with:
Expand Down
14 changes: 7 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ NDM uses the standard GitHub pull requests process to review and accept contribu
* If you want to file an issue for a bug or feature request, please see [Filing a issue](#filing-an-issue)
* If you have documentation improvement ideas, go ahead and create a pull request. See [Pull Request checklist](#pull-request-checklist)
* If you would like to make code contributions, please start with [Setting up the Development Environment](#setting-up-your-development-environment).
* If you would like to work on something more involved, please connect with the OpenEBS Contributors. See [OpenEBS Community](https://github.com/openebs/openebs/tree/master/community)
* If you would like to work on something more involved, please connect with the OpenEBS Contributors. See [OpenEBS Community](https://github.com/openebs/openebs/tree/main/community)

## Steps to Contribute

Expand All @@ -15,10 +15,10 @@ NDM is an Apache 2.0 Licensed project and all your commits should be signed with
* Find an issue to work on or create a new issue. The issues are maintained at [openebs/openebs](https://github.com/openebs/openebs/issues?q=is%3Aissue+is%3Aopen+label%3Andm). You can pick up from a list of [good-first-issues](https://github.com/openebs/node-disk-manager/labels/good%20first%20issue).
* Claim your issue by commenting your intent to work on it to avoid duplication of efforts.
* Fork the repository on GitHub.
* Create a branch from where you want to base your work (usually master).
* Create a branch from where you want to base your work (usually develop).
* Make your changes. If you are working on code contributions, please see [Setting up the Development Environment](#setting-up-your-development-environment).
* Relevant coding style guidelines are the [Go Code Review Comments](https://code.google.com/p/go-wiki/wiki/CodeReviewComments) and the _Formatting and style_ section of Peter Bourgon's [Go: Best Practices for Production Environments](http://peter.bourgon.org/go-in-production/#formatting-and-style).
* Commit your changes by making sure the commit messages convey the need and notes about the commit. The commit message format followed for OpenEBS projects can be found [here](https://github.com/openebs/openebs/blob/master/contribute/git-commit-message.md).
* Commit your changes by making sure the commit messages convey the need and notes about the commit. The commit message format followed for OpenEBS projects can be found [here](https://github.com/openebs/openebs/blob/main/contribute/git-commit-message.md).
* Push your changes to the branch in your fork of the repository.
* Submit a pull request to the original repository. See [Pull Request checklist](#pull-request-checklist)

Expand Down Expand Up @@ -57,7 +57,7 @@ When filing an issue, make sure to answer these seven questions:
**If you want to introduce a new label then you need to raise a PR to update this document with the new label details.**

## Pull Request Checklist
* Rebase to the current master branch before submitting your pull request.
* Rebase to the current develop branch before submitting your pull request.
* Commits should be as small as possible. Each commit should follow the checklist below:
- For code changes, add tests relevant to the fixed bug or new feature.
- Pass the compilation and tests - includes spell checks, formatting, etc.
Expand Down Expand Up @@ -87,14 +87,14 @@ When filing an issue, make sure to answer these seven questions:
* `style` - formatting, missing semi colons, linting fix etc; no significant production code changes
* `test` - adding missing tests, refactoring tests; no production code change
* `refactor` - refactoring production code, eg. renaming a variable or function name, there should not be any significant production code changes
* `cherry-pick` - if PR is merged in master branch and raised to release branch(like v0.4.x)
* `cherry-pick` - if PR is merged in develop branch and raised to release branch(like v0.4.x)

* If your PR is not getting reviewed, or you need a specific person to review it, please reach out to the OpenEBS Contributors. See [OpenEBS Community](https://github.com/openebs/openebs/tree/master/community)
* If your PR is not getting reviewed, or you need a specific person to review it, please reach out to the OpenEBS Contributors. See [OpenEBS Community](https://github.com/openebs/openebs/tree/main/community)

## Code Reviews
All submissions, including submissions by project members, require review. We use GitHub pull requests for this purpose. Consult [GitHub Help](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests) for more information on using pull requests.

* If your PR is not getting reviewed or you need a specific person to review it, please reach out to the OpenEBS Contributors. See [OpenEBS Community](https://github.com/openebs/openebs/tree/master/community)
* If your PR is not getting reviewed or you need a specific person to review it, please reach out to the OpenEBS Contributors. See [OpenEBS Community](https://github.com/openebs/openebs/tree/main/community)

* If PR is fixing any issues from [github-issues](https://github.com/openebs/openebs/issues) then you need to mention the issue number with link in PR description. like : _fixes https://github.com/openebs/openebs/issues/2961_

Expand Down
2 changes: 1 addition & 1 deletion GOVERNANCE.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
This is a OpenEBS sub project and abides by the
[OpenEBS Project Governance](https://github.com/openebs/openebs/blob/master/GOVERNANCE.md).
[OpenEBS Project Governance](https://github.com/openebs/openebs/blob/main/GOVERNANCE.md).
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
[![Build Status](https://github.com/openebs/node-disk-manager/actions/workflows/build.yml/badge.svg)](https://github.com/openebs/node-disk-manager/actions/workflows/build.yml)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/ea8d7835d7224178af058d98e5dac117)](https://www.codacy.com/app/OpenEBS/node-disk-manager?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=openebs/node-disk-manager&amp;utm_campaign=Badge_Grade)
[![Go Report](https://goreportcard.com/badge/github.com/openebs/node-disk-manager)](https://goreportcard.com/report/github.com/openebs/node-disk-manager)
[![codecov](https://codecov.io/gh/openebs/node-disk-manager/branch/master/graph/badge.svg)](https://codecov.io/gh/openebs/node-disk-manager)
[![codecov](https://codecov.io/gh/openebs/node-disk-manager/branch/develop/graph/badge.svg)](https://codecov.io/gh/openebs/node-disk-manager)
[![Slack](https://img.shields.io/badge/chat!!!-slack-ff1493.svg?style=flat-square)](https://kubernetes.slack.com/messages/openebs)
[![Community Meetings](https://img.shields.io/badge/Community-Meetings-blue)](https://openebs.io/community)
[![BCH compliance](https://bettercodehub.com/edge/badge/openebs/node-disk-manager?branch=master)](https://bettercodehub.com/results/openebs/node-disk-manager)
[![BCH compliance](https://bettercodehub.com/edge/badge/openebs/node-disk-manager?branch=develop)](https://bettercodehub.com/results/openebs/node-disk-manager)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fopenebs%2Fnode-disk-manager.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fopenebs%2Fnode-disk-manager?ref=badge_shield)
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/1953/badge)](https://bestpractices.coreinfrastructure.org/projects/1953)

Expand Down
4 changes: 2 additions & 2 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Once all the above tests are completed, a main release tagged image is published

node-disk-manager is released as container image with versioned tag.

Before creating a release, repo owner needs to create a separate branch from the active branch, which is `master`. Name of the branch should follow the naming convention of `v0.5.x`, if release is for v0.5.0.
Before creating a release, repo owner needs to create a separate branch from the active branch, which is `develop`. Name of the branch should follow the naming convention of `v0.5.x`, if release is for v0.5.0.

Once the release branch is created, changelog from `changelogs/unreleased` needs to be moved to release specific folder `changelogs/v0.5.x`, if release branch is `v0.5.x`.

Expand All @@ -43,7 +43,7 @@ Images for the different components are published at the following location:
https://hub.docker.com/r/openebs/node-disk-exporter/tags


Once a release is created, update the release description with the change log mentioned in `changelog/v0.5.x`. Once the change logs are updated in release, repo owner needs to create a PR to `master` with the following details:
Once a release is created, update the release description with the change log mentioned in `changelog/v0.5.x`. Once the change logs are updated in release, repo owner needs to create a PR to `develop` with the following details:
1. update the changelog from `changelog/v0.5.x` to `node-disk-manager/CHANGELOG.md`
2. If release is not a RC tag then PR should include the changes to remove `changelog/v0.5.x` folder.
3. If release is a RC tag then PR should include the changes to remove the changelog from `changelog/v0.5.x` which are already mentioned in `node-disk-manager/CHANGELOG.md` as part of step number 1.
4 changes: 2 additions & 2 deletions build/push
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ fi
# set the tag CI (fixed) and build tags.
BUILD_TAG="${CURRENT_BRANCH}-${BUILD_ID}"
CI_TAG="${CURRENT_BRANCH}-ci"
if [ ${CURRENT_BRANCH} = "master" ]; then
if [ ${CURRENT_BRANCH} = "develop" ]; then
CI_TAG="ci"
fi

Expand Down Expand Up @@ -102,7 +102,7 @@ then
# Push CI tagged image - :ci or :branch-ci
TagAndPushImage "${DIMAGE}" "${CI_TAG}"

# Push unique tagged image - :master-<uuid> or :branch-<uuid>
# Push unique tagged image - :develop-<uuid> or :branch-<uuid>
# This unique/build image will be pushed to corresponding ci repo.
TagAndPushImage "${DIMAGE}-ci" "${BUILD_TAG}"

Expand Down
2 changes: 1 addition & 1 deletion code-standard.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Sign your commits

We use the Developer Certificate of Origin (DCO) as an additional safeguard for the OpenEBS projects. This is a well established and widely used mechanism to assure that contributors have confirmed their right to license their contribution under the project's license. Please read [dcofile](https://github.com/openebs/openebs/blob/master/contribute/developer-certificate-of-origin). If you can certify it, then just add a line to every git commit message:
We use the Developer Certificate of Origin (DCO) as an additional safeguard for the OpenEBS projects. This is a well established and widely used mechanism to assure that contributors have confirmed their right to license their contribution under the project's license. Please read [dcofile](https://github.com/openebs/openebs/blob/main/contribute/developer-certificate-of-origin). If you can certify it, then just add a line to every git commit message:

````
Signed-off-by: Random J Developer <[email protected]>
Expand Down
Loading

0 comments on commit 6745dcf

Please sign in to comment.