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

    • Bug
    • Resolution: Fixed
    • Major
    • 3.41.0
    • 3.37.3
    • Docker, REST
    • 3
    • NXRM Neo Sprint 37
    • 3
    • non-concept
    • 3

    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

            tahir.awan Tahir Awan
            dqiu Daolong Qiu
            Aleksi Grönlund
            Michael Oliverio Michael Oliverio
            NXRM - Neo
            Tahir Awan Tahir Awan
            Votes:
            2 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              tigCommentSecurity.panel-title