Allow using the quiet shutdown reason for quiet startup

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Type: New Feature
    • Resolution: Unresolved
    • Priority: Minor
    • Component/s: core
    • Environment:
      The latest and greatest (Jenkins Core v2.283 etc)

      First of all I really love the "shutdown reason" in "Manage Jenkins > prepare for shutdown" (https://www.jenkins.io/changelog/#v2.267)

      Background information: I am doing something like "Jenkins quiet startup" very similar to https://www.praqma.com/stories/jenkins-quiet-startup/

      And so I replaced the old Jenkins.instance.doQuietDown() with Jenkins.instance.doQuietDown(false, 0, 'Starting up Jenkins in quiet mode to prevent starting any builds: presumably Reinhold is just upgrading Jenkins...') (in my "init.groovy.d" script), i.e. to provide a generic reason.

      However, before I restart Jenkins (automated via Ansible based updates etc) I am actually always setting a specific shutdown reason that I would like to re-use after restart (for this so-called quiet startup mode):

      • I think the cheapest possibility would be, if it were persisted right before shutdown (into maybe something like a special hidden file ".last.shutdown.reason"), so that e.g. my "init.groovy.d" script could just read it from there and re-use/re-set it during startup

       

      (Naive/dumb question: What is the concrete behaviour when using 'block'?)

            Assignee:
            Unassigned
            Reporter:
            Reinhold Füreder
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: