Skip to content

Commit 5348407

Browse files
committed
Add build index script
Add a script that can be used to quickly build index containing test operator. The script pushes the index to quay.io by default. Example of useage: USER=quayio-nick TAG=xyz ./hack/build_index.sh
1 parent 44530f9 commit 5348407

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

hack/build_index.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash
2+
#
3+
# This command builds test-operator index and pushes it to quay.io. Podman
4+
# should be authenticated against quay.io prior to the execution of this
5+
# command.
6+
#
7+
# USER=quay-nickname TAG=xyz ./hack/build_index.sh
8+
#
9+
10+
set -x
11+
12+
USER=${USER:-$USERNAME}
13+
REGISTRY=${REGISTRY:-quay.io}
14+
IMAGE_NAME=${IMAGE_NAME:-test-operator}
15+
BUNDLE_IMAGE_NAME=${BUNDLE_IMAGE_NAME:-test-operator-bundle}
16+
INDEX_IMAGE_NAME=${INDEX_IMAGE_NAME:-test-operator-index}
17+
TAG=${TAG:-latest}
18+
19+
make docker-build IMG=${REGISTRY}/${USER}/${IMAGE_NAME}:${TAG}
20+
make docker-push IMG=${REGISTRY}/${USER}/${IMAGE_NAME}:${TAG}
21+
22+
make bundle IMG=${REGISTRY}/${USER}/${IMAGE_NAME}:${TAG}
23+
make bundle-build BUNDLE_IMG=${REGISTRY}/${USER}/${BUNDLE_IMAGE_NAME}:${TAG}
24+
make bundle-push BUNDLE_IMG=${REGISTRY}/${USER}/${BUNDLE_IMAGE_NAME}:${TAG}
25+
26+
export BUNDLE_IMG=${REGISTRY}/${USER}/${BUNDLE_IMAGE_NAME}:${TAG}
27+
make catalog-build CATALOG_IMG=${REGISTRY}/${USER}/${INDEX_IMAGE_NAME}:${TAG}
28+
make catalog-push CATALOG_IMG=${REGISTRY}/${USER}/${INDEX_IMAGE_NAME}:${TAG}

0 commit comments

Comments
 (0)