Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-52041

can't use docker-compose - minimized workspace name start with underscore

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • branch-api-plugin
    • 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)

            Unassigned Unassigned
            rempusze Bartosz Rempuszewski
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: