From ac80382b3930bddaed6b290714b7c0996b55d635 Mon Sep 17 00:00:00 2001 From: Kiran Mova Date: Thu, 9 Sep 2021 13:47:40 +0530 Subject: [PATCH] chore(release): update workflow and base images (#1822) - Update workflow to push images to ghcr - Use openebs/linux-utils as base to maintain single source of base images for alpines - Update Release process steps to include chart updates. Signed-off-by: kmova --- .github/workflows/build.yml | 40 +++++++++++++++++++++ .github/workflows/release.yml | 33 +++++++++++++++++ README.md | 20 ++++++++--- buildscripts/apiserver/Dockerfile | 2 +- buildscripts/apiserver/apiserver.Dockerfile | 4 +-- buildscripts/mayactl/Dockerfile | 2 +- buildscripts/upgrade/Dockerfile | 2 +- buildscripts/upgrade/upgrade.Dockerfile | 2 +- 8 files changed, 95 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3413a9fb4d..e571e7b75d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -82,6 +82,7 @@ jobs: images: | ${{ env.IMAGE_ORG }}/m-apiserver quay.io/${{ env.IMAGE_ORG }}/m-apiserver + ghcr.io/${{ env.IMAGE_ORG }}/m-apiserver tag-latest: false tag-custom-only: true tag-custom: | @@ -116,6 +117,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: @@ -167,6 +175,7 @@ jobs: images: | ${{ env.IMAGE_ORG }}/cstor-pool-mgmt quay.io/${{ env.IMAGE_ORG }}/cstor-pool-mgmt + ghcr.io/${{ env.IMAGE_ORG }}/cstor-pool-mgmt tag-latest: false tag-custom-only: true tag-custom: | @@ -201,6 +210,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: @@ -253,6 +269,7 @@ jobs: images: | ${{ env.IMAGE_ORG }}/cstor-volume-mgmt quay.io/${{ env.IMAGE_ORG }}/cstor-volume-mgmt + ghcr.io/${{ env.IMAGE_ORG }}/cstor-volume-mgmt tag-latest: false tag-custom-only: true tag-custom: | @@ -287,6 +304,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: @@ -338,6 +362,7 @@ jobs: images: | ${{ env.IMAGE_ORG }}/admission-server quay.io/${{ env.IMAGE_ORG }}/admission-server + ghcr.io/${{ env.IMAGE_ORG }}/admission-server tag-latest: false tag-custom-only: true tag-custom: | @@ -372,6 +397,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: @@ -423,6 +455,7 @@ jobs: images: | ${{ env.IMAGE_ORG }}/m-upgrade quay.io/${{ env.IMAGE_ORG }}/m-upgrade + ghcr.io/${{ env.IMAGE_ORG }}/m-upgrade tag-latest: false tag-custom-only: true tag-custom: | @@ -457,6 +490,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/release.yml b/.github/workflows/release.yml index c23782da41..dce541d321 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -52,6 +52,7 @@ jobs: images: | ${{ env.IMAGE_ORG }}/m-apiserver quay.io/${{ env.IMAGE_ORG }}/m-apiserver + ghcr.io/${{ env.IMAGE_ORG }}/m-apiserver 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: @@ -131,6 +139,7 @@ jobs: images: | ${{ env.IMAGE_ORG }}/cstor-pool-mgmt quay.io/${{ env.IMAGE_ORG }}/cstor-pool-mgmt + ghcr.io/${{ env.IMAGE_ORG }}/cstor-pool-mgmt tag-latest: true tag-semver: | {{version}} @@ -164,6 +173,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: @@ -211,6 +227,7 @@ jobs: images: | ${{ env.IMAGE_ORG }}/cstor-volume-mgmt quay.io/${{ env.IMAGE_ORG }}/cstor-volume-mgmt + ghcr.io/${{ env.IMAGE_ORG }}/cstor-volume-mgmt tag-latest: true tag-semver: | {{version}} @@ -244,6 +261,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: @@ -290,6 +314,7 @@ jobs: images: | ${{ env.IMAGE_ORG }}/admission-server quay.io/${{ env.IMAGE_ORG }}/admission-server + ghcr.io/${{ env.IMAGE_ORG }}/admission-server tag-latest: true tag-semver: | {{version}} @@ -323,6 +348,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: @@ -369,6 +401,7 @@ jobs: images: | ${{ env.IMAGE_ORG }}/m-upgrade quay.io/${{ env.IMAGE_ORG }}/m-upgrade + ghcr.io/${{ env.IMAGE_ORG }}/m-upgrade tag-latest: true tag-semver: | {{version}} diff --git a/README.md b/README.md index 66f2923cc0..f6f71280da 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ As the OpenEBS community started to add new engines, the engine specific control This repository mainly contains code required for running the legacy cStor and Jiva pools and volumes like: - `m-apiserver` - used for provisoining the legacy cStor and Jiva pools and volumes. -- `mayactl` - packaged along with `m-apiserver` for fetching the legacy cStor and Jiva volume status. + - `mayactl` - packaged along with `m-apiserver` for fetching the legacy cStor and Jiva volume status. - `admission-server` - used for validating Jiva and cStor pool and volume requests. - `m-upgrade` - used for upgrading the legacy Jiva volumes, cStor pools and volumes. - `cstor-pool-mgmt` and `cstor-volume-mgmt` - used for managing the legacy cStor pool and volumes. @@ -37,9 +37,13 @@ Please refer to our documentation at [OpenEBS Documentation](http://openebs.io/) ## Release -Prior to creating a release tag on this repository on `v2.12.x` branch with the required fixes, ensure that the dependent data engine repositories and provisioner are tagged. Once the code is merged, use the following sequence to release a new version for the legacy components: -- (Optional) New release tag on v2.12.x branch of [openebs/linux-utils](https://github.com/openebs/linux-utils) -- (Optional) New release tag on v0.6.x branch of [openebs/ndm](https://github.com/openebs/node-disk-manager) +Prior to creating a release tag on this repository on `v2.12.x` branch with the required fixes, ensure that: +- the dependent data engine repositories and provisioner are tagged. +- update the [versionDetails.go](./pkg/apis/openebs.io/v1alpha1/versionDetails.go) to include the supported upgrade path. + +Once the code is merged, use the following sequence to release a new version for the legacy components: +- New release tag on v2.12.x branch of [openebs/linux-utils](https://github.com/openebs/linux-utils) +- (If required) New release tag on v0.6.x branch of [openebs/ndm](https://github.com/openebs/node-disk-manager) - New release tag on v2.12.x branch of [openebs/cstor](https://github.com/openebs/cstor) and [openebs/libcstor](https://github.com/openebs/libcstor) - New release tag on v2.12.x branch of [openebs/jiva](https://github.com/openebs/jiva) - New release tag on v2.12.x branch of [openebs/openebs-k8s-provisioner](https://github.com/openebs/openebs-k8s-provisioner) @@ -47,6 +51,14 @@ Prior to creating a release tag on this repository on `v2.12.x` branch with the - New release tag on v2.12.x branch of [openebs/maya](https://github.com/openebs/maya) - New release tag on v2.12.x branch of [openebs/velero-plugin](https://github.com/openebs/velero-plugin) +Note: The github release workflows are setup to push the tag to the dependent repositories. In the above case, if a release tag is created on v2.12.x branch of `linux-utils`, then it will trigger the releases down to `velero-plugin` repo. + +Once the tags are generated update the helm charts and YAMLs at: +- https://github.com/openebs/charts/tree/2.x/charts/openebs/templates/legacy +- https://github.com/openebs/charts/tree/main/charts/openebs/templates/legacy +- https://github.com/openebs/charts/blob/gh-pages/legacy-openebs-operator.yaml + + ## Contributing We are looking at further refactoring this repository by moving the common packages from this repository into a new common repository. If you are interested in helping with the refactoring efforts, please reach out to the OpenEBS Community. diff --git a/buildscripts/apiserver/Dockerfile b/buildscripts/apiserver/Dockerfile index b74491a64f..54e9aeaee0 100644 --- a/buildscripts/apiserver/Dockerfile +++ b/buildscripts/apiserver/Dockerfile @@ -3,7 +3,7 @@ # maya api server's releases. # -FROM alpine:3.11.5 +FROM openebs/linux-utils:2.12.x-ci # TODO: The following env variables should be auto detected. ENV MAYA_API_SERVER_NETWORK="eth0" diff --git a/buildscripts/apiserver/apiserver.Dockerfile b/buildscripts/apiserver/apiserver.Dockerfile index 90545879b2..cdced9dff5 100644 --- a/buildscripts/apiserver/apiserver.Dockerfile +++ b/buildscripts/apiserver/apiserver.Dockerfile @@ -41,7 +41,7 @@ COPY . . RUN make mayactl apiserver RUN chmod +x buildscripts/apiserver/entrypoint.sh -FROM alpine:3.11.5 +FROM openebs/linux-utils:2.12.x-ci ENV MAYA_API_SERVER_NETWORK="eth0" RUN apk add --no-cache \ @@ -74,4 +74,4 @@ COPY --from=build /go/src/github.com/openebs/maya/buildscripts/apiserver/entrypo ENTRYPOINT entrypoint.sh "${MAYA_API_SERVER_NETWORK}" -EXPOSE 5656 \ No newline at end of file +EXPOSE 5656 diff --git a/buildscripts/mayactl/Dockerfile b/buildscripts/mayactl/Dockerfile index 02ce9014f3..c0fe17819a 100644 --- a/buildscripts/mayactl/Dockerfile +++ b/buildscripts/mayactl/Dockerfile @@ -2,7 +2,7 @@ # This Dockerfile builds a recent maya container with latest code # -FROM alpine:3.11.5 +FROM openebs/linux-utils:2.12.x-ci RUN apk --no-cache add libc6-compat diff --git a/buildscripts/upgrade/Dockerfile b/buildscripts/upgrade/Dockerfile index 8bbee4f58b..bc34d56c26 100644 --- a/buildscripts/upgrade/Dockerfile +++ b/buildscripts/upgrade/Dockerfile @@ -3,7 +3,7 @@ # its latest binary # -FROM alpine:3.11.5 +FROM openebs/linux-utils:2.12.x-ci # copy the latest binary COPY upgrade /usr/local/bin/upgrade diff --git a/buildscripts/upgrade/upgrade.Dockerfile b/buildscripts/upgrade/upgrade.Dockerfile index 9e29146f51..f6592ee7ab 100644 --- a/buildscripts/upgrade/upgrade.Dockerfile +++ b/buildscripts/upgrade/upgrade.Dockerfile @@ -40,7 +40,7 @@ COPY . . RUN make upgrade -FROM alpine:3.11.5 +FROM openebs/linux-utils:2.12.x-ci ARG DBUILD_DATE ARG DBUILD_REPO_URL