mirror of
https://github.com/keycloak/keycloak.git
synced 2026-01-10 15:32:05 -03:30
fix: switching to the registry addon for olm testing
closes: #40099 (cherry picked from commit eb96b4a59f25b0cf0715c21f0b0d8325b4d4c5b9) (cherry picked from commit 9e6e9e37c4db0d15a22217413de55e1a521a5219) Signed-off-by: Steve Hawkins <shawkins@redhat.com>
This commit is contained in:
parent
eab83b40d5
commit
6a6e35bddf
5
.github/workflows/operator-ci.yml
vendored
5
.github/workflows/operator-ci.yml
vendored
@ -160,7 +160,7 @@ jobs:
|
||||
kubernetes version: ${{ env.KUBERNETES_VERSION }}
|
||||
github token: ${{ secrets.GITHUB_TOKEN }}
|
||||
driver: docker
|
||||
start args: --memory=${{ env.MINIKUBE_MEMORY }}
|
||||
start args: --memory=${{ env.MINIKUBE_MEMORY }} --addons=registry --insecure-registry=192.168.49.0/24
|
||||
|
||||
- name: Install OPM
|
||||
uses: redhat-actions/openshift-tools-installer@v1
|
||||
@ -185,8 +185,9 @@ jobs:
|
||||
- name: Arrange OLM test installation
|
||||
working-directory: operator
|
||||
run: |
|
||||
echo "Minikube IP $(minikube ip)"
|
||||
eval $(minikube -p minikube docker-env)
|
||||
./scripts/olm-testing.sh ${GITHUB_SHA::6}
|
||||
REGISTRY=$(minikube ip):5000 ./scripts/olm-testing.sh ${GITHUB_SHA::6}
|
||||
|
||||
- name: Deploy an example Keycloak and wait for it to be ready
|
||||
working-directory: operator
|
||||
|
||||
@ -19,7 +19,7 @@ mkdir -p $SCRIPT_DIR/../olm/catalog/test-catalog
|
||||
--output yaml > test-catalog/operator.yaml
|
||||
|
||||
opm render $BUNDLE_IMAGE:$VERSION \
|
||||
--output=yaml >> test-catalog/operator.yaml
|
||||
--output=yaml --skip-tls >> test-catalog/operator.yaml
|
||||
|
||||
cat << EOF >> test-catalog/operator.yaml
|
||||
---
|
||||
|
||||
@ -10,14 +10,15 @@ TARGET_NAMESPACES=${3-$INSTALL_NAMESPACE}
|
||||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||
|
||||
# This version translates to one day for ttl.sh
|
||||
REGISTRY=${REGISTRY:-ttl.sh}
|
||||
VERSION="86400000.0.0"
|
||||
|
||||
# Build Keycloak Docker image (the keycloak tar.gz should already be in the container folder)
|
||||
(
|
||||
cd $SCRIPT_DIR/../../quarkus/container
|
||||
|
||||
docker build --build-arg KEYCLOAK_DIST=$(ls keycloak-*.tar.gz) . -t "ttl.sh/${UUID}keycloak:${VERSION}"
|
||||
docker push "ttl.sh/${UUID}keycloak:${VERSION}"
|
||||
docker build --build-arg KEYCLOAK_DIST=$(ls keycloak-*.tar.gz) . -t "$REGISTRY/${UUID}keycloak:${VERSION}"
|
||||
docker push "$REGISTRY/${UUID}keycloak:${VERSION}"
|
||||
)
|
||||
|
||||
# Build the operator Docker image
|
||||
@ -25,13 +26,13 @@ VERSION="86400000.0.0"
|
||||
cd $SCRIPT_DIR/../../
|
||||
./mvnw clean package -Poperator -pl :keycloak-operator -am \
|
||||
-Dquarkus.container-image.build=true \
|
||||
-Dquarkus.container-image.image="ttl.sh/${UUID}keycloak-operator:${VERSION}" \
|
||||
-Dkc.operator.keycloak.image="ttl.sh/${UUID}keycloak:${VERSION}" \
|
||||
-Dquarkus.container-image.image="$REGISTRY/${UUID}keycloak-operator:${VERSION}" \
|
||||
-Dkc.operator.keycloak.image="$REGISTRY/${UUID}keycloak:${VERSION}" \
|
||||
-DskipTests
|
||||
# JIB patching on images doesn't work reliably with ttl.sh
|
||||
docker push "ttl.sh/${UUID}keycloak-operator:${VERSION}"
|
||||
docker push "$REGISTRY/${UUID}keycloak-operator:${VERSION}"
|
||||
)
|
||||
|
||||
$SCRIPT_DIR/prepare-olm-test.sh ttl.sh ${VERSION} NONE ${UUID} $TARGET_NAMESPACES
|
||||
$SCRIPT_DIR/prepare-olm-test.sh $REGISTRY ${VERSION} NONE ${UUID} $TARGET_NAMESPACES
|
||||
|
||||
$SCRIPT_DIR/install-keycloak-operator.sh $INSTALL_NAMESPACE
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user