Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-34240

MY_JAR_ARTIFACT_URL wrong if MY_JAR_VERSION passed from trigger job

    Details

    • Similar Issues:

      Description

      If a "trigger job" triggers a downstream job with a build param of type Maven Metadata Plugin,
      the passed build param "MY_JAR_VERSION" isn´t reflected properly in MY_JAR_ARTIFACT_URL.

      MY_JAR_ARTIFACT_URL is composed out of the parameters if the job would have been triggered manually - with a (default) selection of a version.

      Example:
      the trigger job passes MY_JAR_VERSION=1 to the downstream project.
      When inspecting "Parameters" of the downstream project we´ll see these properties:

      MY_JAR_ARTIFACT_VERSION=3 (latest release, default)
      MY_JAR_ARTIFACT_PACKAGING=...
      MY_JAR_ARTIFACT_URL=/path/to/repo/groupId/artifactId/3/artifactId-3.packaging
      MY_JAR_ARTIFACT_VERSION=1 (passed from trigger job)
      

      => For that, MY_JAR_ARTIFACT_URL needs to be created programmatically by concatinating all parts to a valid (Nexus) URL:

      COMPONENT_ARTIFACT_URL_FIXED="${REPO_BASE_URL}/${COMPONENT_GROUP_ID//.//}/${COMPONENT_ARTIFACT_ID}/${COMPONENT_VERSION}/${COMPONENT_ARTIFACT_ID}-${COMPONENT_VERSION}.${COMPONENT_PACKAGING}"
      

      Expected behaviour is COMPONENT_ARTIFACT_URL will always reflect the correct URL - regardingless of the version being choosen by a user or passed as build parameter from a trigger job.

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              gesh Gesh Markov
              Reporter:
              torstenreinhard Torsten Reinhard
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: