|
1 | 1 | #!/usr/bin/env bash
|
2 | 2 |
|
| 3 | +set -e |
| 4 | + |
| 5 | +CATALOG_DIR=./test/catalogs |
| 6 | +CATALOG_DOCKER=${CATALOG_DIR}/catalog.Dockerfile |
| 7 | + |
| 8 | +# Given an image and a catalog name |
| 9 | +# This functions builds the image and pushes it to the repository |
| 10 | +function build_and_push() { |
| 11 | + IMG_NAME=$1 |
| 12 | + CATALOG_NAME=$2 |
| 13 | + docker build -t "${IMG_NAME}" -f "${CATALOG_DOCKER}" "${CATALOG_DIR}/${CATALOG_NAME}" |
| 14 | + docker push "${IMG_NAME}" |
| 15 | +} |
| 16 | + |
| 17 | +# olmtest images |
| 18 | + |
3 | 19 | # Busybox Operator Index Image
|
4 |
| -docker build -t quay.io/olmtest/busybox-bundle:1.0.0 ./test/images/busybox-index/busybox/1.0.0 |
5 |
| -docker build -t quay.io/olmtest/busybox-bundle:2.0.0 ./test/images/busybox-index/busybox/2.0.0 |
| 20 | +catalogs=( 1.0.0 2.0.0 ) |
| 21 | +for c in "${catalogs[@]}"; do |
| 22 | + build_and_push "quay.io/olmtest/busybox-dependencies-index:${c}-with-ListBundles-method" "busybox-${c}" |
| 23 | +done |
| 24 | + |
| 25 | +# single bundle index |
| 26 | +catalogs=( pdb-v1 objects objects-upgrade-samename objects-upgrade-diffname ) |
| 27 | +for c in "${catalogs[@]}"; do |
| 28 | + build_and_push "quay.io/olmtest/single-bundle-index:${c}" "single-bundle-index-${c}" |
| 29 | +done |
6 | 30 |
|
7 |
| -docker build -t quay.io/olmtest/busybox-dependency-bundle:1.0.0 ./test/images/busybox-index/busybox-dependency/1.0.0 |
8 |
| -docker build -t quay.io/olmtest/busybox-dependency-bundle:2.0.0 ./test/images/busybox-index/busybox-dependency/2.0.0 |
| 31 | +# catsrc-update-test catalogs |
| 32 | +catalogs=( old new related ) |
| 33 | +for c in "${catalogs[@]}"; do |
| 34 | + build_and_push "quay.io/olmtest/catsrc-update-test:${c}" "catsrc-update-test-${c}" |
| 35 | +done |
9 | 36 |
|
10 |
| -docker push quay.io/olmtest/busybox-bundle:1.0.0 |
11 |
| -docker push quay.io/olmtest/busybox-bundle:2.0.0 |
12 |
| -docker push quay.io/olmtest/busybox-dependency-bundle:1.0.0 |
13 |
| -docker push quay.io/olmtest/busybox-dependency-bundle:2.0.0 |
| 37 | +# operator-framework images |
14 | 38 |
|
15 |
| -opm index add --bundles quay.io/olmtest/busybox-dependency-bundle:1.0.0,quay.io/olmtest/busybox-bundle:1.0.0 --tag quay.io/olmtest/busybox-dependencies-index:1.0.0-with-ListBundles-method -c docker |
16 |
| -docker push quay.io/olmtest/busybox-dependencies-index:1.0.0-with-ListBundles-method |
| 39 | +# ci-index |
| 40 | +build_and_push quay.io/operator-framework/ci-index:latest "ci-index" |
17 | 41 |
|
18 |
| -opm index add --bundles quay.io/olmtest/busybox-dependency-bundle:2.0.0,quay.io/olmtest/busybox-bundle:2.0.0 --tag quay.io/olmtest/busybox-dependencies-index:2.0.0-with-ListBundles-method --from-index quay.io/olmtest/busybox-dependencies-index:1.0.0-with-ListBundles-method -c docker |
19 |
| -docker push quay.io/olmtest/busybox-dependencies-index:2.0.0-with-ListBundles-method |
| 42 | +# webhook-operator-index |
| 43 | +build_and_push quay.io/operator-framework/webhook-operator-index:0.0.3 "webhook-operator-index-0.0.3" |
0 commit comments