title: Jenkins: Unknown stage section "matrix" in declarative pipeline
body: <p>I am new to jenkins and I try to build a declarative pipeline according to the tutorial.
  On the page: <a href="https://jenkins.io/doc/book/pipeline/syntax/#matrix-cell-directives" rel="nofollow noreferrer">https://jenkins.io/doc/book/pipeline/syntax/#matrix-cell-directives</a>
  there is an example on how to build a pipeline with a matrix which I tried.</p>
  
  <p>Unfortunately I get the following error:</p>
  
  <pre><code>WorkflowScript: 32: Unknown stage section "matrix". Starting with version 0.5, steps in a stage must be in a ‘steps’ block. @ line 32, column 5.
         stage ('Deploy NB') {
         ^
  
  WorkflowScript: 32: Expected one of "steps", "stages", or "parallel" for stage "Deploy NB" @ line 32, column 5.
         stage ('Deploy NB') {
  </code></pre>
  
  <p>My pipeline in the jenkinsfile looks like this:
  The functions from the lib are surely without any problems because they are used in several other jenkinsfiles which run without problems.</p>
  
  <pre><code>pipeline {
  
    agent {
      node {
        label ""
        // Location of the output files 
        customWorkspace "/home/wf/builds/${env.JOB_NAME}"
      }
    }
  
    environment {
        // mail addresses that gets notifications about failures, success etc., - comma delimited
        MAIL_NOTIFY = "mustbeanonymous"
  
        // Server admin (not necessary for wildfly)
        ADMIN_USER = " "
        ADMIN_PWD = " "
  
        // home directory
        HOME_DIR = "/home/wf"
  
        // Product name
        PRODUCT_NAME = "MYPRD"
     }
  
    options {
      disableConcurrentBuilds() 
      durabilityHint("PERFORMANCE_OPTIMIZED")
    }
  
    stages {
      stage ('Deploy NB') {
        matrix {
          axes {
             axis {
               name 'ENVIRONMENT'
               values 'NB', 'TEST1'
             }
             axis {
               name 'DATABASE'
               values 'ORA', 'ORA_INIT', 'DB2', 'DB2_INIT'
             }
          }
  
          environment {
            // Server scripts installation path
            SERVER_PATH = "${HOME_DIR}/WildFly16_${PRODUCT_NAME}_${ENVIRONMENT}_${DATABASE}"
            // EAR to deploy on server
            DEPLOY_EAR = "${PRODUCT_NAME}_WF_${DATABASE}.ear"
          }
  
          stages {
            /* BUILD */
            stage('Init tools') {
              steps {
                script {
                  def lib = load "${workspace}/build/Jenkinsfile.lib"
                  lib.initTools()    
                }
              }
            }
  
            stage('Copy Deployment') {
              steps {
                script {
                  def lib = load "${workspace}/build/Jenkinsfile.lib"
                  lib.copyDeployment()    
                }
              }
            }
  
            /* DEPLOY */
            stage('Install EAR') {
              steps {
                script {
                    def lib = load "${workspace}/build/Jenkinsfile.lib"
                    lib.installEARDeploy()    
                }
              }
            }
          }
        }
      }
    }
  
  
    /* POST PROCESSING */
    post {  
       success {  
          script {
              def lib = load "${workspace}/build/Jenkinsfile.lib"
              lib.onSuccess()    
          }
       }  
       failure {  
          script {
              def lib = load "${workspace}/build/Jenkinsfile.lib"
              lib.onFailure()    
          }
       }  
       unstable {  
          script {
              def lib = load "${workspace}/build/Jenkinsfile.lib"
              lib.onUnstable()    
          }
       }  
       always {
          script {
              def lib = load "${workspace}/build/Jenkinsfile.lib"
              lib.onAlways()    
          }
       }
     }              
  }
  </code></pre>
  
  <p>What I try to achieve is that the pipeline runs for every ENVIRONMENT and DATABASE (each cell) and executes the stages. <strong>But where did I make a mistake?</strong></p>
  
  <p>I use Jenkins: 2.198</p>
  
  <p>Update: The solution was to upgrade the plugin to a version above 1.5.0. See accepted answer for more information.</p>