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 option to set the local repository path to the cli command exec. #3524

Merged
merged 2 commits into from
Mar 20, 2024

Conversation

manuelluis
Copy link
Contributor

The cli command exec not handle in a coherent way the repository path when a directory or filename is given for the pipeline.

woodpecker-cli exec [command options] [path/to/.woodpecker.yaml]

If the path to the pipeline is a file in the .woodpecker directory, for example: .woodpecker/pipeline.yaml,
the repository path will be: .woodpecker

If the path to the pipeline yaml is a directory with more than one level, for example ci/woodpecker/,
the repository path will be: ci

In order not to break the old behavior we added a new option to put the root directory of the repository:

woodpecker-cli exec --local --repo-path . --pipeline-event manual .woodpecker/build.yml 

@lafriks lafriks added enhancement improve existing features cli labels Mar 20, 2024
@qwerty287
Copy link
Contributor

Please don't merge until 2.4.1 is released so we don't have to work with backports

@lafriks lafriks enabled auto-merge (squash) March 20, 2024 23:12
@woodpecker-bot
Copy link
Collaborator

woodpecker-bot commented Mar 20, 2024

Deployment of preview was torn down

@lafriks lafriks merged commit 9c684b7 into woodpecker-ci:main Mar 20, 2024
6 of 7 checks passed
@woodpecker-bot woodpecker-bot mentioned this pull request Mar 20, 2024
1 task
@@ -280,6 +280,8 @@ execute a local pipeline

**--repo-clone-url**="":

**--repo-path**="": path to local repository
Copy link
Member

Choose a reason for hiding this comment

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

are we going to backport it ?!?

Copy link
Contributor

Choose a reason for hiding this comment

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

why should we? 🤔

Copy link
Contributor

Choose a reason for hiding this comment

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

ohhhh... versioned docs....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli enhancement improve existing features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants