Issue
An unexpected directory named ?
appeared in my workspace.
Environment
- CloudBees CI (CloudBees Core) on modern cloud platforms - Managed controller
- CloudBees CI (CloudBees Core) on traditional platforms - Client controller
- CloudBees Jenkins Enterprise - Managed controller
- CloudBees Jenkins Platform - Client controller
- CloudBees Jenkins Distribution
- Jenkins LTS
Resolution
If your build uses some Java based build tools (for example Gradle) they might be storing some information in the HOME
directory. If the agent user does not have a HOME
directory, Java Runtime might return the ?
instead of the path. Hence, the new directory named ?
is created in the current directory which is by default the workspace.
Make sure that the agent user has a HOME
directory and then re-launch the agent.
Workaround
Tools might accept an override for the user home directory. For example, in case of Gradle you can use the GRADLE_USER_HOME
environment variable to specify the Gradle user home directory (which defaults to $USER_HOME/.gradle
if not set).
Tested product/plugin versions
CloudBees Jenkins Platform - Client controller 2.190.3.2
References
Gradle downloads to ?/.gradle directory when running tasks - Stack Overflow
0 Comments