Skip to content

Commit

Permalink
chore(release): update workflow and base images (#1822)
Browse files Browse the repository at this point in the history
- 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 <[email protected]>
  • Loading branch information
kmova authored Sep 9, 2021
1 parent c4eb664 commit ac80382
Show file tree
Hide file tree
Showing 8 changed files with 95 additions and 10 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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: |
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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: |
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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: |
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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: |
Expand Down Expand Up @@ -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:
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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}}
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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}}
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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}}
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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}}
Expand Down
20 changes: 16 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -37,16 +37,28 @@ 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)
- New release tag on v2.12.x branch of [openebs/m-exporter](https://github.com/openebs/m-exporter)
- 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.
Expand Down
2 changes: 1 addition & 1 deletion buildscripts/apiserver/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions buildscripts/apiserver/apiserver.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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
EXPOSE 5656
2 changes: 1 addition & 1 deletion buildscripts/mayactl/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion buildscripts/upgrade/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion buildscripts/upgrade/upgrade.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ac80382

Please sign in to comment.