Uploaded image for project: 'Nuxeo ECM Build/Test Environment'
  1. Nuxeo ECM Build/Test Environment
  2. NXBT-2202

Jenkins slave should be able to push images to docker-public repository

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Continuous Integration

      Description

      The following pipeline:

      node('SLAVE') {
          timeout(60) {
              timestamps {
                  stage('checkout') {
                      checkout scm
                  }
                  stage('build') {
                      docker.withRegistry('https://dockerin.nuxeo.com') {
                          docker.build("nuxeo/nuxeo-qaimage-php:${env.BRANCH_NAME}").push()
                      }
                  }
              }
          }
      }

      fails to push because of:

      error parsing HTTP 404 response body: invalid character '<' looking for beginning of value: "\n<!DOCTYPE html>\n<html>\n<head>\n  <title>404 - Nexus Repository Manager</title>\n  <meta http-
      equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"/>\n\n\n  <!--[if lt IE 9]>\n  <script>(new Image).src=\"https://dockerin.nuxeo.com/nexus3/favicon.ico?3.7.1-02\"</script>\n  <![en
      dif]-->\n  <link rel=\"icon\" type=\"image/png\" href=\"https://dockerin.nuxeo.com/nexus3/favicon-32x32.png?3.7.1-02\" sizes=\"32x32\">\n  <link rel=\"mask-icon\" href=\"https://dockerin.nux
      eo.com/nexus3/safari-pinned-tab.svg?3.7.1-02\" color=\"#5bbad5\">\n  <link rel=\"icon\" type=\"image/png\" href=\"https://dockerin.nuxeo.com/nexus3/favicon-16x16.png?3.7.1-02\" sizes=\"16x16
      \">\n  <link rel=\"shortcut icon\" href=\"https://dockerin.nuxeo.com/nexus3/favicon.ico?3.7.1-02\">\n  <meta name=\"msapplication-TileImage\" content=\"https://dockerin.nuxeo.com/nexus3/msti
      le-144x144.png?3.7.1-02\">\n  <meta name=\"msapplication-TileColor\" content=\"#00a300\">\n\n  <link rel=\"stylesheet\" type=\"text/css\" href=\"https://dockerin.nuxeo.com/nexus3/static/css/
      nexus-content.css?3.7.1-02\"/>\n</head>\n<body>\n<div class=\"nexus-header\">\n  <a href=\"https://dockerin.nuxeo.com/nexus3\">\n    <div class=\"product-logo\">\n      <img src=\"https://do
      ckerin.nuxeo.com/nexus3/static/images/nexus.png?3.7.1-02\"/>\n    </div>\n    <div class=\"product-id\">\n      <div class=\"product-id__line-1\">\n        <span class=\"product-name\">Nexus
       Repository Manager</span>\n      </div>\n      <div class=\"product-id__line-2\">\n        <span class=\"product-spec\">OSS 3.7.1-02</span>\n      </div>\n    </div>\n  </a>\n</div>\n\n<div
       class=\"nexus-body\">\n  <div class=\"content-header\">\n    <img src=\"https://dockerin.nuxeo.com/nexus3/static/rapture/resources/icons/x32/exclamation.png?3.7.1-02\"/>\n    <span class=\"
      title\">Error 404</span>\n    <span class=\"description\">Not Found</span>\n  </div>\n  <div class=\"content-body\">\n    <div class=\"content-section\">\n      Not Found\n    </div>\n
      </div>\n</div>\n</body>\n</html>\n\n"

      Having a look at Apache/Nexus config, dockerin.nuxeo.com is the docker group repository on Nexus.
      I created a new virtualhost named dockerin-public.nuxeo.com the following files:
      /etc/apache2/sites-available/dockerin-public.conf
      /etc/apache2/virtualhosts/dockerin-public
      I also changed the Nexus config so that the docker-public repository listens on port 6002.
      I also update the .docker/config.json file on both static slave + S3 bucket jenkins-resources for new slaves to be updated
      Still the job is failing because the swarm cannot resolve dockerin-public.nuxeo.com.
      An ALIAS is missing for nexus3.nuxeo.com with the new virtualhost.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: