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 support for Woodpecker CI 1.x and 2.x #2339

Conversation

uncomfyhalomacro
Copy link
Contributor

Breaking Change

This PR supersedes #2335. The changes introduced are the following

Removed environmental variables required in the struct Woodpecker

  • FORGE_URL. This is not needed based on my usage.
  • woodpecker_repo_link which uses CI_REPO_LINK. The environmental variable CI_REPO_LINK is still used if the version is 0.15.0. We just manually change it get woodpecker_forge_url to allow compatibility between woodpecker versions.

Reason for removing woodpecker_repo_link is that CI_REPO already contains <owner>/<name>.

Changed or renamed environmental variables

  • CI_BUILD_EVENT -> CI_PIPELINE_EVENT. 0.15.x used to use the CI_BUILD_EVENT. Latest release will use CI_PIPELINE_EVENT. Woodpecker 2.0.0 will remove CI_BUILD* environmental variables entirely and replace it with CI_PIPELINE*. So we are preparing for that transition.

New environmental variables to be used

  • CI_FORGE_URL. This is the URL for the constructed forge e.g. https://github.com or https://gitlab.com. To allow compatibility prior 1.0.0, CI_REPO_LINK is used with match.
  • CI_SYSTEM_VERSION. Returns the version number of currently used Woodpecker CI system. This is the environmental variable to be used to check versions.

@uncomfyhalomacro uncomfyhalomacro marked this pull request as draft November 11, 2023 07:02
Everyone is advised to use >= 1.0.0 Woodpecker versions

Signed-off-by: Soc Virnyl Estela <[email protected]>
@uncomfyhalomacro uncomfyhalomacro force-pushed the backward-compatibility-for-supporting-woodpecker-ci-versions branch from 250d8df to fe856d1 Compare November 11, 2023 13:10
@uncomfyhalomacro uncomfyhalomacro marked this pull request as ready for review November 11, 2023 13:11
@uncomfyhalomacro
Copy link
Contributor Author

Ready for review. Not sure pinging is the correct way to ask for code review. Sorry!

CC: @mortenpi @fredrikekre

…to backward-compatibility-for-supporting-woodpecker-ci-versions

This merge updates the branch from upstream changes. Original
code hasnt changed

Signed-off-by: Soc Virnyl Estela <[email protected]>
Signed-off-by: Soc Virnyl Estela <[email protected]>
Copy link
Member

@mortenpi mortenpi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies for the delay here. I haven't really tested this, but the changes LGTM, and the test suite looks really comprehensive. Thank you!

It's ready to be merged, right? Would you mind adding a note into CHANGELOG.md?

Also, something to maybe be aware of: we'll change to Git.jl for git (#2348). I assume it should just work on Woodpecker, but you never know.

Signed-off-by: Soc Virnyl Estela <[email protected]>
@uncomfyhalomacro
Copy link
Contributor Author

uncomfyhalomacro commented Nov 26, 2023

Apologies for the delay here. I haven't really tested this, but the changes LGTM, and the test suite looks really comprehensive. Thank you!

It's ready to be merged, right? Would you mind adding a note into CHANGELOG.md?

Also, something to maybe be aware of: we'll change to Git.jl for git (#2348). I assume it should just work on Woodpecker, but you never know.

It should probably just work assuming git and Git.jl have 1:1 compatibility. I will fix if it breaks Woodpecker 😄

EDIT:

Looking at Git.jl, I guess it's 1:1 since it uses a git binary but as a jll

@uncomfyhalomacro
Copy link
Contributor Author

It seems I forgot that 2.0.0 was released recently. That was fast. I guess I will update the docs and the links which causes linkchecks to fail.

Signed-off-by: Soc Virnyl Estela <[email protected]>
@uncomfyhalomacro
Copy link
Contributor Author

\cc @mortenpi ready for merging. thank you!

@mortenpi mortenpi changed the title compat: add backwards compatibility pre-1.0.0 woodpecker ci Add support for Woodpecker CI 1.x and 2.x Nov 26, 2023
CHANGELOG.md Outdated Show resolved Hide resolved
@mortenpi mortenpi linked an issue Nov 28, 2023 that may be closed by this pull request
@mortenpi mortenpi enabled auto-merge (squash) November 28, 2023 06:06
@mortenpi
Copy link
Member

Thanks for iterating on this @uncomfyhalomacro!

@mortenpi mortenpi merged commit d76784e into JuliaDocs:master Nov 28, 2023
18 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

breaking change of Woodpecker CI on their next branch
2 participants