Skip to content
Snippets Groups Projects

Draft: Resolve "Default docker image name too long"

Open Jon Azpiazu requested to merge 46-default-docker-image-name-too-long into master
2 unresolved threads

Closes #46

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Jon Azpiazu added 1 commit

    added 1 commit

    • ed31e185 - Shorten default docker image name

    Compare with previous version

    • If I understood this well, this:

      • allows overriding the image name with USER_DOCKER_PUSH_NAME
      • removes the tecnalia_robotics bit from the name if using the default

      I'm not a fan of the huge names either, but I find it a bit arbitrary to remove the tecnalia_robotics part. Since most projects are a few sub-groups deep, the name will be long anyways. And we open up possible collisions with images from other groups.

      Let's see what @inigo.moreno says, but my vote is not to merge this.

    • The images are pushed by default to the tecnalia-robotics-docker artifact group. So in my head it makes some sense to remove the tecnalia_robotics bit from the docker name, as it is already present in url.

      If another group uses these templates they would also use a different artifact group, so there would be no collisions.

    • If another group uses these templates they would also use a different artifact group, so there would be no collisions.

      Not sure that's the case :sweat_smile:

      If/when I create images from medrob repositories, I tend to use the same Artifactory repository. They usually are not the same applications, therefore naming collisions are actually not likely. But I still would rather keep the full namespace.

    • Please register or sign in to reply
43 43 # Get ID of image created by ddeploy
44 44 - 'DOCKER_ID=$(docker images --format="{{.ID}}" | head -1)'
45 45 - curl -Ls https://git.code.tecnalia.com/tecnalia_robotics-public/gitlab_templates/raw/master/scripts/enforce_labels.bash | bash -s -- ${DOCKER_ID}
46 # if USER_DOCKER_PUSH_NAME is not defined, shorten the default DOCKER_PUSH_NAME
  • Why create a third variable? The DOCKER_PUSH_NAME is already a variable that you could change with the CI and that uses CI_PROJECT_PATH.

    I would suggest changing the DOCKER_PUSH_NAME default to empty, and check it here.

  • Please register or sign in to reply
Please register or sign in to reply
Loading