-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
Jenkins 2.107.2
For certain project names minimized workspace name will start with underscore:
// add this test case to WorkspaceLocatorImplTest assertEquals("_my.service.name.abcde_PR-1-J66S6RX2LGBP3IYNJHSVLYWU5WQXTLZJDQRJIBNFPNM3HOWPZASQ", WorkspaceLocatorImpl.minimize("one/or/more/parent/elements/abcdefghijk/my.service.name.abcde/PR-1"));
docker-compose uses directory name as container name (-p can be used to set custom name).
Docker does not allow underscore as first letter of the container name.
Because of that jobs that call docker-compose without -p will fail.
Workarounds:
1) use docker-compose -p
2) use custom workspace name
3) jenkins.branch.WorkspaceLocatorImpl.PATH_MAX=0 (or other value)
After some testing:
It would be great to use something like "<project-name>_<pr>-<hash from full path>"...