Coder Social home page Coder Social logo

Comments (5)

KalleOlaviNiemitalo avatar KalleOlaviNiemitalo commented on June 11, 2024

Maybe it is related to this TODO comment:

private SCM extractFromPipeline(final Job<?, ?> job) {
Collection<? extends SCM> scms = ((SCMTriggerItem) job).getSCMs();
if (!scms.isEmpty()) {
return scms.iterator().next(); // TODO: what should we do if more than one SCM has been used

What type of job do you use in Jenkins? Does the job configuration refer to any repository, or does the repository address come solely as a parameter from the Generic Webhook Trigger plugin?

from github-checks-plugin.

guppy0130 avatar guppy0130 commented on June 11, 2024

What type of job do you use in Jenkins?

It's a pipeline that refers to a Groovy script in Github. The pipeline describes which Groovy script (another pipeline) to execute to actually run the tests and report issues to GitHub Enterprise.

Does the job configuration refer to any repository, or does the repository address come solely as a parameter from the Generic Webhook Trigger plugin?

Comes solely as a parameter from the Generic Webhook Trigger plugin.

from github-checks-plugin.

guppy0130 avatar guppy0130 commented on June 11, 2024

Example stack trace from error:

Jul 26, 2021 4:20:26 PM WARNING io.jenkins.plugins.checks.github.GitHubChecksPublisher publish
Failed Publishing GitHub checks: ChecksDetails{name='Jenkins', detailsURL='null', status=IN_PROGRESS, conclusion=NONE, startedAt=null, completedAt=null, output=null, actions=[]}
java.io.FileNotFoundException: https://git/api/v3/repos/org/repo-1/check-runs
	at org.kohsuke.github.extras.okhttp3.ObsoleteUrlFactory$OkHttpURLConnection.getInputStream(ObsoleteUrlFactory.java:490)
	at org.kohsuke.github.extras.okhttp3.ObsoleteUrlFactory$DelegatingHttpsURLConnection.getInputStream(ObsoleteUrlFactory.java:1204)
	at org.kohsuke.github.GitHubHttpUrlConnectionClient$HttpURLConnectionResponseInfo.bodyStream(GitHubHttpUrlConnectionClient.java:196)
	at org.kohsuke.github.GitHubResponse$ResponseInfo.getBodyAsString(GitHubResponse.java:314)
	at org.kohsuke.github.GitHubResponse.parseBody(GitHubResponse.java:92)
	at org.kohsuke.github.Requester.lambda$fetch$1(Requester.java:76)
	at org.kohsuke.github.GitHubClient.createResponse(GitHubClient.java:455)
	at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:406)
Caused: org.kohsuke.github.GHFileNotFoundException: https://git/api/v3/repos/org/repo-1/check-runs {"message":"No commit found for SHA: 2c6d90904851dcd4fd55d02b9009cc31c34af9e2","documentation_url":"https://docs.github.com/enterprise/3.0/rest/reference/checks#create-a-check-run"}
	at org.kohsuke.github.GitHubClient.interpretApiError(GitHubClient.java:486)
	at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:414)
	at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:358)
	at org.kohsuke.github.Requester.fetch(Requester.java:76)
	at org.kohsuke.github.GHCheckRunBuilder.create(GHCheckRunBuilder.java:153)
	at io.jenkins.plugins.checks.github.GitHubChecksPublisher.publish(GitHubChecksPublisher.java:75)
	at io.jenkins.plugins.checks.status.BuildStatusChecksPublisher.publish(BuildStatusChecksPublisher.java:63)
	at io.jenkins.plugins.checks.status.BuildStatusChecksPublisher.access$000(BuildStatusChecksPublisher.java:42)
	at io.jenkins.plugins.checks.status.BuildStatusChecksPublisher$JobCheckoutListener.lambda$onCheckout$0(BuildStatusChecksPublisher.java:174)
	at java.base/java.util.Optional.ifPresent(Optional.java:183)
	at io.jenkins.plugins.checks.status.BuildStatusChecksPublisher$JobCheckoutListener.onCheckout(BuildStatusChecksPublisher.java:174)
	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:155)
	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:97)
	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:84)
	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)

from github-checks-plugin.

yixi8524 avatar yixi8524 commented on June 11, 2024

Same issue in my pipeline. We use checkout switch git repo before publish the checks.

from github-checks-plugin.

guppy0130 avatar guppy0130 commented on June 11, 2024

closing - resolved with alternate (internal) solution

from github-checks-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.