From 3582b69ae4d49882967e1a522e747d4bee30c2fd Mon Sep 17 00:00:00 2001 From: Mayank <33252549+mynktl@users.noreply.github.com> Date: Wed, 8 Sep 2021 16:28:32 +0530 Subject: [PATCH] chore(build): updating default/build branch from master to develop (#89) * updating branch reference from master to develop in following files: - CONTRIBUTING.md - GOVERNANCE.md - README.md - RELEASE.md - buildscripts/install-test-dep.sh - code-standard.md - developer-setup.md * chore(workflow): push images to ghcr Signed-off-by: mayank --- .github/workflows/build.yml | 22 ++++++++++++-- .github/workflows/pull_request.yml | 4 +-- .github/workflows/release.yml | 18 ++++++++++- CONTRIBUTING.md | 4 +-- GOVERNANCE.md | 2 +- README.md | 2 +- RELEASE.md | 6 ++-- buildscripts/install-test-dep.sh | 2 +- code-standard.md | 2 +- developer-setup.md | 48 +++++++++++++++--------------- 10 files changed, 71 insertions(+), 39 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 751a2b6..d070819 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,7 +17,7 @@ on: create: push: branches: - - 'master' + - 'develop' - 'v*' paths-ignore: - '*.md' @@ -91,7 +91,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 @@ -105,6 +105,7 @@ jobs: images: | ${{ env.IMAGE_ORG }}/cstor-base quay.io/${{ env.IMAGE_ORG }}/cstor-base + ghcr.io/${{ env.IMAGE_ORG }}/cstor-base tag-latest: false tag-custom-only: true tag-custom: | @@ -139,6 +140,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: @@ -176,7 +184,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 @@ -190,6 +198,7 @@ jobs: images: | ${{ env.IMAGE_ORG }}/cstor-pool quay.io/${{ env.IMAGE_ORG }}/cstor-pool + ghcr.io/${{ env.IMAGE_ORG }}/cstor-pool tag-latest: false tag-custom-only: true tag-custom: | @@ -224,6 +233,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: diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index a56ddcf..ed3a221 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -17,8 +17,8 @@ name: ci on: pull_request: branches: - # on pull requests to master and release branches - - 'master' + # on pull requests to develop and release branches + - 'develop' - 'v*' paths-ignore: - '*.md' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5ee3ac2..3750619 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -52,6 +52,7 @@ jobs: images: | ${{ env.IMAGE_ORG }}/cstor-base quay.io/${{ env.IMAGE_ORG }}/cstor-base + ghcr.io/${{ env.IMAGE_ORG }}/cstor-base tag-latest: true tag-semver: | {{version}} @@ -85,6 +86,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: @@ -132,6 +140,7 @@ jobs: images: | ${{ env.IMAGE_ORG }}/cstor-pool quay.io/${{ env.IMAGE_ORG }}/cstor-pool + ghcr.io/${{ env.IMAGE_ORG }}/cstor-pool tag-latest: true tag-semver: | {{version}} @@ -165,6 +174,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: @@ -194,4 +210,4 @@ jobs: m-exporter istgt # GR_TOKEN secret is the access token to perform github releases - github-token: ${{ secrets.GR_TOKEN }} \ No newline at end of file + github-token: ${{ secrets.GR_TOKEN }} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 65ed9dd..15415ae 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,7 +8,7 @@ You can contribute to libcstor by filling an issue at [openebs/libcstor](https:/ * If you want to file an issue for bug or feature request, please see [Filing an issue](#filing-an-issue) * If you are a first-time contributor, please see [Steps to Contribute](#steps-to-contribute) and code standard(code-standard.md). -* 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/HEAD/community) ## Filing an issue ### Before filing an issue @@ -94,7 +94,7 @@ For setting up a development environment on your local machine, see the detailed ## 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/HEAD/community) * If PR is fixing any issues from [github-issues](github.com/openebs/libcstor/issues) then you need to mention the issue number with a link in the PR description. like: _fixes https://github.com/openebs/libcstor/issues/56_ diff --git a/GOVERNANCE.md b/GOVERNANCE.md index 307af0a..4aa9ce0 100644 --- a/GOVERNANCE.md +++ b/GOVERNANCE.md @@ -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). \ No newline at end of file +[OpenEBS Project Governance](https://github.com/openebs/openebs/blob/HEAD/GOVERNANCE.md). diff --git a/README.md b/README.md index bc67fbc..247420b 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fopenebs%2Flibcstor.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fopenebs%2Flibcstor?ref=badge_shield) [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/2765/badge)](https://bestpractices.coreinfrastructure.org/projects/2765) [![Releases](https://img.shields.io/github/v/release/openebs/libcstor.svg?include_prereleases&style=flat-square)](https://github.com/openebs/libcstor/releases) -[![LICENSE](https://img.shields.io/github/license/openebs/libcstor.svg?style=flat-square)](https://github.com/openebs/libcstor/blob/master/LICENSE) +[![LICENSE](https://img.shields.io/github/license/openebs/libcstor.svg?style=flat-square)](https://github.com/openebs/libcstor/blob/develop/LICENSE) Library to serve IOs on ZVOL over network connections diff --git a/RELEASE.md b/RELEASE.md index 4e05cd3..1eb5d53 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -20,7 +20,7 @@ Once all the above tests are completed, a main release tagged image is published libcstor is released as a container image with a versioned tag. -Before creating a release, the 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 `v.1.9.x` if release is for v1.9.0. +Before creating a release, the 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 `v.1.9.x` if release is for v1.9.0. Once the release branch is created, changelog from `changelogs/unreleased` needs to be moved to release specific folder `changelogs/v1.9.x`, if release branch is `v1.10.x` then folder will be `changelogs/v1.10.x`. @@ -41,12 +41,12 @@ https://quay.io/repository/openebs/cstor-pool-arm64?tab=tags https://hub.docker.com/r/openebs/cstor-pool-arm64/tags ``` -Once a release is created, update the release description with the changelog mentioned in folder `changelog/v1.9.x`. Once the changelogs are updated in the release, the repo owner needs to create a PR to `master` with the following details: +Once a release is created, update the release description with the changelog mentioned in folder `changelog/v1.9.x`. Once the changelogs are updated in the release, the repo owner needs to create a PR to `develop` with the following details: 1. update the changelog from folder `changelog/v1.9.x` to file `libcstor/CHANGELOG-v1.9.md` 2. If a release is an RC tag then PR should include the changes to remove the changelog from folder`changelog/v1.9.x` which are already mentioned in `libcstor/CHANGELOG-v1.9.md` as part of step number 1. 3. If a release is not an RC tag then - PR should include the changes to remove files from `changelog/v1.9.x` folder. - - PR should update the root [CHANGELOG file](https://github.com/openebs/libcstor/blob/master/CHANGELOG.md) with contents of file `libcstor/CHANGELOG-v1.9.md` + - PR should update the root [CHANGELOG file](https://github.com/openebs/libcstor/blob/develop/CHANGELOG.md) with contents of file `libcstor/CHANGELOG-v1.9.md` Format of the `libcstor/CHANGELOG-v1.9.md` file must be as below: ``` diff --git a/buildscripts/install-test-dep.sh b/buildscripts/install-test-dep.sh index 519d44e..c3f0d27 100755 --- a/buildscripts/install-test-dep.sh +++ b/buildscripts/install-test-dep.sh @@ -59,7 +59,7 @@ cd .. # we need cstor headers git clone "https://github.com/${REPO_ORG}/cstor.git" cd cstor || exit 1 -if [ "${BRANCH}" == "master" ]; then +if [ "${BRANCH}" == "develop" ]; then git checkout develop else git checkout "${BRANCH}" || git checkout develop diff --git a/code-standard.md b/code-standard.md index 34132d5..6a83f20 100644 --- a/code-standard.md +++ b/code-standard.md @@ -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/HEAD/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 diff --git a/developer-setup.md b/developer-setup.md index cf25ac9..871ad76 100644 --- a/developer-setup.md +++ b/developer-setup.md @@ -58,7 +58,7 @@ git clone https://github.com/$user/libcstor.git cd libcstor git remote add upstream https://github.com/openebs/libcstor.git -# Never push to upstream master +# Never push to upstream develop git remote set-url --push upstream no_push # Confirm that your remotes make sense: @@ -99,7 +99,7 @@ git remote -v * Test your changes - Integration tests are written in c and c+. Test script is maintained at https://github.com/openebs/libcstor/blob/master/tests/cstor/script/test_uzfs.sh + Integration tests are written in c and c+. Test script is maintained at https://github.com/openebs/libcstor/blob/HEAD/tests/cstor/script/test_uzfs.sh To run the run the integration tests go to cstor directory and run below command. ```sh ../libcstor/tests/cstor/script/test_uzfs.sh -T all @@ -114,15 +114,15 @@ Open a terminal on your local machine. Change directory to the libcstor fork roo $ cd libcstor ``` - Check out the master branch. + Check out the develop branch. ```sh - $ git checkout master - Switched to branch 'master' - Your branch is up-to-date with 'origin/master'. + $ git checkout develop + Switched to branch 'develop' + Your branch is up-to-date with 'origin/develop'. ``` - Recall that origin/master is a branch on your remote GitHub repository. + Recall that origin/develop is a branch on your remote GitHub repository. Make sure you have the upstream remote openebs/libcstor by listing them. ```sh @@ -138,43 +138,43 @@ $ cd libcstor ```sh $ git remote add upstream https://github.com/openebs/libcstor.git ``` - Fetch all the changes from the upstream master branch. + Fetch all the changes from the upstream develop branch. ```sh - $ git fetch upstream master + $ git fetch upstream develop remote: Counting objects: 141, done. remote: Compressing objects: 100% (29/29), done. remote: Total 141 (delta 52), reused 46 (delta 46), pack-reused 66 Receiving objects: 100% (141/141), 112.43 KiB | 0 bytes/s, done. Resolving deltas: 100% (79/79), done. From github.com:openebs/libcstor - * branch master -> FETCH_HEAD + * branch develop -> FETCH_HEAD ``` - Rebase your local master with the upstream/master. + Rebase your local develop with the upstream/develop. ```sh - $ git rebase upstream/master + $ git rebase upstream/develop First, rewinding head to replay your work on top of it... - Fast-forwarded master to upstream/master. + Fast-forwarded develop to upstream/develop. ``` - This command applies all the commits from the upstream master to your local master. + This command applies all the commits from the upstream develop to your local develop. Check the status of your local branch. ```sh $ git status - On branch master - Your branch is ahead of 'origin/master' by 12 commits. + On branch develop + Your branch is ahead of 'origin/develop' by 12 commits. (use "git push" to publish your local commits) nothing to commit, working directory clean ``` - Your local repository now has all the changes from the upstream remote. You need to push the changes to your remote fork which is origin master. + Your local repository now has all the changes from the upstream remote. You need to push the changes to your remote fork which is origin develop. - Push the rebased master to origin master. + Push the rebased develop to origin develop. ```sh - $ git push origin master + $ git push origin develop Username for 'https://github.com': $user Password for 'https://$user@github.com': Counting objects: 223, done. @@ -182,16 +182,16 @@ $ cd libcstor Writing objects: 100% (69/69), 8.76 KiB | 0 bytes/s, done. Total 69 (delta 53), reused 47 (delta 31) To https://github.com/$user/libcstor.git - 8e107a9..5035fa1 master -> master + 8e107a9..5035fa1 develop -> develop ``` ### Contributing to a feature or bugfix. -Always start with creating a new branch from master to work on a new feature or bugfix. Your branch name should have the format XX-descriptive where XX is the issue number you are working on followed by some descriptive text. For example: +Always start with creating a new branch from develop to work on a new feature or bugfix. Your branch name should have the format XX-descriptive where XX is the issue number you are working on followed by some descriptive text. For example: ```sh - $ git checkout master - # Make sure the master is rebased with the latest changes as described in the previous step. + $ git checkout develop + # Make sure the develop is rebased with the latest changes as described in the previous step. $ git checkout -b 1234-fix-developer-docs Switched to a new branch '1234-fix-developer-docs' ``` @@ -204,7 +204,7 @@ Happy Hacking! ```sh # While on your myfeature branch (see above) git fetch upstream -git rebase upstream/master +git rebase upstream/develop ``` While you rebase your changes, you must resolve any conflicts that might arise and build and test your changes using the above steps.