From: Don Zickus <dzic...@redhat.com>

CI: sync ark-create-release push commands with output

A user can run the ci scripts and either auto push the changes or not.
If the changes are not pushed, a message is printed explaining the steps
needed to properly push the changes.

Over time the real push and the output got out of sync.  Just wrap them
in variables and use eval to execute them.  This should keep things in
sync for a good while.

Also, notice some cruft was modified.  The output did not match the
reality inside the .gitlab-ci.yml file.  And the RELEASE stuff was never
used.

The only things being pushed are: BRANCH(os-build), release tag,
ark-latest, and ark-infra.

No behaviour changes.

Signed-off-by: Don Zickus <dzic...@redhat.com>

diff --git a/redhat/scripts/ci/ark-create-release.sh 
b/redhat/scripts/ci/ark-create-release.sh
index blahblah..blahblah 100755
--- a/redhat/scripts/ci/ark-create-release.sh
+++ b/redhat/scripts/ci/ark-create-release.sh
@@ -37,7 +37,7 @@ if test "$old_head" == "$new_head"; then
 fi
 
 make dist-release-tag
-RELEASE=$(git describe)
+RELEASE=$(git describe) #grab the tag
 git checkout ark-latest
 git reset --hard "$RELEASE"
 
@@ -59,14 +59,16 @@ git add makefile Makefile.rhelver Makefile redhat
 
 git commit -m "bulk merge ark-infra as of $(date)"
 
-printf "All done!
+echo
+test "$TO_PUSH" && PUSH_VERB="Pushing" || PUSH_VERB="To push"
+PUSH_STR="all release artifacts"
+PUSH_CMD="git push gitlab ${BRANCH} && \\
+       git push gitlab \"${RELEASE}\" && \\
+       git push -f gitlab ark-latest && \\
+       git push -f gitlab ark-infra
+"
 
-To push all the release artifacts, run:
-
-git push os-build
-for branch in \$(git branch | grep configs/\"\$(date +%%F)\"); do
-\tgit push -o merge_request.create -o merge_request.target=os-build\
- -o merge_request.remove_source_branch upstream \"\$branch\"
-done
-git push upstream %s%s
-git push -f upstream ark-latest\n" "$RELEASE" "$RELEASE_BRANCHES"
+#Push branch
+echo "# $PUSH_VERB $PUSH_STR"
+echo "$PUSH_CMD"
+test "$TO_PUSH" && eval "$PUSH_CMD"

--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2518
_______________________________________________
kernel mailing list -- kernel@lists.fedoraproject.org
To unsubscribe send an email to kernel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to