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

Expose URL to the CI build #2219

Closed
5 tasks done
xoxys opened this issue Aug 16, 2023 · 6 comments · Fixed by #2811
Closed
5 tasks done

Expose URL to the CI build #2219

xoxys opened this issue Aug 16, 2023 · 6 comments · Fixed by #2811
Labels
bug Something isn't working
Milestone

Comments

@xoxys
Copy link
Member

xoxys commented Aug 16, 2023

Component

server

Describe the bug

Woodpecker copies CI_PIPELINE_URL to DRONE_BUILD_LINK https://github.com/woodpecker-ci/woodpecker/blob/main/pipeline/frontend/metadata/drone_compatibility.go#L31. This is IMO wrong as the drone build link contains a link to the drone job e.g. https://drone.example.com/octocat/hello-world/42 while the CI pipeline URL contains a link to the forge event (e.g. commit) octocat/Hello-World@8019104

While looking into it, it looks like there is no DRONE_BUILD_LINK equivalent available in Woodpecker yet? Exposing a proper URL to the Woodpecker pipeline would be helpful for notification plugins where I would like to get redirected to the Pipeline logs instead of the forge.

System Info

{"source":"https://github.com/woodpecker-ci/woodpecker","version":"next-4d83ea0d"}

Additional context

No response

Validations

  • Read the Contributing Guidelines.
  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Checked that the bug isn't fixed in the next version already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use]
  • Check that this is a concrete bug. For Q&A join our Discord Chat Server or the Matrix room.
@xoxys xoxys added the bug Something isn't working label Aug 16, 2023
@xoxys
Copy link
Member Author

xoxys commented Aug 16, 2023

Especially as there is CI_COMMIT_URL already, I'm wondering why CI_PIPELINE_URL also contains a link to the forge.

@anbraten
Copy link
Member

I somehow remember this bug being mentioned somewhere before. I agree that CI_COMMIT_URL should be pointing to the forge and CI_PIPELINE_URL to the WP-UI

@xoxys
Copy link
Member Author

xoxys commented Aug 16, 2023

Can you give me a pointer where .Link for the pipeline is set?

@anbraten
Copy link
Member

In pipeline/stepBuilder.go we set CI_PIPELINE_URL to m.Curr.Link which should be the link to the forge.

@xoxys
Copy link
Member Author

xoxys commented Aug 16, 2023

But where is m.Curr.Link coming from?

@anbraten
Copy link
Member

pipeline/frontend/metadata.go

qwerty287 added a commit that referenced this issue Nov 13, 2023
Closes #2219

---------

Co-authored-by: Anbraten <anton@ju60.de>
@qwerty287 qwerty287 added this to the 2.0.0 milestone Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants