-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbootstrap.sh
executable file
·20 lines (17 loc) · 1 KB
/
bootstrap.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#! /bin/bash
set -x
for VERSION in ${OCP_VERSIONS}
do
CONTAINERFILE="Containerfile-rhel-9.in"
if [[ "$VERSION" =~ ("4.12"|"4.13"|"4.14") ]]; then
CONTAINERFILE="Containerfile-rhel-8.in"
fi
opm migrate "registry.redhat.io/redhat/redhat-operator-index:v${VERSION}" "./catalog-migrate-${VERSION}"
mkdir -p "catalog/v${VERSION}/file-integrity-operator"
cp "${CONTAINERFILE}" "catalog/v${VERSION}/Containerfile"
sed -i "s/OCP_VERSION/${VERSION}/g" "catalog/v${VERSION}/Containerfile"
opm alpha convert-template basic -o yaml "./catalog-migrate-${VERSION}/file-integrity-operator/catalog.json" > "catalog/v${VERSION}/catalog-template.yaml"
opm alpha render-template basic -o yaml "catalog/v${VERSION}/catalog-template.yaml" > "catalog/v${VERSION}/file-integrity-operator/catalog.yaml"
echo "Building locally to ensure it works"
podman build -t "fio-fbc-${VERSION}" -f "catalog/v${VERSION}/Containerfile" "catalog/v${VERSION}/" && rm -rf "./catalog-migrate-${VERSION}"
done