zuul-operator/tools/restart.sh
Jan Gutter b723bc761b
Publish zuul-operator to quay.io
* non-ci tested scripts need updating - these are intended for
  local development workflows.
* This now publishes the operator to quay.io/zuul-ci
* This is mostly a rework of
  https://review.opendev.org/c/zuul/zuul-operator/+/881245 and
  https://review.opendev.org/c/zuul/zuul-operator/+/924870
  with much appreciation and credits to original authors

Change-Id: I0ffd39fceeaf4947ed329dd4ddb7283cdc98df86
2024-08-18 12:32:57 +01:00

79 lines
2.3 KiB
Bash
Executable File

#!/bin/bash
# Copyright 2021 Acme Gating, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
# NOTE(jan.gutter): this local developer script still references images from a
# previous release of zuul-operator.
KIND="${KIND:-kind}"
KUBECTL="${KUBECTL:-kubectl}"
DOCKER="${DOCKER:-docker}"
$KIND delete cluster
$KIND create cluster --config kind.yaml
HEAVY=true
common_images=(
docker.io/library/zookeeper:3.8.4
quay.io/jetstack/cert-manager-cainjector:v1.2.0
quay.io/jetstack/cert-manager-controller:v1.2.0
quay.io/jetstack/cert-manager-webhook:v1.2.0
docker.io/jettech/kube-webhook-certgen:v1.5.1
docker.io/zuul/zuul-web:latest
docker.io/zuul/zuul-scheduler:latest
docker.io/zuul/zuul-executor:latest
docker.io/zuul/zuul-preview:latest
docker.io/zuul/zuul-registry:latest
)
heavy_images=(
docker.io/percona/percona-xtradb-cluster-operator:1.7.0
docker.io/percona/percona-xtradb-cluster-operator:1.7.0-haproxy
docker.io/percona/percona-xtradb-cluster-operator:1.7.0-logcollector
docker.io/percona/percona-xtradb-cluster:8.0.21-12.1
docker.io/library/percona:8.0
quay.io/containers/podman:latest
)
light_images=(
docker.io/library/mariadb:focal
)
for img in "${common_images[@]}"; do
$DOCKER image inspect "${img}" >/dev/null || $DOCKER pull "${img}"
$KIND load docker-image "${img}" &
done
if [[ $HEAVY = "true" ]]; then
for img in "${heavy_images[@]}"; do
$DOCKER image inspect "${img}" >/dev/null || $DOCKER pull "${img}"
$KIND load docker-image "${img}" &
done
else
for img in "${light_images[@]}"; do
$DOCKER image inspect "${img}" >/dev/null || $DOCKER pull "${img}"
$KIND load docker-image "${img}" &
done
fi
$KIND load docker-image docker.io/zuul/zuul-operator:latest
$KUBECTL apply -f ingress.yaml &
echo "Waiting"
wait
echo "Done"