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 proper support for working-directory & fix command builder #772

Merged
merged 5 commits into from
Aug 10, 2021

Conversation

catthehacker
Copy link
Member

@catthehacker catthehacker commented Aug 9, 2021

changelog:

  • working-directory: is set through Docker now instead of adding cd %s to script
  • workdir cases:
    • if starts /, it replaces workdir during that exec
    • if doesn't start with /, merge with current workdir
    • if empty, leave it alone and use what has been used before (container workdir)
  • few formatting touches
  • Print Docker executors to Info loglevel, when pulling (big) images this should let user know what is currently happening (currently it doesn't show anything about pull without verbose option)
  • Replace pattern to script path after command has been re-split for Docker

Fixes #211
Fixes #748

@catthehacker catthehacker requested a review from a team as a code owner August 9, 2021 19:16
@codecov
Copy link

codecov bot commented Aug 9, 2021

Codecov Report

Merging #772 (e2557b0) into master (0f04942) will increase coverage by 4.58%.
The diff coverage is 62.29%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #772      +/-   ##
==========================================
+ Coverage   49.27%   53.85%   +4.58%     
==========================================
  Files          23       23              
  Lines        2401     2670     +269     
==========================================
+ Hits         1183     1438     +255     
+ Misses       1090     1086       -4     
- Partials      128      146      +18     
Impacted Files Coverage Δ
pkg/container/docker_build.go 0.00% <0.00%> (ø)
pkg/container/docker_run.go 1.77% <0.00%> (-0.16%) ⬇️
pkg/common/git.go 52.85% <30.15%> (-6.94%) ⬇️
pkg/runner/runner.go 68.96% <33.33%> (-7.51%) ⬇️
pkg/model/planner.go 51.85% <41.37%> (+18.76%) ⬆️
pkg/model/workflow.go 51.08% <62.68%> (+25.37%) ⬆️
pkg/container/docker_pull.go 36.17% <64.70%> (+17.98%) ⬆️
pkg/runner/expression.go 85.38% <71.87%> (-1.26%) ⬇️
pkg/runner/step_context.go 78.78% <80.00%> (+9.83%) ⬆️
pkg/runner/run_context.go 80.36% <98.55%> (+3.95%) ⬆️
... and 7 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 77b3968...e2557b0. Read the comment docs.

hackercat added 2 commits August 9, 2021 22:44
+ rename containerPath to scriptPath to reflect what value it contains
@pull-request-size pull-request-size bot added size/L and removed size/M labels Aug 9, 2021
@catthehacker catthehacker changed the title Add proper support for working-directory Add proper support for working-directory & fix command builder Aug 9, 2021
@mergify mergify bot merged commit bea32d5 into nektos:master Aug 10, 2021
@catthehacker catthehacker deleted the cat/fix/workdir branch August 11, 2021 01:38
@fatbasstard fatbasstard mentioned this pull request Nov 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue: File paths are unquoted Does not honor working-directory
2 participants