Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation on how to use from jenkins #119

Open
thigg opened this issue Feb 17, 2023 · 2 comments
Open

Add documentation on how to use from jenkins #119

thigg opened this issue Feb 17, 2023 · 2 comments
Labels
documentation A PR that adds to documentation - used by Release Drafter enhancement New feature or request

Comments

@thigg
Copy link

thigg commented Feb 17, 2023

What feature do you want to see added?

I couldnt really understand how i add this to my multibranch pipeline.

It would be nice if the documentation could be improved for this.

Upstream changes

No response

@thigg thigg added the enhancement New feature or request label Feb 17, 2023
@Infinoid
Copy link

Infinoid commented Mar 23, 2023

I am not the author of this plugin, but maybe my experience can help.

I tried to figure out how to use this plugin in a similar way to an older configuration we had using a different Git server, where we defined all of the webhooks and triggers and jobs and views manually. I was not able to figure out how to give the Gitea Checks plugin the proper credentials so that it could submit the job results back to the PR or commit which had triggered it.

But when I tried using it in combination with the Gitea plugin, this plugin just worked without any special configuration. All of the actual configuration was on the Gitea plugin side.

Here's how I set that up.

  1. I set up a hello-world org in gitea with a hello-world/hello-world repo, and stuck a .jenkinsfile pipeline in there which ran make run and make test.
  2. I added a credential to Jenkins, of type Gitea Personal Access Token.
  3. Then, in my Jenkins dashboard view, I created a view named hello-world, of type Gitea Organization.
  4. In the configuration of that view, I told it where to find the hello-world org and that the pipeline filename it should look for is .jenkinsfile.

It automatically went and found the hello-world/hello-world repo, registered a webhook on that repo, and set up a hierarchy of job views to represent the repo, branches, and PRs. It triggered the job to run when I pushed a commit or created a PR. With all of that in place, this Gitea Checks plugin submits results to the right place. I see green checkboxes on commits which passed tests, and I see latest build results and verified tags on PRs. The result was very clean, this integration makes new setups quite easy.

The build log includes messages like this:

[Gitea] Notifying branch build status: SUCCESS This commit looks good
[Gitea] Notified

However, it's unclear how to migrate older sets of CICD jobs over to Gitea without rewriting everything all at once. If anyone knows a way to set it up to submit check results, specifying credentials and locations manually, without all of the auto discovery stuff, that would be helpful.

@viceice
Copy link
Member

viceice commented Jun 25, 2024

There is no configuration, it will just work when you use gitea connection for your multibranch pipeline.

Your can publish custom checks, see checks-api plugin

https://plugins.jenkins.io/checks-api/#plugin-content-pipeline-usage

@viceice viceice added the documentation A PR that adds to documentation - used by Release Drafter label Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation A PR that adds to documentation - used by Release Drafter enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants