Skip to content

Commit e365ba1

Browse files
committed
tag properly
1 parent 54943ef commit e365ba1

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ TAG := # make sure tag is never injectable as an env var
1515
ifdef CI
1616
ifneq ($(NIGHTLY_TAG),)
1717
TAG := $(NIGHTLY_TAG)
18+
else ifneq ($(RELEASE_TAG),)
19+
TAG := $(RELEASE_TAG)
1820
endif
1921
endif
2022

scripts/ci/lib.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -588,6 +588,8 @@ openshift_ci_mods() {
588588

589589
handle_nightly_runs
590590

591+
handle_release_runs
592+
591593
info "Status after mods:"
592594
"$ROOT/status.sh" || true
593595

@@ -650,6 +652,18 @@ handle_nightly_runs() {
650652
fi
651653
}
652654

655+
handle_release_runs() {
656+
if ! is_OPENSHIFT_CI; then
657+
die "Only for OpenShift CI"
658+
fi
659+
660+
local base_ref
661+
base_ref="$(get_base_ref)"
662+
if is_tagged && [[ "$base_ref" =~ ^release- ]]; then
663+
ci_export RELEASE_TAG "$(git tag --sort=creatordate --contains | tail -1)"
664+
fi
665+
}
666+
653667
store_test_results() {
654668
if [[ "$#" -ne 2 ]]; then
655669
die "missing args. usage: store_test_results <from> <to>"

0 commit comments

Comments
 (0)