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

Cannot use number from version number plugin as pipeline version

    XMLWordPrintable

Details

    Description

      The pipeline version task seems to run before the version generator task from https://wiki.jenkins-ci.org/display/JENKINS/Version+Number+Plugin - so the variable isn't set at this point.

      eg. with the following config

      I get these environment variables

      [build] $ /bin/sh -xe /tmp/hudson4088077174362603015.sh
      + env
      HUDSON_SERVER_COOKIE=9882fe58cbf3bb2d
      SHELL=/bin/bash
      SSH_CLIENT=---
      BUILD_TAG=---
      GIT_PREVIOUS_COMMIT=da17c63d09f6fa3799d0c07157cdf8b34d0e2e1b
      WORKSPACE=/home/jenkins/workspace/build
      USER=jenkins
      NLSPATH=/usr/dt/lib/nls/msg/%L/%N.cat
      JENKINS_HOME=/var/lib/jenkins
      GIT_COMMIT=da17c63d09f6fa3799d0c07157cdf8b34d0e2e1b
      MAIL=/var/mail/jenkins
      PATH=/usr/local/bin:/bin:/usr/bin
      _=/bin/env
      PWD=/home/jenkins/workspace/build
      JOB_NAME=build
      BUILD_VERSION=v-2015-05-12-r1
      BUILD_DISPLAY_NAME=#28
      XFILESEARCHPATH=/usr/dt/app-defaults/%L/Dt
      BUILD_ID=28
      GIT_PREVIOUS_SUCCESSFUL_COMMIT=da17c63d09f6fa3799d0c07157cdf8b34d0e2e1b
      DESCRIPTION_SETTER_DESCRIPTION=v-2015-05-12-r1
      SHLVL=2
      HOME=/home/jenkins
      GIT_BRANCH=origin/master
      EXECUTOR_NUMBER=1
      JENKINS_SERVER_COOKIE=9882fe58cbf3bb2d
      GIT_URL=---
      NODE_LABELS=---
      LOGNAME=jenkins
      SSH_CONNECTION=---
      HUDSON_HOME=/var/lib/jenkins
      NODE_NAME=---
      BUILD_NUMBER=28
      HUDSON_COOKIE=7bc52e86-bd8b-4f53-9c78-9d4b66b29da0
      

      Attachments

        Issue Links

          Activity

            This is solved with JENKINS-23485

            dawidmalina Dawid Malinowski added a comment - This is solved with JENKINS-23485
            enrico Enrico Mills added a comment -

            This also applies to environment variables set by the EnvInject plugin

            enrico Enrico Mills added a comment - This also applies to environment variables set by the EnvInject plugin

            People

              patbos Patrik Boström
              glenjamin Glen Mailer
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: