How to integrate a webhook of the buildConfig among the different repositories

Solution In Progress - Updated -

Issue

  • You want to trigger your build when different repository is changed.
    • For example, if the Git repo A is changed and trigger a build which is configured with the other Git repo B using webhook.
  • You are failed to build with the following error messages on the jenkinsPipelineStrategy build tasks.
ERROR: Checkout failed
hudson.plugins.git.GitException: Command "git rev-parse XXX...XXX^{commit}" returned status code 128:
stdout: XXX...XXX^{commit}

stderr: fatal: ambiguous argument 'XXX...XXX^{commit}': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2016)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1984)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1980)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1612)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1624)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.revParse(CliGitAPIImpl.java:809)
    at hudson.plugins.git.GitAPI.revParse(GitAPI.java:316)
    at hudson.plugins.git.RevisionParameterAction.toRevision(RevisionParameterAction.java:98)
    at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:1076)
    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1193)
    at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:120)
    at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:149)
    at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:67)
    at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:292)
    at hudson.model.ResourceController.execute(ResourceController.java:97)
    at hudson.model.Executor.run(Executor.java:427)
ERROR: Maximum checkout retry attempts reached, aborting
Finished: FAILURE

Environment

  • OpenShift Container Platform
    • 3.11

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content