Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-31314

REST API for Docker Host repo can't GET, POST and PUT Allow redeploy only on 'latest' tag as UI

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.37.3
    • Fix Version/s: 3.41.0
    • Component/s: Docker, REST
    • Labels:
    • Story Points:
      3
    • Sprint:
      NXRM Neo Sprint 37
    • Notability:
      3
    • InvestmentLayer:
      support-escalated
    • Aha Concept:
      non-concept

      Description

      Problem: 

         For docker, the user could choose Allow redeploy only on 'latest' tag when the Deployment Policy is set to Disable redeploy from the UI(c. But the REST API  response doesn't contain any information about Allow redeploy only on 'latest' tag, also can't change its value through REST API

      Reproduce:

      1.) Create a docker host repository(docker-host) with Deployment policy: Disable redeploy and check the checkbox of Allow redeploy only on 'latest' tag

      2.)  With GET REST API: 

      curl -X 'GET' \
        'http://localhost:8081/service/rest/v1/repositories/docker/hosted/docker-host' \
        -H 'accept: application/json'
      

      The response doesn't have the Allow redeploy only on 'latest' tag information. 

      {
        "name": "docker-host",
        "url": "http://localhost:8081/repository/docker-host",
        "online": true,
        "storage": {
          "blobStoreName": "default",
          "strictContentTypeValidation": true,
          "writePolicy": "ALLOW_ONCE"
        },
        "cleanup": null,
        "docker": {
          "v1Enabled": true,
          "forceBasicAuth": true,
          "httpPort": null,
          "httpsPort": null
        },
        "component": {
          "proprietaryComponents": false
        },
        "format": "docker",
        "type": "hosted"
      }
      

       3.) Can't POST or PUT the Allow redeploy only on 'latest' tag with REST API

      Expected behavior:

      The REST API  /v1/repositories/docker/hosted/{repositoryName} should function as UI. When Deployment Policy is set to Disable redeploy

      with GET, could see the Allow redeploy only on 'latest' tag value in the response

      with POST and PUT could update the value of Allow redeploy only on 'latest' tag

        Attachments

          Activity

            People

            Assignee:
            tahir.awan Tahir Awan
            Reporter:
            dqiu Daolong Qiu
            CC:
            Aleksi Grönlund
            Last Updated By:
            Michael Oliverio Michael Oliverio
            Team:
            NXRM - Neo
            Owner:
            Tahir Awan Tahir Awan
            Votes:
            2 Vote for this issue
            Watchers:
            7 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response:

                tigCommentSecurity.panel-title