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

Multi job credentials not being loaded

XMLWordPrintable

      When creating a multi job I have credentials being added to one of the phase/jobs. Those credentials appear to be set up correctly in the job but the job doesn't recognize the credentials. Once I click configure and then save without changing any values the credentials are loaded and the next build recognizes them and passes successfully.

      job("${Project_Name}-deploy"){
      label('DOCKER')
      logRotator(-1, 3, 3, 1)
      disabled true
      wrappers {
      preBuildCleanup()
      credentialsBinding

      { string('DCOS_USER_ID', 'DCOS_USER_ID') file('RAW_DCOS_PRIVATE_KEY', 'DCOS_PRIVATE_KEY') string('DCOS_BASE_URL', 'DCOS_BASE_URL') }

      }
      steps{

      environmentVariables {
      env('Project_Name',"${Project_Name}")
      env('Organization',"${Organization}")
      env('Docker_Tag',"dockerhub.com/${Organization}/${Project_Name}:${Branch_Name}")
      env('Vanity_URL', "${Vanity_URL}")
      }
      shell '''

      1. Ensure we have the latest image
        docker pull ${Docker_Tag}
      1. Deploy to DC/OS
        docker run -e "DCOS_PRIVATE_KEY=$(cat $RAW_DCOS_PRIVATE_KEY)" -e "DCOS_BASE_URL=${DCOS_BASE_URL}" -e "DCOS_USER_ID=${DCOS_USER_ID}" ${Docker_Tag} "rake marathon:publish ${Docker_Tag} ${Vanity_URL}"
        '''.stripIndent().trim()
        }
        publishers { mailer(recipients, false, true) }

        }

            Unassigned Unassigned
            chris_boyle Chris Boyle
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: