[OS-BUILD PATCH] Fix Fedora release scheduled job

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Don Zickus <dzickus@xxxxxxxxxx>

Fix Fedora release scheduled job

Current scheduled job for release Fedora kernels passes but skips over
including labeled MRs with 'Include in Releases' because of

No connection adapters were found for 'git@xxxxxxxxxx:cki-project/kernel-ark.git/api/v4/user'

When cleaning up the ci scripts, commit 376f5f93f3619b added a
ark-ci-env.sh to source for ark-create-release.sh.  This script added
some generic functions and exports for other ci scripts to use.

One of the added exports was GITLAB_URL which is used by the python
gitlab cli to control the destination of the remote request.  That url
was git@xxxxxxxxxx:cki-project/kernel-ark.git, which doesn't have a
acceptable connector for python-requests like 'https://'.

GITLAB_URL is more for verifying the right infrastructure is defined.
So tweak the scripts to set https:// for GITLAB_URL and use the ssh
method for GITLAB_PUSHURL.  Then update the checks to verify they exist
before running the script.

Signed-off-by: Don Zickus <dzickus@xxxxxxxxxx>

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index blahblah..blahblah 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -243,7 +243,8 @@ eln_64k_debug_baseline:
     - chmod 700 ~/.ssh
     - echo "$GITLAB_KNOWN_HOSTS" >> ~/.ssh/known_hosts
     - chmod 644 ~/.ssh/known_hosts
-    - git remote add gitlab git@xxxxxxxxxx:cki-project/kernel-ark.git
+    - git remote add gitlab https://gitlab.com/cki-project/kernel-ark.git
+    - git remote set-url --push gitlab git@xxxxxxxxxx:cki-project/kernel-ark.git
     - gpg2 --import "$TORVALDS_GPG_KEY"
     - git checkout --track origin/master && git describe
     - git checkout --track origin/os-build && git describe
diff --git a/redhat/scripts/ci/ark-ci-env.sh b/redhat/scripts/ci/ark-ci-env.sh
index blahblah..blahblah 100644
--- a/redhat/scripts/ci/ark-ci-env.sh
+++ b/redhat/scripts/ci/ark-ci-env.sh
@@ -8,8 +8,13 @@ die()
 
 ci_pre_check()
 {
-	if test -n "${TO_PUSH}" && test -z "${GITLAB_URL}"; then
-                die "Please run 'git remote add gitlab <url>' to enable git-push."
+	if test -n "${TO_PUSH}"; then
+		if test -z "${GITLAB_URL}" || test -z "$GITLAB_PUSHURL"; then
+	                echo "To enable git-push, please run:"
+			echo "git remote add gitlab <url>"
+			echo "git remote set-url --push gitlab <pushurl>"
+			die "Misconfigured 'gitlab' entry for git"
+		fi
         fi
         git diff-index --quiet HEAD || die "Dirty tree, please clean before merging."
 }
@@ -20,6 +25,7 @@ BRANCH=${2:-"os-build"}
 PROJECT_ID=${PROJECT_ID:-"13604247"}
 TO_PUSH=${DIST_PUSH:-""}
 GITLAB_URL="$(git remote get-url gitlab 2>/dev/null)"
+GITLAB_PUSHURL="$(git config --get remote.gitlab.pushurl 2>/dev/null)"
 
 ci_pre_check
 
@@ -28,3 +34,4 @@ export BRANCH
 export PROJECT_ID
 export TO_PUSH
 export GITLAB_URL
+export GITLAB_PUSHURL

--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2708
_______________________________________________
kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx
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@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [USB]     [Asterisk PBX]

  Powered by Linux