From 09a59e04e3056cb60ab1cbe2b703b357add6e4f3 Mon Sep 17 00:00:00 2001 From: davdhacs <105243888+davdhacs@users.noreply.github.com> Date: Fri, 8 Aug 2025 14:43:34 -0600 Subject: [PATCH 1/4] empty commit From 11f7540a7080ec6fe13b70cba7aae0bf47b2d4f7 Mon Sep 17 00:00:00 2001 From: Gavin Jefferies Date: Tue, 26 Jul 2022 01:12:05 +0000 Subject: [PATCH 2/4] a nightly update script --- .openshift-ci/nightlies.sh | 77 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100755 .openshift-ci/nightlies.sh diff --git a/.openshift-ci/nightlies.sh b/.openshift-ci/nightlies.sh new file mode 100755 index 0000000000000..9e97ef25b560d --- /dev/null +++ b/.openshift-ci/nightlies.sh @@ -0,0 +1,77 @@ +#!/usr/bin/env bash + +# The handler for nightly CI defined in: +# https://github.com/openshift/release/tree/master/ci-operator/config/stackrox/stackrox/stackrox-stackrox-nightlies.yaml + +ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")"/.. && pwd)" +source "$ROOT/scripts/ci/lib.sh" + +set -euo pipefail + +main() { + + if is_openshift_CI_rehearse_PR; then + echo "Skipping on openshift/release rehearsal PRs" + exit 0 + fi + + openshift_ci_import_creds + + gitbot(){ + git -c "user.name=RoxBot" -c "user.email=roxbot@stackrox.com" \ + -c "url.https://${GITHUB_TOKEN}:x-oauth-basic@github.com/.insteadOf=https://github.com/" \ + "${@}" + } + + gitbot -C /tmp clone https://github.com/stackrox/stackrox.git + + cd /tmp/stackrox || { + die "Cannot use working clone" + } + + gitbot checkout nightlies || { + die "Could not switch to the nightly branch" + } + + gitbot rebase master || { + die "Could not rebase" + } + + [[ "$(gitbot log --oneline | head -1)" =~ an.empty.commit.for.prow.CI ]] || { + gitbot commit --allow-empty -m 'an empty commit for prow CI' + } + + # Create a fresh commit for prow to notice + + gitbot reset --hard HEAD~1 || { + die "Could not delete the existing empty commit" + } + + gitbot commit --allow-empty -m 'an empty commit for prow CI' || { + die "Could not create an empty commit" + } + + # Tag it + + local nightly_tag + nightly_tag="$(gitbot describe --tags --abbrev=0 --exclude '*-nightly-*')-nightly-$(date '+%Y%m%d')" + + # Allow reruns + (gitbot tag -d "$nightly_tag" && gitbot push --delete origin "$nightly_tag") || true + + gitbot tag "$nightly_tag" || { + die "Could not create the tag: $nightly_tag" + } + + # Push + + gitbot push origin "$nightly_tag" || { + die "Could not push" + } + + gitbot push --force || { + die "Could not push" + } +} + +main "$@" From 5ead769419896ccf0efa74252bd9127b4abf91fc Mon Sep 17 00:00:00 2001 From: davdhacs <105243888+davdhacs@users.noreply.github.com> Date: Fri, 8 Aug 2025 14:50:45 -0600 Subject: [PATCH 3/4] match *.x tags for nightly prefix --- .openshift-ci/nightlies.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.openshift-ci/nightlies.sh b/.openshift-ci/nightlies.sh index 9e97ef25b560d..14a96c3f9e72f 100755 --- a/.openshift-ci/nightlies.sh +++ b/.openshift-ci/nightlies.sh @@ -54,7 +54,7 @@ main() { # Tag it local nightly_tag - nightly_tag="$(gitbot describe --tags --abbrev=0 --exclude '*-nightly-*')-nightly-$(date '+%Y%m%d')" + nightly_tag="$(gitbot describe --match='*.x' --tags --abbrev=0 --exclude '*-nightly-*')-nightly-$(date '+%Y%m%d')" # Allow reruns (gitbot tag -d "$nightly_tag" && gitbot push --delete origin "$nightly_tag") || true From acfdc7a7fe194457f783e7cc7ff82d36e2107bc6 Mon Sep 17 00:00:00 2001 From: RoxBot Date: Mon, 19 Jan 2026 00:35:25 +0000 Subject: [PATCH 4/4] an empty commit for prow CI