Uploaded image for project: 'Vnfsdk'
  1. Vnfsdk
  2. VNFSDK-651

Refrepo snapshot image overriding problem

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Medium Medium
    • Guilin Release
    • Guilin Release
    • None

      Current situation:

      A refrepo snapshot image is produced by two CI Jenkins Jobs:

      That is why image with latest tag is overridden by one of the Jenkins Job.
      One time we have an image for frankfurt and second time we have an image for master.

      Expected:
      The image should not be overridden.

      Information:
      Jessica Wagantall
      2 days ago 1:37 PM

      Bogumil Zebek yes.. that is indeed the expected behavior for snapshots. If both jobs tag a latest one, it will be overwritten.

      You can probably change this when you do a new image merge.

      One thing you can do, is what Morgan does in integration. When he runs a docker merge job, he can set the docker tag to be the same as "stream" instead of latest for frankfurt. That way, you can refer to master as "latest" and frankfurt as "frankfurt"

      This is how he does it: https://github.com/onap/ci-management/blob/master/jjb/integration/xtesting/integration-xtesting.yaml#L113

      Basically, once a new image is produced, the merge job can tag it using the value "stream" in this case.

      Option 2, is a little bit more tedious, but you can create a yaml file in your dcae repo that contains the name of the tag that you would like your docker image to be tagged as. Then, in your merge job you can have the variables:

      "container-tag-method:yaml-file" and

      "container-tag-yaml-dir: <path of your yaml file>"

      and the merge job will use whatever is in the yaml file to tag our image. O-RAN does this a lot.

      More on docker merge: https://docs.releng.linuxfoundation.org/projects/global-jjb/en/latest/jjb/lf-docker-jobs.html#docker-merge

      Third option, but I am not familiar with, I think the Docker file or pom file can be modified to set the tag for the image too.. but not sure how to do it. I would assume is the same way people set the tag the same way they do for their "#.#.#-SNAPSHOT-latest" tags.

      Regarding nexus rules:

      For snapshots: These can be overwritten if the same tag is applied and pushed to a new artifact. The stage job pushes artifacts to snapshots (10003) and if another job pushes using the same tag, these will be overwritten. This is an expected behavior. For that, the frankfurt and master jobs will need to push using different unique tags.
      Releases: Once a release is pushed, if another release with the same tag is pushed the job will report an error.

            bogumil_zebek bogumil_zebek
            bogumil_zebek bogumil_zebek
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: