We see the same situation:
we using some maven jobs and prepare the environment with some predefind variables like
project_rel_path=maven/parents/web-parent
Then we want to use in sparse-checkout path this variable like ${project_rel_path}. But we get then errors like
*
stderr: error: Sparse checkout leaves no entry on working directory*
We need such "central" point of configuration for our project definitions, because if we sparse checkout such path, the path is checked out as it is. So the workspace contains a folder like
/maven/parents/web-parent/
As for a standard maven job, we need to define where to find the pom.xml ... in such way with sparse checkout, we need to configure, that the pom can be found under maven/parents/web-parent/pom.xml (and we cannot rely on default maven job behaviour, that the pom.xml is in root of workspace).
One possible solution would be to provide a option to sparse checkout to root ... or to honor environment/build variables like ${xyz} and expand them.
Environment:
Windows 64, git client 2.7.0, jenkins 1.643, git plugin 2.4.1
We see the same situation:
we using some maven jobs and prepare the environment with some predefind variables like
project_rel_path=maven/parents/web-parent
Then we want to use in sparse-checkout path this variable like ${project_rel_path}. But we get then errors like
*
stderr: error: Sparse checkout leaves no entry on working directory*
We need such "central" point of configuration for our project definitions, because if we sparse checkout such path, the path is checked out as it is. So the workspace contains a folder like
/maven/parents/web-parent/
As for a standard maven job, we need to define where to find the pom.xml ... in such way with sparse checkout, we need to configure, that the pom can be found under maven/parents/web-parent/pom.xml (and we cannot rely on default maven job behaviour, that the pom.xml is in root of workspace).
One possible solution would be to provide a option to sparse checkout to root ... or to honor environment/build variables like ${xyz} and expand them.
Environment:
Windows 64, git client 2.7.0, jenkins 1.643, git plugin 2.4.1