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

Allow using the quiet shutdown reason for quiet startup

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Minor Minor
    • core
    • None
    • 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'?)

            Unassigned Unassigned
            reinholdfuereder Reinhold Füreder
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: