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

Cannot set URL variable in pipeline: you tried to assign a value to the class 'java.net.URL'

    Details

    • Similar Issues:

      Description

      With the following Jenkinsfile I get an error complaining that you tried to assign a value to the class 'java.net.URL'

      pipeline {
          environment {
              URL = "http://foomybar.com"
          }
          agent any
          stages {
              stage ("do the thing") {
                  steps {
                      sh "echo ${env.URL}"
                  }
              }
          }
      }
      

      I cannot set the URL environment variable through the environment block.

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              Unassigned
              Reporter:
              ovidiub13 Ovidiu-Florin Bogdan
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: