Anuj chourasiya
Anuj chourasiya

Reputation: 53

Jenkins console output not printing anything between start and end of pipeline

I have created a new job in Jenkins using pipeline. After this I have provided Gitlab project url and Jenkinsfile path in SCM. While building the pipeline I am not able to see any message between start pipeline and end pipeline. While putting invalid code to JenkinsFile, build is failing but when running simple command like echo its not printing anything to console. Is there anything I am missing?

Console Output

[Pipeline] Start of Pipeline
[Pipeline] End of Pipeline
Finished: SUCCESS

Jenkinsfile

pipeline {
agent any
    stages {
        stage ('Build') {
            steps {
                echo
                'Running build phase. '
            }
        }
    }
}

console output Jenkinsfile code

Upvotes: 5

Views: 6465

Answers (2)

Aman Chourasiya
Aman Chourasiya

Reputation: 1228

I would suggest to install all the required plugins and then restart your Jenkins server and if you are running this locally then a system restart might be helpful.

Upvotes: 3

VonC
VonC

Reputation: 1324258

For testing, try the same echo in a scripted pipeline block:

        steps { 
            script {
                echo 'Running build phase. '
            }
        }

Upvotes: 1

Related Questions