Closed atharvai closed 4 years ago
here's obfuscated config
{
"plugin_configuration": {
"id": "github.pr",
"version": "1.3.5"
},
"configuration": [
{
"key": "url",
"value": "git@github.com:myrepo.git"
},
{
"key": "defaultBranch",
"value": "master"
}
],
"name": "myrepo",
"type": "plugin"
Default branch is only used for the initial run of the pipeline. Then on, the plugin would only recognise PR commits and build them. This is not a replacement for regular build pipeline. You're expected to have a regular build pipeline that builds the master or the primary branch in your repo.
interesting. I wasn't aware of needing a separate pipeline. From a git perspective, master
is just another branch. I could have called it anything else.
Are you open to enabling primary branch builds via this plugin?
If the default branch is set to master
, any PR merge commits will appear in GoCD to be triggered. so the PR "merge" commits could be executed as long as the very first trigger is based on primary branch.
Secondly, is there a way to clear the cache for the branch and start fresh for a given repository?
So the gihub.pr doesn't build a given branch, it only builds open PRs that is by design.
Secondly, is there a way to clear the cache for the branch and start fresh for a given repository? I'm not sure I understand what you're asking there. Can you please explain it a bit more to me?
I was trying this on an existing repository and pipeline so I created a branch github_pr
and first triggered pipeline benchmarked the commit from this branch. After I merged to master, no new PRs were detected unless they were branched from github_pr
.
just to close off, the first time you create the material, set the default branch to master/main correctly. otherwise next time it will not work.
I have the following scenario:
git
material type with branchgithub_pr
branchgithub_pr
branch to be pluggable scm (this github.pr plugin) for JSON plugingithub_pr
branch. notice GoCD and plugin recognises new commits. all good.github_pr
branch instead ofmaster
branch.Question: Is there a way to clear cache for github scm type and repo? is there a way for the plugin to recognise different branch?