feat: Build Eclipse Che catalog next version with digests (#1720)

Signed-off-by: Anatolii Bazko <abazko@redhat.com>
pull/1721/head
Anatolii Bazko 2023-07-06 14:15:10 +02:00 committed by GitHub
parent 1bf8dde7b6
commit 7c2a13444c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 37 additions and 4 deletions

View File

@ -22,7 +22,7 @@ on:
branches:
- main
jobs:
build-images:
build-catalog:
runs-on: ubuntu-22.04
steps:
- name: Checkout source code
@ -48,3 +48,34 @@ jobs:
tags: quay.io/eclipse/che-operator:next
- name: Build catalog source
run: ${GITHUB_WORKSPACE}/build/scripts/olm/release-catalog.sh --channel 'next' --catalog-image quay.io/eclipse/eclipse-che-olm-catalog:next
build-catalog-with-digest:
runs-on: ubuntu-22.04
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Install yq
run: sudo pip install yq
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to quay.io
uses: docker/login-action@v2
with:
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
registry: quay.io
- name: Build operator image
uses: docker/build-push-action@v3
with:
file: Dockerfile
platforms: linux/amd64,linux/ppc64le
push: true
tags: quay.io/eclipse/che-operator:next
- name: Build catalog source
run: |
${GITHUB_WORKSPACE}/build/scripts/release/addDigests.sh -s $(make csv-path CHANNEL=next) -t next
${GITHUB_WORKSPACE}/build/scripts/olm/release-catalog.sh \
--channel next \
--catalog-image quay.io/eclipse/eclipse-che-olm-catalog:next-digest \
--bundle-image quay.io/eclipse/eclipse-che-olm-bundle:$(make bundle-version CHANNEL=next)-digest

View File

@ -18,12 +18,14 @@ OPERATOR_REPO=$(dirname "$(dirname "$(dirname "$(dirname "$(readlink -f "${BASH_
init() {
unset CHANNEL
unset CATALOG_IMAGE
unset BUNDLE_IMAGE
unset IMAGE_TOOL
while [[ "$#" -gt 0 ]]; do
case $1 in
'--channel'|'-c') CHANNEL="$2"; shift 1;;
'--catalog-image'|'-i') CATALOG_IMAGE="$2"; shift 1;;
'--bundle-image'|'-n') BUNDLE_IMAGE="$2"; shift 1;;
'--image-tool'|'-t') IMAGE_TOOL="$2"; shift 1;;
'--help'|'-h') usage; exit;;
esac
@ -36,7 +38,7 @@ init() {
BUNDLE_NAME=$(make bundle-name CHANNEL="${CHANNEL}")
BUNDLE_VERSION=$(make bundle-version CHANNEL="${CHANNEL}")
REGISTRY="$(echo "${CATALOG_IMAGE}" | rev | cut -d '/' -f2- | rev)"
BUNDLE_IMAGE="${REGISTRY}/eclipse-che-olm-bundle:${BUNDLE_VERSION}"
BUNDLE_IMAGE="${BUNDLE_IMAGE:=${REGISTRY}/eclipse-che-olm-bundle:${BUNDLE_VERSION}}"
echo "[INFO] Bundle name : ${BUNDLE_NAME}"
echo "[INFO] Bundle version: ${BUNDLE_VERSION}"

View File

@ -77,7 +77,7 @@ metadata:
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
repository: https://github.com/eclipse-che/che-operator
support: Eclipse Foundation
name: eclipse-che.v7.68.0-798.next
name: eclipse-che.v7.71.0-799.next
namespace: placeholder
spec:
apiservicedefinitions: {}
@ -1231,7 +1231,7 @@ spec:
minKubeVersion: 1.19.0
provider:
name: Eclipse Foundation
version: 7.68.0-798.next
version: 7.71.0-799.next
webhookdefinitions:
- admissionReviewVersions:
- v1