Change the way we tag docker images

Currently, we have https://gitlab.syncad.com/hive/clive/container_registry:

image

  1. CI on master:

    • instance-master:instance-HASH
    • testnet-instance-master:testnet-instance-HASH
  2. CI on develop:

    • instance-develop:instance-HASH
    • testnet-instance-develop:testnet-instance-HASH
  3. CI on feature branch:

    • instance:instance-HASH
    • testnet-instance:tesntet-instance-HASH

and due to the GitLab cleanup policy settings we are unable to properly detect which images should be removed and which should be kept. We need to have the image purpose like master or develop stored in the tag name also, so we could have e.g.

  1. CI on master:

    • master-instance:master-instance-HASH
    • master-testnet-instance:master-testnet-instance-HASH
  2. CI on develop:

    • develop-instance:develop-instance-HASH
    • develop-testnet-instance:develop-testnet-instance-HASH
  3. CI on feature branch:

    • fetaure-instance:fetaure-instance-HASH
    • fetaure-testnet-instance:tesntet-instance-HASH

Why are they doubled? Because we want to have separate directories in https://gitlab.syncad.com/hive/clive/container_registry so we need a different name before the : and we need to be able to cleanup properly so we need a different name after the :.

Additionally, we should have another CI image being build - on a protected tag, so there would be additional e.g:

  1. CI on protected branch:
    • tagged-instance:tagged-instance-v1.27.5
    • tagged-testnet-instance:tagged-testnet-instance-v1.27.5
Edited by Mateusz Żebrak