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

UI support for milestone and lock

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Minor
    • blueocean-plugin
    • None

    Description

      It is a common practice to batch changes in a pipeline via milestone/lock [1]. That way, resources are more efficiently used since there is only one instance of each stage running at a time. In practice, the milestone step aborts any instance of a pipeline if another pipeline instance, with new commits on it, reaches the milestone point.

      Currently, blue-ocean shows the steps that run on the pipeline in green, then the ones that didn't run on that instance (since a newer one hit the milestone) are rendered as grey. Users that need to track where in the pipeline their change is need to close their pipeline instance page, then manually look for the first non-aborted pipeline instance after.

      Ideally, Jenkins should provide a better way to track where the change is. Maybe show the pipeline stages that are running on a different instance (due to a milestone) in grey, but as running? Some other way?

      [1] https://jenkins.io/blog/2016/10/16/stage-lock-milestone/

      Technical notes
      CancelledCause contains the data needed to find out what run replaced one that was canceled. CancelledCause is set on the Runs InterruptedBuildAction.

      This pull request should allow the CancelledCause to serialize all the data we need to do the work here.

      Design notes
      The run that does succeed should roll up all the changesets of the aborted runs that came before it since the last non-aborted run. Perhaps we should be doing this for whole series of successful runs?

      Attachments

        1. activity.png
          107 kB
          James Dumay
        2. batch_pipeline.jpg
          35 kB
          Alejandro del Castillo
        3. Blue_Ocean_2.png
          12 kB
          Alejandro del Castillo
        4. Blue-Ocean_1.png
          25 kB
          Alejandro del Castillo
        5. Blue-Ocean_1.png
          49 kB
          Alejandro del Castillo
        6. run.png
          58 kB
          James Dumay

        Issue Links

          Activity

            People

              Unassigned Unassigned
              adelcast Alejandro del Castillo
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated: