File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ DOCKERFILE=${DOCKERFILE:-""}
88IMAGENAMESPACE=${IMAGENAMESPACE:- " openstack-k8s-operators" }
99IMAGEREGISTRY=${IMAGEREGISTRY:- " quay.io" }
1010IMAGEBASE=${IMAGEBASE:- }
11+ IMAGECUSTOMTAG=${IMAGECUSTOMTAG:- }
1112LOCAL_REGISTRY=${LOCAL_REGISTRY:- 0}
1213
1314if [ -n " $DOCKERFILE " ]; then
@@ -26,10 +27,17 @@ for MOD_PATH in $(go list -mod=readonly -m -json all | jq -r '. | select(.Path |
2627
2728 GIT_REPO=${MOD_PATH% " /apis" }
2829 GIT_REPO=${GIT_REPO% " /api" }
29- REF=$( echo $MOD_VERSION | sed -e ' s|v[0-9]*.[0-9]*.[0-9]*-.*[0-9]*-\(.*\)$|\1|' )
30- if [[ " $REF " == v* ]]; then
31- REF=$( git ls-remote https://${GIT_REPO} | grep ${REF} | awk ' NR==1{print $1}' )
30+
31+ # Check if there is a custom tag for IMAGEBASE operator
32+ if [[ -n " $IMAGECUSTOMTAG " && " $BASE " == " $IMAGEBASE " ]]; then
33+ REF=${IMAGECUSTOMTAG}
34+ else
35+ REF=$( echo $MOD_VERSION | sed -e ' s|v[0-9]*.[0-9]*.[0-9]*-.*[0-9]*-\(.*\)$|\1|' )
36+ if [[ " $REF " == v* ]]; then
37+ REF=$( git ls-remote https://${GIT_REPO} | grep ${REF} | awk ' NR==1{print $1}' )
38+ fi
3239 fi
40+
3341 GITHUB_USER=$( echo $MOD_PATH | sed -e ' s|github.com/\(.*\)/.*-operator/.*$|\1|' )
3442 CURL_REGISTRY=" quay.io"
3543 REPO_CURL_URL=" https://${CURL_REGISTRY} /api/v1/repository/openstack-k8s-operators"
You can’t perform that action at this time.
0 commit comments