jenkinsci / checks-api-plugin

Jenkins plugin that defines an API for Jenkins to publish checks to SCM platforms.
https://plugins.jenkins.io/checks-api/
MIT License
42 stars 28 forks source link

Setting Status checks name does not change it from the default Jenkins #232

Closed julmarqu closed 12 months ago

julmarqu commented 1 year ago

Jenkins and plugins versions report

Environment ```text Jenkins: 2.401.3 OS: Linux - 5.10.178-162.673.amzn2.x86_64 Java: 11.0.19 - Eclipse Adoptium (OpenJDK 64-Bit Server VM) --- ace-editor:1.1 antisamy-markup-formatter:162.v0e6ec0fcfcf6 apache-httpcomponents-client-4-api:4.5.14-208.v438351942757 apache-httpcomponents-client-5-api:5.2.1-1.0 authentication-tokens:1.53.v1c90fd9191a_b_ aws-credentials:218.v1b_e9466ec5da_ aws-java-sdk:1.12.529-406.vdeff15e5817d aws-java-sdk-cloudformation:1.12.529-406.vdeff15e5817d aws-java-sdk-codebuild:1.12.529-406.vdeff15e5817d aws-java-sdk-ec2:1.12.529-406.vdeff15e5817d aws-java-sdk-ecr:1.12.529-406.vdeff15e5817d aws-java-sdk-ecs:1.12.529-406.vdeff15e5817d aws-java-sdk-efs:1.12.529-406.vdeff15e5817d aws-java-sdk-elasticbeanstalk:1.12.529-406.vdeff15e5817d aws-java-sdk-iam:1.12.529-406.vdeff15e5817d aws-java-sdk-kinesis:1.12.529-406.vdeff15e5817d aws-java-sdk-logs:1.12.529-406.vdeff15e5817d aws-java-sdk-minimal:1.12.529-406.vdeff15e5817d aws-java-sdk-secretsmanager:1.12.529-406.vdeff15e5817d aws-java-sdk-sns:1.12.529-406.vdeff15e5817d aws-java-sdk-sqs:1.12.529-406.vdeff15e5817d aws-java-sdk-ssm:1.12.529-406.vdeff15e5817d basic-branch-build-strategies:81.v05e333931c7d bootstrap5-api:5.3.0-1 bouncycastle-api:2.29 branch-api:2.1122.v09cb_8ea_8a_724 build-timeout:1.31 caffeine-api:3.1.8-133.v17b_1ff2e0599 cdaas-agent-scaler:1.8.3 checks-api:2.0.0 cisco-spark-notifier:1.1.1 cloudbees-folder:6.848.ve3b_fd7839a_81 command-launcher:107.v773860566e2e commons-lang3-api:3.13.0-62.v7d18e55f51e2 commons-text-api:1.10.0-68.v0d0b_c439292b_ config-file-provider:953.v0432a_802e4d2 copyartifact:722.v0662a_9b_e22a_c credentials:1271.v54b_1c2c6388a_ credentials-binding:631.v861c06d062b_4 data-tables-api:1.13.5-1 datadog:5.5.0 display-url-api:2.3.9 docker-commons:439.va_3cb_0a_6a_fb_29 docker-java-api:3.3.1-79.v20b_53427e041 docker-workflow:572.v950f58993843 durable-task:523.va_a_22cf15d5e0 echarts-api:5.4.0-5 email-ext:2.100 envinject:2.908.v66a_774b_31d93 envinject-api:1.199.v3ce31253ed13 font-awesome-api:6.4.0-2 generic-webhook-trigger:1.87.0 git:5.2.0 git-client:4.4.0 git-server:99.va_0826a_b_cdfa_d github:1.37.3 github-api:1.314-431.v78d72a_3fe4c3 github-branch-source:1732.v3f1889a_c475b_ github-checks:554.vb_ee03a_000f65 h2-api:11.1.4.199-12.v9f4244395f7a_ handlebars:3.0.8 htmlpublisher:1.32 instance-identity:173.va_37c494ec4e5 ionicons-api:56.v1b_1c8c49374e jackson2-api:2.15.2-350.v0c2f3f8fc595 jakarta-activation-api:2.0.1-3 jakarta-mail-api:2.0.1-3 javadoc:243.vb_b_503b_b_45537 javax-activation-api:1.2.0-6 javax-mail-api:1.6.2-9 jaxb:2.3.8-1 jdk-tool:73.vddf737284550 jjwt-api:0.11.5-77.v646c772fddb_0 jnr-posix-api:3.1.17-1 jobConfigHistory:1227.v7a_79fc4dc01f jquery3-api:3.7.0-1 jsch:0.2.8-65.v052c39de79b_2 junit:1217.v4297208a_a_b_ce lockable-resources:1185.v0c528656ce04 mailer:463.vedf8358e006b_ mask-passwords:150.vf80d33113e80 matrix-auth:3.2 matrix-project:808.v5a_b_5f56d6966 maven-plugin:3.23 metrics:4.2.18-442.v02e107157925 mina-sshd-api-common:2.10.0-69.v28e3e36d18eb_ mina-sshd-api-core:2.10.0-69.v28e3e36d18eb_ momentjs:1.1.1 nodejs:1.6.1 notification:1.17 oic-auth:2.6 okhttp-api:4.11.0-157.v6852a_a_fa_ec11 permissive-script-security:0.7 pipeline-aws:1.43 pipeline-build-step:505.v5f0844d8d126 pipeline-github-lib:42.v0739460cda_c4 pipeline-graph-analysis:202.va_d268e64deb_3 pipeline-graph-view:198.v0844db_6ca_554 pipeline-groovy-lib:671.v07c339c842e8 pipeline-input-step:477.v339683a_8d55e pipeline-maven:1322.v9ef317a_3e0a_9 pipeline-model-api:2.2144.v077a_d1928a_40 pipeline-model-definition:2.2144.v077a_d1928a_40 pipeline-model-extensions:2.2144.v077a_d1928a_40 pipeline-rest-api:2.33 pipeline-stage-step:305.ve96d0205c1c6 pipeline-stage-tags-metadata:2.2144.v077a_d1928a_40 pipeline-stage-view:2.33 pipeline-utility-steps:2.16.0 plain-credentials:143.v1b_df8b_d3b_e48 plugin-util-api:3.3.0 popper2-api:2.11.6-2 postbuildscript:3.2.0-460.va_fda_0fa_26720 publish-over:0.22 publish-over-ssh:1.25 rebuild:320.v5a_0933a_e7d61 resource-disposer:0.23 s3:0.12.3445.vda_704535b_5a_d saferestart:0.7 scm-api:676.v886669a_199a_a_ script-security:1273.v66c1964f0dfd snakeyaml-api:1.33-95.va_b_a_e3e47b_fa_4 sonar:2.15 ssh-credentials:308.ve4497b_ccd8f4 sshd:3.312.v1c601b_c83b_0e structs:325.vcb_307d2a_2782 swarm:3.40 timestamper:1.26 token-macro:384.vf35b_f26814ec tpsd-jenkins-plugin:3.0.4-SNAPSHOT (private-e699ebb8-rivanden) trilead-api:2.84.v72119de229b_7 uno-choice:2.7.2 variant:59.vf075fe829ccb workflow-api:1267.vd9b_a_ddd9eb_47 workflow-basic-steps:1042.ve7b_140c4a_e0c workflow-cps:3773.v505e0052522c workflow-durable-task-step:1289.v4d3e7b_01546b_ workflow-job:1326.ve643e00e9220 workflow-multibranch:756.v891d88f2cd46 workflow-scm-step:415.v434365564324 workflow-step-api:639.v6eca_cd8c04a_a_ workflow-support:848.v5a_383b_d14921 ws-cleanup:0.45 ```

What Operating System are you using (both controller, and any agents involved in the problem)?

Ubuntu 20.04

Reproduction steps

  1. Build > Configuration
  2. Pipeline > Pipeline script from SCM > SCM: Git > Additional Behaviours > Status Checks Properties > Status checks name: tuneventd (instead of Jenkins, which was pre-populated) > Save
  3. Run the Build

Expected Results

[GitHub Checks] GitHub check (name: tuneventd, status: in_progress) has been published.

Actual Results

[GitHub Checks] GitHub check (name: Jenkins, status: in_progress) has been published.

Anything else?

All other options for the Status Checks Properties have been left unchecked.

image

I am using Lightweight checkout for the project Jenkinsfile if that makes any difference.

KalleOlaviNiemitalo commented 1 year ago

Is there one SCM for the pipeline and a different SCM for a checkout within the pipeline? If so, to which of those SCMs are the status checks published now?

Possibly related info in https://github.com/jenkinsci/github-checks-plugin/issues/189.

julmarqu commented 1 year ago

There are two SCM, one for the pipeline and then another inside of the Jenkins file but both point to the same repo, so the publishing goes to the same place.

On Tue, Sep 12, 2023, 14:05 KalleOlaviNiemitalo @.***> wrote:

Is there one SCM for the pipeline and a different SCM for a checkout within the pipeline? If so, to which of those SCMs are the status checks published now?

Possibly related info in jenkinsci/github-checks-plugin#189 https://github.com/jenkinsci/github-checks-plugin/issues/189.

— Reply to this email directly, view it on GitHub https://github.com/jenkinsci/checks-api-plugin/issues/232#issuecomment-1716268890, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHXGXQTZKSFT4NDNUH6P6K3X2CW7HANCNFSM6AAAAAA4VIAUSE . You are receiving this because you authored the thread.Message ID: @.***>

julmarqu commented 12 months ago

I got this issue resolved. You were on the right path. Seems that the lightweight GitSCM to get the Jenkinsfile was what was taking the configuration I set, but then I got the full repo within the Jenkinsfile itself again and that overwrites the check operation. I am manually setting the extension properties in the Jenkinsfile and now the notifications works as expected

julmarqu commented 12 months ago

Closing since the issue does indeed seem related to https://github.com/jenkinsci/github-checks-plugin/issues/189.