Skip to content

Commit 2ac1206

Browse files
aaradhakjlebon
authored andcommitted
jobs/bump-jenkins-plugins: Create PR against fedora-coreos-pipeline main
The `bump-jenkins-plugins` job PR was getting opened against the 'main' branch of 'coreosbot-releng' - fedora-coreos-pipeline. We are making changes to open the PR against the 'main' branch of 'coreos' - fedora-coreos-pipeline.
1 parent ed7396d commit 2ac1206

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

jobs/bump-jenkins-plugins.Jenkinsfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ def getVersionFromPluginUrl(pluginUrl) {
2121
def parts = pluginUrl.split("/")
2222
def pluginVersion
2323
if (parts.size() >= 4) {
24-
def groupId = parts[-3]
2524
pluginVersion = parts[-2]
2625
} else {
2726
error("Unable to extract plugin version from the URL.")
@@ -121,11 +120,12 @@ node {
121120
withCredentials([usernamePassword(credentialsId: botCreds,
122121
usernameVariable: 'GHUSER',
123122
passwordVariable: 'GHTOKEN')]) {
124-
shwrap("""
125-
cd fedora-coreos-pipeline
126-
git push -f https://\${GHUSER}:\${GHTOKEN}@github.com/${fork_repo} main:${pr_branch}
127-
curl -H "Authorization: token ${GHTOKEN}" -X POST -d '{ "title": "${message}", "head": "${pr_branch}", "base": "main" }' https://api.github.com/repos/${fork_repo}/pulls
128-
""")
123+
// Push to the forked repo & create a PR against "coreos: fedora-coreos-pipeline:main" repo
124+
shwrap("""
125+
cd fedora-coreos-pipeline
126+
git push -f https://\${GHUSER}:\${GHTOKEN}@github.com/${fork_repo} main:${pr_branch}
127+
curl -H "Authorization: token ${GHTOKEN}" -X POST -d '{ "title": "${message}", "head": "coreosbot-releng:${pr_branch}", "base": "main" }' https://api.github.com/repos/${repo}/pulls --fail
128+
""")
129129
}
130130
}
131131
}

0 commit comments

Comments
 (0)