'Jenkins build immediately finish

I have a pipeline written in Jenkins. When I run it, it's like finished Succes right away. And that's it..

For example:

pipeline {
    agent { any }
    stages {
        stage('build') {
            steps {
                echo "Hello World!"
            }
        }
    }
}

In steps is only one: "Start of Pipeline - (no timing in block)"

In console output:

Started by <my_name>

[Pipeline] End of Pipeline

Finished: SUCCESS



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source