Skip to content

Commit 9e18e9d

Browse files
committed
Make script input vars mandatory
Make MAIN_VERSION, FEATURE_RELEASE_VERSION, and FEATURE_RELEASE_BRANCH mandatory. When run via the job, those vars get set in the workflow [1]. Lets make them mandatory, instead of bumping them in the workflow and the script on a new feature branch. If run manually they should be set. [1] https://github.com/openstack-k8s-operators/openstack-operator/blob/5f8fbc7cd3b79a363d9fc2016e6e3c5b239b4d5a/.github/workflows/catalog-openstack-operator-upgrades.yaml#L68 Jira: OSPRH-18397 Signed-off-by: Martin Schuppert <mschuppert@redhat.com>
1 parent 5f8fbc7 commit 9e18e9d

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

hack/catalog-build-olm-upgrade.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ echo $URL | sed -e "s|:.*|@$DIGEST|"
1010

1111
}
1212

13-
MAIN_VERSION=${MAIN_VERSION:-"0.4.0"}
14-
FEATURE_RELEASE_VERSION=${FEATURE_RELEASE_VERSION:-"0.3.0"}
15-
FEATURE_RELEASE_BRANCH=${FEATURE_RELEASE_BRANCH:-"18.0-fr3"}
13+
# These variables are mandatory. The script will exit if they are not set.
14+
MAIN_VERSION=${MAIN_VERSION:?"Error: MAIN_VERSION must be set."}
15+
FEATURE_RELEASE_VERSION=${FEATURE_RELEASE_VERSION:?"Error: FEATURE_RELEASE_VERSION must be set."}
16+
FEATURE_RELEASE_BRANCH=${FEATURE_RELEASE_BRANCH:?"Error: FEATURE_RELEASE_BRANCH must be set."}
17+
1618
BUNDLE=${BUNDLE:-"quay.io/openstack-k8s-operators/openstack-operator-bundle:latest"}
1719

1820
[ -d "catalog" ] && rm -Rf catalog

0 commit comments

Comments
 (0)