• Robert Schmidt's avatar
    Reimplement DeployObject()/UndeployObject() · 5201a5c3
    Robert Schmidt authored
    This reimplements the CI deployment functions, and makes them a bit more
    robust.  Concretely:
    
    - Introduce a generic "deployment tag" option that can be used to
      override the tag to use for specific images. By default, it is the
      current "branch-commitID[0:8]" tag name (requires the change from
      function ImageTagToUse() to CreateTag(), impacting also pull/push
      image functions)
    - Avoid sed for image names, and use an .env file that docker-compose
      picks up automatically; the deployment analyzes a potentially existing
      .env file and updates instead of simply overriding. For instance, some
      pipelines might use -asan images for the gNB and "normal" (non-asan)
      images for UE, and a simple overwriting might make the -asan image
      name tag disappear for the gNB, resulting in deployment failures).
      Finally, undeployment removes the .env file, so that there are no
      modifications in the repository after undeployment.
    - Redo the previous behavior of autodetecting asan, and use that (the
      current function always uses asan, no matter what)
    - Remove deployKind/displayedNewTags globals, as they are not necessary
    - Make the usedImage output in HTML slimmer
    - On undeployment, print service names next to undeploy analysis, and
      return success/failure.
    - Make the functions generally less verbose and easier to read
    
    Note that as of and only in this commit, deployment does not work, as
    all the YAML files have not been updated to work with this updated
    version.  The next commit adds tests for the new deployment, and updates
    one YAML file (also being used in the tests). The follow-up commit then
    modifies all YAML files.
    5201a5c3
main.py 30 KB