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

Multibranch Pipeline's "Periodically if not otherwise run" option not matching job's config.xml value

    XMLWordPrintable

Details

    Description

      When using Mutlibranch Pipelines with either the Bitbucket Server or Git branch sources, the "Periodically if not otherwise run" option in the job configuration in the GUI doesn't seem to correctly get set on the server (in the job's config.xml file). I ran the following code on my Jenkins server and compared it to the actual GUI setting for some of the jobs - rarely did they match up. I changed one job to "2 weeks", "1 week", and other values and the config.xml never changed from "H H * * *" which correlates to "1 day".

      Code I was using to get the config.xml values for that trigger spec:

      Jenkins.instance.getAllItems(org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject).each { it ->
          it.getTriggers().each { it2->
              if(it2.getKey().getDisplayName().contains("Periodically")) {
                  println it.fullName
                  println it2.getValue().getSpec()
                  println "------------------------------"
              }
          }
      }
      return 0
      

       I'm wondering if there's a bug that exists that doesn't actually change the value from the default "1 day"? Although I'm also seeing a job that I just changed from "1 minute" to "4 hours" set to "H/30 * * * *" which correlates to "every 30 minutes" which is incorrect for both the old and the new values that were set in the GUI.

      Jenkins version and plugins version list for reference: 

      Jenkins: 2.289.3
      OS: Linux - 3.10.0-1160.21.1.el7.x86_64
      ---
      ace-editor:1.1
      active-directory:2.25
      analysis-model-api:10.3.1
      anchore-container-scanner:1.0.23
      ansicolor:1.0.0
      ant:1.11
      antisamy-markup-formatter:2.1
      apache-httpcomponents-client-4-api:4.5.13-1.0
      artifactdeployer:1.2
      atlassian-bitbucket-server-integration:3.0.1
      audit-trail:3.10
      authentication-tokens:1.4
      basic-branch-build-strategies:1.3.2
      bitbucket:1.1.29
      bitbucket-build-status-notifier:1.4.2
      bitbucket-oauth:0.10
      bitbucket-push-and-pull-request:2.7.2
      blueocean:1.25.0
      blueocean-autofavorite:1.2.4
      blueocean-bitbucket-pipeline:1.25.0
      blueocean-commons:1.25.0
      blueocean-config:1.25.0
      blueocean-core-js:1.25.0
      blueocean-dashboard:1.25.0
      blueocean-display-url:2.4.1
      blueocean-events:1.25.0
      blueocean-git-pipeline:1.25.0
      blueocean-github-pipeline:1.25.0
      blueocean-i18n:1.25.0
      blueocean-jira:1.25.0
      blueocean-jwt:1.25.0
      blueocean-personalization:1.25.0
      blueocean-pipeline-api-impl:1.25.0
      blueocean-pipeline-editor:1.25.0
      blueocean-pipeline-scm-api:1.25.0
      blueocean-rest:1.25.0
      blueocean-rest-impl:1.25.0
      blueocean-web:1.25.0
      bootstrap4-api:4.6.0-3
      bootstrap5-api:5.1.1-1
      bouncycastle-api:2.25
      branch-api:2.7.0
      build-pipeline-plugin:1.5.8
      build-timestamp:1.0.3
      build-user-vars-plugin:1.8
      built-on-column:1.1
      caffeine-api:2.9.2-29.v717aac953ff3
      checks-api:1.7.2
      clearcase:1.6.8
      cloudbees-bitbucket-branch-source:2.9.11
      cloudbees-disk-usage-simple:0.10
      cloudbees-folder:6.16
      cobertura:1.16
      code-coverage-api:1.4.1
      command-launcher:1.6
      conditional-buildstep:1.4.1
      config-file-provider:3.8.1
      configuration-as-code:1.53
      copyartifact:1.46.2
      credentials:2.6.1
      credentials-binding:1.27
      cvs:2.19
      dashboard-view:2.17
      data-tables-api:1.11.2-1
      declarative-pipeline-migration-assistant:1.5.1
      declarative-pipeline-migration-assistant-api:1.5.1
      description-setter:1.10
      disk-usage:0.28
      display-url-api:2.3.5
      docker-build-publish:1.3.3
      docker-build-step:2.8
      docker-commons:1.17
      docker-traceability:1.2
      docker-workflow:1.26
      downstream-build-cache:1.6
      dtkit-api:3.0.0
      durable-task:1.39
      echarts-api:5.1.2-11
      email-ext:2.83
      emailext-template:1.2
      embeddable-build-status:2.0.3
      envinject:2.4.0
      envinject-api:1.7
      extended-choice-parameter:0.82
      extended-read-permission:3.2
      external-monitor-job:1.7
      favorite:2.3.3
      file-operations:1.11
      font-awesome-api:5.15.4-1
      forensics-api:1.4.0
      fortify:21.1.36
      fortify-on-demand-uploader:6.1.0
      fstrigger:0.41
      generic-webhook-trigger:1.77
      git:4.8.2
      git-client:3.10.0
      git-server:1.10
      github:1.34.1
      github-api:1.133
      github-branch-source:2.11.3
      golang:1.4
      handlebars:3.0.8
      handy-uri-templates-2-api:2.1.8-1.0
      htmlpublisher:1.25
      http_request:1.11
      jackson2-api:2.12.4
      javadoc:1.6
      jdk-tool:1.5
      jenkins-design-language:1.25.0
      jenkins-multijob-plugin:1.36
      jira:3.6
      jjwt-api:0.11.2-9.c8b45b8bb173
      job-dsl:1.77
      job-restrictions:0.8
      jobConfigHistory:2.28.1
      jqs-monitoring:1.4
      jquery:1.12.4-1
      jquery-detached:1.2.1
      jquery3-api:3.6.0-2
      jsch:0.1.55.2
      junit:1.53
      kubernetes:1.30.1
      kubernetes-client-api:5.4.1
      kubernetes-credentials:0.9.0
      label-linked-jobs:6.0.1
      ldap:2.7
      lockable-resources:2.11
      log-parser:2.1
      mailer:1.34
      mapdb-api:1.0.9.0
      matlab:2.7.0
      matrix-auth:2.6.8
      matrix-project:1.19
      mattermost:3.1.1
      maven-plugin:3.13
      mentor-questa-vrm:1.13
      mercurial:2.15
      metrics:4.0.2.8
      momentjs:1.1.1
      monitoring:1.88.0
      msbuild:1.30
      mstest:1.0.0
      mstestrunner:1.3.0
      multiple-scms:0.8
      next-build-number:1.7
      nexus-artifact-uploader:2.13
      nexus-jenkins-plugin:3.11.20210920-123737.0869e33
      okhttp-api:3.14.9
      pam-auth:1.6
      parameterized-trigger:2.41
      parasoft-findings:10.5.0
      pipeline-build-step:2.15
      pipeline-github-lib:1.0
      pipeline-githubnotify-step:1.0.5
      pipeline-graph-analysis:1.11
      pipeline-input-step:2.12
      pipeline-milestone-step:1.3.2
      pipeline-model-api:1.9.2
      pipeline-model-definition:1.9.2
      pipeline-model-extensions:1.9.2
      pipeline-rest-api:2.19
      pipeline-stage-step:2.5
      pipeline-stage-tags-metadata:1.9.2
      pipeline-stage-view:2.19
      pipeline-utility-steps:2.10.0
      plain-credentials:1.7
      plot:2.1.9
      plugin-util-api:2.5.0
      popper-api:1.16.1-2
      popper2-api:2.10.1-1
      postbuild-task:1.9
      powershell:1.6
      publish-over:0.22
      publish-over-ssh:1.22
      pubsub-light:1.16
      read-only-configurations:1.10
      rebuild:1.32
      release:2.11
      robot:3.0.1
      run-condition:1.5
      saml:2.0.8
      scm-api:2.6.5
      script-security:1.78
      snakeyaml-api:1.29.1
      sonar:2.13.1
      sse-gateway:1.24
      ssh-agent:1.23
      ssh-credentials:1.19
      ssh-slaves:1.33.0
      ssh-steps:2.0.0
      sshd:3.1.0
      stashNotifier:1.20
      structs:1.23
      subversion:2.14.5
      swarm:3.28
      synopsys-coverity:3.0.1
      text-finder:1.16
      thinBackup:1.10
      timestamper:1.13
      token-macro:266.v44a80cf277fd
      translation:1.16
      trilead-api:1.0.13
      validating-string-parameter:2.8
      variant:1.4
      versionnumber:1.9
      vmanager-plugin:3.1.5
      warnings-ng:9.5.0
      windows-slaves:1.8
      workflow-aggregator:2.6
      workflow-api:2.46
      workflow-basic-steps:2.24
      workflow-cps:2.94
      workflow-cps-global-lib:2.21
      workflow-durable-task-step:2.40
      workflow-job:2.41
      workflow-multibranch:2.26
      workflow-scm-step:2.13
      workflow-step-api:2.24
      workflow-support:3.8
      xunit:3.0.3
      xvfb:1.2
      yet-another-build-visualizer:1.14

       

      Attachments

        Activity

          There are no comments yet on this issue.

          People

            Unassigned Unassigned
            j17359 Michael Steppe
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: