Day 77 Jenkins deploy pipeline

This is the pipeline code and also uploaded screenshots.





Why is happening this issue?

  • seems like jenkins job is not configured correctly to deploy latest code from git repository!

Kindly help.

pipeline {
agent { label ‘ststor01’ }

stages {
    stage('Deploy') {
        steps {
            echo 'Deploying web_app to /var/www/html...'
            dir('/var/www/html') {
                sh '''
                    git reset --hard
                    git clean -fd
                    git pull origin master
                '''
            }
        }
    }
}

}

TBH, I’m clear what you problem is with the task based in the information you’ve supplied. Please look over this particular solution and see if it puts you on the right track.

1 Like