Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-60231

Jenkins does not update Jenkinsfile when it was updated


      Hello Support team,

      I'm running jenkins 2.190.2 on a openshift cluster 3.10 and I'm recently experimenting Jenkins to deploy our applications into our openshift cluster. So, during my testing phases on Jenkins I have created a simple jenkinsfile and put it into a github repository. Then I configure Jenkins and SCM plugin to retrieve my Jenkinsfile but now, when I make some changes into the jenkinsfile and run a new job. Jenkins didn't try to pull the latest version of my jenkinsfile and still using the old one.

      Can you help me to understand why ?

      I make some research over internet and I tried a lot of things but I have the same problem. I have to delete manually my workspace (connect to jenkins container and rm -rf workspace folder).

      • I tried to install Workspace cleanup and Build Environment plugins but I don't show the option (checkbox) "Clear Workspace before running job" in the settings of my pipeline.
      • I tried to add a post step into my jenkinsfile to always call the function cleanWs() but same result old jenkinsfile is used.
      • I tried to configure manually Additional Behaviours in SCM configuration but it's not persisted because I'm using openshift-sync-plugin which override pipeline configuration.


      Here you can find my testing jenkinsfile

      pipeline {
        agent {
          kubernetes {
            cloud 'openshift-eu'
            label 'jnlp'
        stages {
          stage('Checkout code') {
            steps {
              git branch: "rbe-tests", 
              url: "https://github.com/thedigitalstudio/samquote-api-tests.git",
              credentialsId: "eb-cicd-eu-dev-axa-ebp-fr-jenkins-git-credentials"
          stage('Test A') { 
            steps {
              container('busybox') {
                sh "echo 'Hello world'"
                sh "echo 'sleep 3600'"
                sh "ls -la"
                sh "cat Jenkinsfile"
        post { 
          always { 

      Best regards,

      Thanks you


            Unassigned Unassigned
            rayanebel Rayane BELLAZAAR
            2 Vote for this issue
            3 Start watching this issue