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

Change pipeline config path resolution #299

Merged
merged 12 commits into from
Sep 17, 2021
Merged

Conversation

anbraten
Copy link
Member

@anbraten anbraten commented Sep 11, 2021

Config resolution

  • pipeline-config setting empty / not specified (default): .woodpecker/ => .woodpecker.yml => .drone.yml
  • pipeline-config setting defined by user: try that file / folder and no fallback (if a user sets some special value that is normally done for some reason)

Changes

  • pipeline-config setting will be empty by default
  • remove fallback setting for config loading (simplifies config)

closes #133

@anbraten anbraten added enhancement improve existing features breaking will break existing installations if no manual action happens labels Sep 11, 2021
@anbraten anbraten changed the title Change pipeline config file resolution Change pipeline config path resolution Sep 11, 2021
@6543 6543 added this to the 0.15.0 milestone Sep 11, 2021
6543 added a commit to anbraten/woodpecker that referenced this pull request Sep 11, 2021
@anbraten anbraten marked this pull request as ready for review September 13, 2021 07:21
@anbraten
Copy link
Member Author

@6543 Do you know if I need to add a migration to remove the Fallback Flag from database?

@6543
Copy link
Member

6543 commented Sep 13, 2021

If I find some time I'll look into this :)

@anbraten anbraten requested a review from 6543 September 17, 2021 18:05
@6543 6543 enabled auto-merge (squash) September 17, 2021 18:28
@6543 6543 merged commit 289f0c9 into woodpecker-ci:master Sep 17, 2021
@anbraten anbraten deleted the ci-config branch September 17, 2021 20:02
@anbraten anbraten mentioned this pull request Sep 19, 2021
6543 pushed a commit that referenced this pull request Sep 21, 2021
With #299 the `sanitizePath` has a bug now. If no special config (empty string) has been set it falls back to default values, but the `sanitizePath` function  the used the pipelince-config-path to sanitize pipeline names.
6543 added a commit that referenced this pull request Sep 25, 2021
#299 who closed #133 did not take into account, that that gitea (and eventually) other forges do return 200 and empty string if file was not found - this make configFetcher more resilient
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking will break existing installations if no manual action happens enhancement improve existing features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use .woodpecker.yml as default pipeline config file
2 participants