title: Jenkins does not accept variable declaration
body: <p>I am trying to start a docker image from Jenkins.
  (<a href="https://stackoverflow.com/questions/45219276/not-getting-docker-to-run-from-within-jenkins">Not getting Docker to run from within Jenkins</a>)
  I think I'm really close but this part has still some issues.
  Can please anyone help?</p>
  
  <pre><code>    stage('build Dockerimage 1') {
        steps{
          apitestimage = docker.build('apitestimage', '--no-cache=true dockerbuild')
        }
      }
  
      stage('start Dockerimage and Tests 2') {
        steps{
          apitestimage.inside {
            sh 'cd testing &amp;&amp; ctest'           
          }
        }
      }
  </code></pre>
  
  <p>Jenkins reports:
  WorkflowScript: 21: Expected a step @ line 21, column 15. apitestimage = docker.build('apitestimage', '--no-cache=true dockerbuild') </p>
  
  <p>and also </p>
  
  <p>WorkflowScript: 27: Method calls on objects not allowed outside "script" blocks. @ line 27, column 13. apitestimage.inside {</p>