title: Jenkins Pipeline Jenkinsfile: 'node' and 'pipeline' directives
body: <p>I am getting started with <a href="https://jenkins.io/doc/book/pipeline/jenkinsfile/" rel="noreferrer">Jenkins declarative Pipeline</a>. From some of the examples I have seen, I notice that the Jenkinsfile is setup with the Pipeline directive:</p>
  
  <pre><code>pipeline {
      agent any 
  
      stages {
          stage('Build') { 
              steps { 
                  sh 'make' 
              }
          }
          stage('Test'){
              steps {
                  sh 'make check'
                  junit 'reports/**/*.xml' 
              }
          }
          stage('Deploy') {
              steps {
                  sh 'make publish'
              }
          }
      }
  }
  </code></pre>
  
  <p>In other examples, I notice that the Jenkinsfile is setup with a node directive:</p>
  
  <pre><code>node {
      stage 'Checkout'
          checkout scm
  
      stage 'Build'
          bat 'nuget restore SolutionName.sln'
          bat "\"${tool 'MSBuild'}\" SolutionName.sln /p:Configuration=Release /p:Platform=\"Any CPU\" /p:ProductVersion=1.0.0.${env.BUILD_NUMBER}"
  
      stage 'Archive'
          archive 'ProjectName/bin/Release/**'
  
  }
  </code></pre>
  
  <p>I haven't been able to find solid documentation on exactly when / why to use each of these. Does anybody have any information on why these differ and when it is appropriate to use either of them?</p>
  
  <p>I'm not sure but I belive the 'node' directive is used in scripted pipeline as opposed to declarative pipeline.</p>
  
  <p>Thanks in advance for any guidance.</p>