question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for custom or shorter base workdir paths

See original GitHub issue

Currently, the base working directory for actions exists within a sub folder of the installation directory and duplicates the repository twice. This can be an issue for repos with longer names along with certain tools (Python VENV, MSBuild).

There is a workflow yaml option to set the base working directory, but this is not very portable and the path can be runner specific.

A few things could help with this issue:

  1. Instead of using the pattern <install_dir>/_work/<repo_name>/<repo_name>/ use the path <install_dir>/_work/<guid_or_short_unique_string/
  2. Add a setting or environment variable to change the base path of <install_dir>/_work/ to a different path on disk.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:22
  • Comments:24 (1 by maintainers)

github_iconTop GitHub Comments

8reactions
jahales-intelcommented, Mar 28, 2023

Someone from my organization pointed me to a workaround that they’re using and I’m sharing here in case it helps while we wait for a robust fix.

There’s a Pipeline configuration folder in the runner work directory where you can modify the pipeline directory and workspace directory for a given repository:

<work directory>\PipelineMapping<organization><repository>\PipelineFolder.json

I’ve been modifying that file to create a shorter file path and it seems to work (pipelineDirectory / workspaceDirectory). I’m not aware of any documentation for this.

7reactions
MichaelJJcommented, Feb 10, 2022

Great, thanks. This is causing some pain for multiple members of our Enterprise and would be great to have resolved!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ensure Docker WORKDIR values are absolute paths
By using absolute paths for WORKDIR, you can help prevent potential issues such as using the wrong directory for a stage, which can...
Read more >
Can I use WORKDIR in my Dockerfile with Github Actions? ...
GitHub sets the working directory path in the GITHUB_WORKSPACE environment variable. It's recommended to not use the WORKDIR instruction in ...
Read more >
What Is the Default WORKDIR in a Dockerfile?
Learn about the default value of the WORKDIR instruction in Docker. ... 30% less RAM and a 30% smaller base image for running...
Read more >
How do I shorten the current directory path shown on ...
bashrc ). If it's there already, its setting will contain \w , which is what gives your working directory. Change that to \W ......
Read more >
Compose Build Specification
In the former case, the whole path is used as a Docker context to execute a Docker ... Compose Build implementations may support...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found