[JIRA] (JENKINS-60437) Manually setting git commit status sets it for two contexts

16 views
Skip to first unread message

quilicicf@gmail.com (JIRA)

unread,
Dec 11, 2019, 5:15:03 AM12/11/19
to jenkinsc...@googlegroups.com
Cyprien Quilici created an issue
 
Jenkins / Bug JENKINS-60437
Manually setting git commit status sets it for two contexts
Issue Type: Bug Bug
Assignee: Mark Waite
Components: git-plugin
Created: 2019-12-11 10:14
Environment: Jenkins: 2.190.1
Git plugin: 4.0.0
Priority: Minor Minor
Reporter: Cyprien Quilici

I'm trying to create two different jobs, the build job and E2E tests job. 

 

I'd like the two jobs to annotate the git commit with their results and the results not to get mixed up. 

 

On  the build job, I didn't change any configuration and the git plugin does its magic in the background as expected. 

 

In my E2E Jenkinsfile, I'm setting the git commit status manually as lots of guys on the internet suggest, with a method:

 

void setBuildStatus (String message, JobResult jobResult, def repoName)

{   step([      $class : "GitHubCommitStatusSetter",      reposSource : [$class: "ManuallyEnteredRepositorySource", url: "https://github.com/Talend/$repoName"],      contextSource : [$class: "ManuallyEnteredCommitContextSource", context: "E2E tests"],      errorHandlers : [[$class: "ChangingBuildStatusErrorHandler", result: JobResult.UNSTABLE.name()]],       statusResultSource: [$class: "ConditionalStatusResultSource", results:       [[$class: "AnyBuildResult", message: message, state: jobResult.name()]]     ]   ]) }

 

Which is used at startup, in post > success and post > failure.

 

When only the build job runs, the git commit is marked with continuous-integration/jenkins/branch, the details link points to my build job, this is as intended.

 

When the E2E tests run though, the commit gets marked with E2E tests (good) but the continuous-integration/jenkins/branch ** gets overwritten by the result of the E2E tests job and that's not intended. Both details link now point to the E2E job.

The details links both point to the E2E tests job which is unexpected.

The logs from my E2E job: 

 
[Set GitHub commit status (universal)] FAILURE on repos [GHRepository@431ca6e9[description=XXXXXXX,homepage=,name=tat-client,fork=false,archived=false,size=47243,milestones={},language=Java,commits={},source=<null>,parent=<null>,responseHeaderFields={null=[HTTP/1.1 200 OK], Access-Control-Allow-Origin=[*], Access-Control-Expose-Headers=[ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type], Cache-Control=[private, max-age=60, s-maxage=60], Content-Encoding=[gzip], Content-Security-Policy=[default-src 'none'], Content-Type=[application/json; charset=utf-8], Date=[Wed, 11 Dec 2019 09:35:58 GMT], ETag=[W/"fd8af705e8350025323a01b7c75547f8"], Last-Modified=[Fri, 06 Dec 2019 10:37:49 GMT], OkHttp-Received-Millis=[1576056958700], OkHttp-Response-Source=[CONDITIONAL_CACHE 200], OkHttp-Selected-Protocol=[http/1.1], OkHttp-Sent-Millis=[1576056958550], Referrer-Policy=[origin-when-cross-origin, strict-origin-when-cross-origin], Server=[GitHub.com], Status=[200 OK], Strict-Transport-Security=[max-age=31536000; includeSubdomains; preload], Transfer-Encoding=[chunked], Vary=[Accept, Authorization, Cookie, X-GitHub-OTP], X-Accepted-OAuth-Scopes=[repo], X-Content-Type-Options=[nosniff], X-Frame-Options=[deny], X-GitHub-Media-Type=[github.v3; format=json], X-GitHub-Request-Id=[E2E6:3173:1490F4B:3584BD1:5DF0B87E], X-OAuth-Scopes=[admin:repo_hook, read:discussion, read:org, repo], X-RateLimit-Limit=[5000], X-RateLimit-Remaining=[4996], X-RateLimit-Reset=[1576060432], X-XSS-Protection=[1; mode=block]},url=https://api.github.com/repos/myOrg/myRepo,id=126450515]] (sha:9a0d406) with context:E2E tests
Setting commit status on GitHub for https://github.com/myOrg/myRepo/commit/9a0d40654fdc3c51d008ef5d226c7e976f960bbb

It looks like the automatic commit status setter is triggered and I don't know nor can find how to deactivate it. 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

quilicicf@gmail.com (JIRA)

unread,
Dec 11, 2019, 12:38:03 PM12/11/19
to jenkinsc...@googlegroups.com
Cyprien Quilici updated an issue
Change By: Cyprien Quilici
I'm trying to create two different jobs, the build job and E2E tests job. 

 

I'd like the two jobs to annotate the git commit with their results and the results not to get mixed up. 

 

On  the build job, I didn't change any configuration and the git plugin does its magic in the background as expected. 

 

In my E2E Jenkinsfile, I'm setting the git commit status manually as lots of guys on the internet suggest, with a method:

 

void setBuildStatus (String message, JobResult jobResult, def repoName) {
  step([
      $class : "GitHubCommitStatusSetter",
      reposSource : [$class: "ManuallyEnteredRepositorySource", url: "https://github.com/Talend/$repoName"],
      contextSource : [$class: "ManuallyEnteredCommitContextSource", context: "E2E tests"],
      errorHandlers : [[$class: "ChangingBuildStatusErrorHandler", result: JobResult.UNSTABLE.name()]],
      statusResultSource: [$class: "ConditionalStatusResultSource", results:
      [[$class: "AnyBuildResult", message: message, state: jobResult.name()]]
    ]
  ])
}

 

Which is used at startup, in post > success and post > failure.

 

When only the build job runs, the git commit is marked with *continuous-integration/jenkins/branch,* the _details_ link points to my build job, this is as intended.

 

When the E2E tests run though, the commit gets marked with *E2E tests* (good) but the *continuous-integration/jenkins/branch* ** gets overwritten by the result of the E2E tests job and that's not intended. Both _details_ link now point to the E2E job.


The details links both point to the E2E tests job which is unexpected.

The logs from my E2E job: 

 
[Set GitHub commit status (universal)] FAILURE on repos [GHRepository@431ca6e9[description=XXXXXXX,homepage=,name=tat-client,fork=false,archived=false,size=47243,milestones={},language=Java,commits={},source=<null>,parent=<null>,responseHeaderFields= \ {null=[HTTP/1.1 200 OK], Access-Control-Allow-Origin=[*], Access-Control-Expose-Headers=[ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type], Cache-Control=[private, max-age=60, s-maxage=60], Content-Encoding=[gzip], Content-Security-Policy=[default-src 'none'], Content-Type=[application/json; charset=utf-8], Date=[Wed, 11 Dec 2019 09:35:58 GMT], ETag=[W/"fd8af705e8350025323a01b7c75547f8"], Last-Modified=[Fri, 06 Dec 2019 10:37:49 GMT], OkHttp-Received-Millis=[1576056958700], OkHttp-Response-Source=[CONDITIONAL_CACHE 200], OkHttp-Selected-Protocol=[http/1.1], OkHttp-Sent-Millis=[1576056958550], Referrer-Policy=[origin-when-cross-origin, strict-origin-when-cross-origin], Server=[GitHub.com], Status=[200 OK], Strict-Transport-Security=[max-age=31536000; includeSubdomains; preload], Transfer-Encoding=[chunked], Vary=[Accept, Authorization, Cookie, X-GitHub-OTP], X-Accepted-OAuth-Scopes=[repo], X-Content-Type-Options=[nosniff], X-Frame-Options=[deny], X-GitHub-Media-Type=[github.v3; format=json], X-GitHub-Request-Id=[E2E6:3173:1490F4B:3584BD1:5DF0B87E], X-OAuth-Scopes=[admin:repo_hook, read:discussion, read:org, repo], X-RateLimit-Limit=[5000], X-RateLimit-Remaining=[4996], X-RateLimit-Reset=[1576060432], X-XSS-Protection=[1; mode=block]},url=[https://api.github.com/repos/myOrg/myRepo,id=126450515|https://api.github.com/repos/Talend/tat-client,id=126450515]]] (sha:9a0d406) with context:E2E tests
Setting commit status on GitHub for [https://github.com/myOrg/myRepo/commit/9a0d40654fdc3c51d008ef5d226c7e976f960bbb|https://github.com/Talend/tat-client/commit/9a0d40654fdc3c51d008ef5d226c7e976f960bbb]


It looks like the automatic commit status setter is triggered and I don't know nor can find how to deactivate it. 

quilicicf@gmail.com (JIRA)

unread,
Dec 11, 2019, 12:39:02 PM12/11/19
to jenkinsc...@googlegroups.com
Cyprien Quilici updated an issue
I'm trying to create two different jobs, the build job and E2E tests job. 


I'd like the two jobs to annotate the git commit with their results and the results not to get mixed up. 


On  the build job, I didn't change any configuration and the git plugin does its magic in the background as expected. 


In my E2E Jenkinsfile, I'm setting the git commit status manually as lots of guys on the internet suggest, with a method:

{code}
void setBuildStatus (String message, JobResult jobResult, def repoName) {
  step([
    $class : "GitHubCommitStatusSetter",
      reposSource : [$class: "ManuallyEnteredRepositorySource", url: "https://github.com/Talend/$repoName"],
      contextSource : [$class: "ManuallyEnteredCommitContextSource", context: "E2E tests"],
      errorHandlers : [[$class: "ChangingBuildStatusErrorHandler", result: JobResult.UNSTABLE.name()]],
        statusResultSource: [$class: "ConditionalStatusResultSource", results:
          [[$class: "AnyBuildResult", message: message, state: jobResult.name()]]
    ]
  ])
}
{code}

Which is used at startup, in post > success and post > failure.

When only the build job runs, the git commit is marked with *continuous-integration/jenkins/branch,* the _details_ link points to my build job, this is as intended.

When the E2E tests run though, the commit gets marked with *E2E tests* (good) but the *continuous-integration/jenkins/branch* ** gets overwritten by the result of the E2E tests job and that's not intended. Both _details_ link now point to the E2E job.

The details links both point to the E2E tests job which is unexpected.

The logs from my E2E job: 

  {code}
[Set GitHub commit status (universal)] FAILURE on repos [GHRepository@431ca6e9[description=XXXXXXX,homepage=,name=tat-client,fork=false,archived=false,size=47243,milestones={},language=Java,commits={},source=<null>,parent=<null>,responseHeaderFields={null=[HTTP/1.1 200 OK], Access-Control-Allow-Origin=[*], Access-Control-Expose-Headers=[ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type], Cache-Control=[private, max-age=60, s-maxage=60], Content-Encoding=[gzip], Content-Security-Policy=[default-src 'none'], Content-Type=[application/json; charset=utf-8], Date=[Wed, 11 Dec 2019 09:35:58 GMT], ETag=[W/"fd8af705e8350025323a01b7c75547f8"], Last-Modified=[Fri, 06 Dec 2019 10:37:49 GMT], OkHttp-Received-Millis=[1576056958700], OkHttp-Response-Source=[CONDITIONAL_CACHE 200], OkHttp-Selected-Protocol=[http/1.1], OkHttp-Sent-Millis=[1576056958550], Referrer-Policy=[origin-when-cross-origin, strict-origin-when-cross-origin], Server=[GitHub.com], Status=[200 OK], Strict-Transport-Security=[max-age=31536000; includeSubdomains; preload], Transfer-Encoding=[chunked], Vary=[Accept, Authorization, Cookie, X-GitHub-OTP], X-Accepted-OAuth-Scopes=[repo], X-Content-Type-Options=[nosniff], X-Frame-Options=[deny], X-GitHub-Media-Type=[github.v3; format=json], X-GitHub-Request-Id=[E2E6:3173:1490F4B:3584BD1:5DF0B87E], X-OAuth-Scopes=[admin:repo_hook, read:discussion, read:org, repo], X-RateLimit-Limit=[5000], X-RateLimit-Remaining=[4996], X-RateLimit-Reset=[1576060432], X-XSS-Protection=[1; mode=block]},url=[https://api.github.com/repos/myOrg/myRepo,id=126450515|https://api.github.com/repos/Talend/tat-client,id=126450515]]] (sha:9a0d406) with context:E2E tests
Setting commit status on GitHub for [https://github.com/myOrg/myRepo/commit/9a0d40654fdc3c51d008ef5d226c7e976f960bbb|https://github.com/Talend/tat-client/commit/9a0d40654fdc3c51d008ef5d226c7e976f960bbb]
{code}

It looks like the automatic commit status setter is triggered and I don't know nor can find how to deactivate it. 

quilicicf@gmail.com (JIRA)

unread,
Dec 11, 2019, 12:39:03 PM12/11/19
to jenkinsc...@googlegroups.com
Cyprien Quilici updated an issue
I'm trying to create two different jobs, the build job and E2E tests job. 

I'd like the two jobs to annotate the git commit with their results and the results not to get mixed up. 

On  the build job, I didn't change any configuration and the git plugin does its magic in the background as expected. 

In my E2E Jenkinsfile, I'm setting the git commit status manually as lots of guys on the internet suggest, with a method:
{code:java}

void setBuildStatus (String message, JobResult jobResult, def repoName) {
  step([
    $class : "GitHubCommitStatusSetter",
      reposSource : [$class: "ManuallyEnteredRepositorySource", url: "https://github.com/myOrg/myRepo"],

      contextSource : [$class: "ManuallyEnteredCommitContextSource", context: "E2E tests"],
      errorHandlers : [[$class: "ChangingBuildStatusErrorHandler", result: JobResult.UNSTABLE.name()]],
        statusResultSource: [$class: "ConditionalStatusResultSource", results:
          [[$class: "AnyBuildResult", message: message, state: jobResult.name()]]
    ]
  ])
}
{code}
Which is used at startup, in post > success and post > failure.

When only the build job runs, the git commit is marked with *continuous-integration/jenkins/branch,* the _details_ link points to my build job, this is as intended.

When the E2E tests run though, the commit gets marked with *E2E tests* (good) but the *continuous-integration/jenkins/branch* ** gets overwritten by the result of the E2E tests job and that's not intended. Both _details_ link now point to the E2E job.

The details links both point to the E2E tests job which is unexpected.

The logs from my E2E job: 

 
{code:java}
[Set GitHub commit status (universal)] FAILURE on repos [GHRepository@431ca6e9[description=XXXXXXX,homepage=,name=tat-client,fork=false,archived=false,size=47243,milestones={},language=Java,commits={},source=<null>,parent=<null>,responseHeaderFields={null=[HTTP/1.1 200 OK], Access-Control-Allow-Origin=[*], Access-Control-Expose-Headers=[ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type], Cache-Control=[private, max-age=60, s-maxage=60], Content-Encoding=[gzip], Content-Security-Policy=[default-src 'none'], Content-Type=[application/json; charset=utf-8], Date=[Wed, 11 Dec 2019 09:35:58 GMT], ETag=[W/"fd8af705e8350025323a01b7c75547f8"], Last-Modified=[Fri, 06 Dec 2019 10:37:49 GMT], OkHttp-Received-Millis=[1576056958700], OkHttp-Response-Source=[CONDITIONAL_CACHE 200], OkHttp-Selected-Protocol=[http/1.1], OkHttp-Sent-Millis=[1576056958550], Referrer-Policy=[origin-when-cross-origin, strict-origin-when-cross-origin], Server=[GitHub.com], Status=[200 OK], Strict-Transport-Security=[max-age=31536000; includeSubdomains; preload], Transfer-Encoding=[chunked], Vary=[Accept, Authorization, Cookie, X-GitHub-OTP], X-Accepted-OAuth-Scopes=[repo], X-Content-Type-Options=[nosniff], X-Frame-Options=[deny], X-GitHub-Media-Type=[github.v3; format=json], X-GitHub-Request-Id=[E2E6:3173:1490F4B:3584BD1:5DF0B87E], X-OAuth-Scopes=[admin:repo_hook, read:discussion, read:org, repo], X-RateLimit-Limit=[5000], X-RateLimit-Remaining=[4996], X-RateLimit-Reset=[1576060432], X-XSS-Protection=[1; mode=block]},url=[https://api.github.com/repos/myOrg/myRepo,id=126450515|https://api.github.com/repos/
Talend myOrg / tat-client myRepo ,id=126450515]]] (sha:9a0d406) with context:E2E tests
Setting commit status on GitHub for [https://github.com/myOrg/myRepo/commit/9a0d40654fdc3c51d008ef5d226c7e976f960bbb|https://github.com/
Talend myOrg / tat-client myRepo /commit/9a0d40654fdc3c51d008ef5d226c7e976f960bbb]

{code}
It looks like the automatic commit status setter is triggered and I don't know nor can find how to deactivate it. 

quilicicf@gmail.com (JIRA)

unread,
Dec 11, 2019, 12:39:04 PM12/11/19
to jenkinsc...@googlegroups.com
Cyprien Quilici updated an issue
I'm trying to create two different jobs, the build job and E2E tests job. 


I'd like the two jobs to annotate the git commit with their results and the results not to get mixed up. 


On  the build job, I didn't change any configuration and the git plugin does its magic in the background as expected. 


In my E2E Jenkinsfile, I'm setting the git commit status manually as lots of guys on the internet suggest, with a method:

{code :java
}

void setBuildStatus (String message, JobResult jobResult, def repoName) {
  step([
    $class : "GitHubCommitStatusSetter",
      reposSource : [$class: "ManuallyEnteredRepositorySource", url: "https://github.com/ Talend myOrg / $repoName myRepo "],

      contextSource : [$class: "ManuallyEnteredCommitContextSource", context: "E2E tests"],
      errorHandlers : [[$class: "ChangingBuildStatusErrorHandler", result: JobResult.UNSTABLE.name()]],
        statusResultSource: [$class: "ConditionalStatusResultSource", results:
          [[$class: "AnyBuildResult", message: message, state: jobResult.name()]]
    ]
  ])
}
{code}

Which is used at startup, in post > success and post > failure.

When only the build job runs, the git commit is marked with *continuous-integration/jenkins/branch,* the _details_ link points to my build job, this is as intended.

When the E2E tests run though, the commit gets marked with *E2E tests* (good) but the *continuous-integration/jenkins/branch* ** gets overwritten by the result of the E2E tests job and that's not intended. Both _details_ link now point to the E2E job.

The details links both point to the E2E tests job which is unexpected.

The logs from my E2E job: 

 

{code :java
}
[Set GitHub commit status (universal)] FAILURE on repos [GHRepository@431ca6e9[description=XXXXXXX,homepage=,name=tat-client,fork=false,archived=false,size=47243,milestones={},language=Java,commits={},source=<null>,parent=<null>,responseHeaderFields={null=[HTTP/1.1 200 OK], Access-Control-Allow-Origin=[*], Access-Control-Expose-Headers=[ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type], Cache-Control=[private, max-age=60, s-maxage=60], Content-Encoding=[gzip], Content-Security-Policy=[default-src 'none'], Content-Type=[application/json; charset=utf-8], Date=[Wed, 11 Dec 2019 09:35:58 GMT], ETag=[W/"fd8af705e8350025323a01b7c75547f8"], Last-Modified=[Fri, 06 Dec 2019 10:37:49 GMT], OkHttp-Received-Millis=[1576056958700], OkHttp-Response-Source=[CONDITIONAL_CACHE 200], OkHttp-Selected-Protocol=[http/1.1], OkHttp-Sent-Millis=[1576056958550], Referrer-Policy=[origin-when-cross-origin, strict-origin-when-cross-origin], Server=[GitHub.com], Status=[200 OK], Strict-Transport-Security=[max-age=31536000; includeSubdomains; preload], Transfer-Encoding=[chunked], Vary=[Accept, Authorization, Cookie, X-GitHub-OTP], X-Accepted-OAuth-Scopes=[repo], X-Content-Type-Options=[nosniff], X-Frame-Options=[deny], X-GitHub-Media-Type=[github.v3; format=json], X-GitHub-Request-Id=[E2E6:3173:1490F4B:3584BD1:5DF0B87E], X-OAuth-Scopes=[admin:repo_hook, read:discussion, read:org, repo], X-RateLimit-Limit=[5000], X-RateLimit-Remaining=[4996], X-RateLimit-Reset=[1576060432], X-XSS-Protection=[1; mode=block]},url=[https://api.github.com/repos/myOrg/myRepo,id=126450515|https://api.github.com/repos/Talend/tat-client,id=126450515]]] (sha:9a0d406) with context:E2E tests
Setting commit status on GitHub for [https://github.com/myOrg/myRepo/commit/9a0d40654fdc3c51d008ef5d226c7e976f960bbb|https://github.com/Talend/tat-client/commit/9a0d40654fdc3c51d008ef5d226c7e976f960bbb]
{code}

It looks like the automatic commit status setter is triggered and I don't know nor can find how to deactivate it. 

mark.earl.waite@gmail.com (JIRA)

unread,
Dec 11, 2019, 1:06:03 PM12/11/19
to jenkinsc...@googlegroups.com
Mark Waite commented on Bug JENKINS-60437
 
Re: Manually setting git commit status sets it for two contexts

This needs to be assigned to the plugin that provides the GitHub notifier. It is not the fit plugin

quilicicf@gmail.com (JIRA)

unread,
Dec 12, 2019, 4:25:02 AM12/12/19
to jenkinsc...@googlegroups.com
Cyprien Quilici updated an issue
Change By: Cyprien Quilici
Component/s: github-api-plugin
Component/s: git-plugin

quilicicf@gmail.com (JIRA)

unread,
Dec 12, 2019, 4:28:02 AM12/12/19
to jenkinsc...@googlegroups.com
Cyprien Quilici commented on Bug JENKINS-60437
 
Re: Manually setting git commit status sets it for two contexts

It looks like it comes from the github-plugin although I can't find it in my plugins so it must come as a dependency to another plugin but I'm at a loss here  

quilicicf@gmail.com (JIRA)

unread,
Dec 12, 2019, 4:43:02 AM12/12/19
to jenkinsc...@googlegroups.com

mark.earl.waite@gmail.com (JIRA)

unread,
Dec 12, 2019, 5:37:02 AM12/12/19
to jenkinsc...@googlegroups.com
Mark Waite assigned an issue to Unassigned
 
Change By: Mark Waite
Assignee: Mark Waite
Reply all
Reply to author
Forward
0 new messages