Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-12877

Unable to promote artifacts with mule-domain(zip) type

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: 3 - High
    • Resolution: Unresolved
    • Affects Version/s: 4.14.1
    • Fix Version/s: None
    • Component/s: None
    • Severity:
      High

      Description

      Unable to promote artifacts with mule-domain(zip) type

      Can be Jenkins plugin issue but not sure hence created issue here, as promotion of artifact made via Python no Jenkins involvement but artifact deployment via Jenkins plugin produced by maven build from Jenkins, so it can be plugin itself deploying it wrong.

      here are the technical details how to reproduce the issue:

      pom.xml:

      <?xml version="1.0" encoding="UTF-8"?>
      <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
      
          <modelVersion>4.0.0</modelVersion>
      
          <artifactId>fake-artifact-id</artifactId>
          <groupId>fake.group.id</groupId>
          <packaging>mule-domain</packaging>
          <version>0.0-SNAPSHOT</version>
          <repositories>
              <repository>
                  <id>Central</id>
                  <name>Central</name>
                  <url>http://repo1.maven.org/maven2/</url>
                  <layout>default</layout>
              </repository>
              <repository>
                  <id>mulesoft-releases</id>
                  <name>MuleSoft Releases Repository</name>
                  <url>https://repository-master.mulesoft.org/nexus/content/groups/public/</url>
                  <layout>default</layout>
              </repository>
          </repositories>
          <pluginRepositories>
              <pluginRepository>
                  <id>mulesoft-release</id>
                  <name>mulesoft release repository</name>
                  <layout>default</layout>
                  <url>http://repository.mulesoft.org/releases/</url>
                  <snapshots>
                      <enabled>false</enabled>
                  </snapshots>
              </pluginRepository>
          </pluginRepositories>
          <build>
              <finalName>fake-artifact-id</finalName>
              <plugins>
                  <plugin>
                      <groupId>org.mule.tools.maven</groupId>
                      <artifactId>mule-domain-maven-plugin</artifactId>
                      <version>1.3</version>
                      <!-- the same wiht 1.1 and 1.2 -->
                      <extensions>true</extensions>
                      <configuration>
                          <copyToDomainsDirectory>true</copyToDomainsDirectory>
                          <!-- type>zip</type -->
                          <!-- or with it dowsn't matter -->
                      </configuration>
                  </plugin>
              </plugins>
          </build>
      </project>
      

      mule-project.xml:

      <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
      <mule-project xmlns="http://www.mulesoft.com/tooling/project" runtimeId="org.mule.tooling.server.3.7.3.ee" schemaVersion="5.3.0.0">
          <name>fake-artifact-id</name>
          <domainName>fake-artifact-id</domainName>
      </mule-project>
      

      src/main/domain/mule-deploy.properties:

      #** #** GENERATED CONTENT ** Mule Application Deployment Descriptor
      #Tue May 24 19:08:49 BST 2016
      redeployment.enabled=true
      encoding=UTF-8
      config.resources=mule-domain-config.xml
      domain=fake-artifact-id
      

      src/main/domain/mule-domain-config.xml:

      <?xml version="1.0" encoding="UTF-8"?>
      <domain:mule-domain
              xmlns="http://www.mulesoft.org/schema/mule/core"
              xmlns:domain="http://www.mulesoft.org/schema/mule/ee/domain"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
              xmlns:http="http://www.mulesoft.org/schema/mule/http"
              xmlns:vm="http://www.mulesoft.org/schema/mule/vm"
              xsi:schemaLocation="
                     http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
                     http://www.mulesoft.org/schema/mule/ee/domain http://www.mulesoft.org/schema/mule/ee/domain/current/mule-domain-ee.xsd
                     http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
                     http://www.mulesoft.org/schema/mule/vm http://www.mulesoft.org/schema/mule/vm/current/mule-vm.xsd">
      
          <!-- configure here resource to be shared within the domain -->
      
          <http:listener-config name="shared-httpListenerConfig" host="0.0.0.0" port="8889"  doc:name="HTTP Shared Listener Configuration"/>
      
          <vm:connector name="sharedVm" validateConnections="true" doc:name="VM"/>
      </domain:mule-domain>
      

      empry dir src/main/resources

      catalian.out log:

      2016-11-21 15:21:04,908 [http-nio-8443-exec-12] [INFO ] (o.a.e.UploadServiceImpl:512) - Deploy to 'staging:fake/group/id/fake-artifact-id/1-test-1.0.29/fake-artifact-id-1-test-1.0.29.zip' Content-Length: 914
      2016-11-21 15:21:05,067 [http-nio-8443-exec-12] [INFO ] (o.a.e.UploadServiceImpl:512) - Deploy to 'staging:fake/group/id/fake-artifact-id/1-test-1.0.29/fake-artifact-id-1-test-1.0.29.pom' Content-Length: 2022
      2016-11-21 15:21:05,169 [http-nio-8443-exec-12] [INFO ] (o.a.r.r.c.BuildResource:300) - Adding build 'test_build #29'
      2016-11-21 15:21:05,202 [http-nio-8443-exec-12] [INFO ] (o.a.r.r.c.BuildResource:328) - Added build 'test_build #29'
      2016-11-21 15:21:13,726 [art-exec-8] [INFO ] (o.a.s.a.ArchiveIndexerImpl:145) - Indexing archive: staging:fake/group/id/fake-artifact-id/1-test-1.0.29/fake-artifact-id-1-test-1.0.29.zip
      

      we run promote python script:

      #!/usr/bin/env python
      import json
      import requests
      from requests.auth import HTTPBasicAuth
      url = "http://localhost/api/build/promote/test_build/29"
      payload = {'status': 'released', 'ciUser': '<user>','dryRun': 'false','targetRepo': 'releases','copy': 'true','artifacts': 'true','dependencies': 'false'}
      headers = {'content-type' : 'application/json'}
      r = requests.post(url, data=json.dumps(payload), auth=HTTPBasicAuth('<user>', '<api_key>'), headers=headers)
      print r.text
      print r.status_code
      

      and getting the error in catalina.out:

      2016-11-21 15:23:49,213 [http-nio-8443-exec-2] [ERROR] (o.a.b.BuildServiceUtils:197) - Unable to find artifact 'fake-artifact-id-1-test-1.0.29.zip' of build 'test_build' #29
      

      jenkins build log from artifactory plugin:

      [JENKINS] Archiving disabled
      [INFO] Artifactory Build Info Recorder: Saving Build Info to '<path to build root>/target/build-info.json'
      [INFO] Deploying artifact: http://localhost/staging/fake/group/id/fake-artifact-id/1-test-1.0.29/fake-artifact-id-1-test-1.0.29.zip
      [INFO] Deploying artifact: http://localhost/staging/fake/group/id/fake-artifact-id/1-test-1.0.29/fake-artifact-id-1-test-1.0.29.pom
      [INFO] Artifactory Build Info Recorder: Deploying build info ...
      [INFO] Deploying build descriptor to: https://localhost/api/build
      [INFO] Build successfully deployed. Browse it in Artifactory under http://localhost/webapp/builds/test_build/29
      

      system information:

      artifactory version 4.14.1
      build info from artifactory json:
        "version" : "1.0.1",
        "name" : "test_build",
        "number" : "29",
        "type" : "MAVEN",
        "buildAgent" : {
          "name" : "Maven",
          "version" : "3.2.2"
        },
        "agent" : {
          "name" : "Jenkins",
          "version" : "2.19.3"
        },
        "artifactoryPluginVersion" : "2.6.0",
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            EGligaov Eugene Gligalov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Sync Status

                Connection: RTFACT Sync
                RTMID-12877 -
                SYNCHRONIZED
                • Last Sync Date: