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

Feature to utilise build number from a job instead of agent ID when creating Cloudwatch logs

XMLWordPrintable

      As an engineer

      I want an option to utilise build number from job instead of agent ID in the creation of logs

      So that the agent logs are more easily identifiable from a build.

       

      Background:

      When using k8s slaves through the k8s cloud plugin the agent ID is ephemeral and not durable across reboots. Agents are created on demand by the k8s plugin and are given and ordinal number by Jenkins which resets to 1 on each restart meaning that the more durable log state in Cloudwatch becomes confused where the next agent number may be less than the previous one if the Jenkins master has been restarted.

       

      Adding a feature to use the BUILD_NUMBER instead of the agent ID makes the logs predictable and easily referrable back to jenkins and across logs created by the master.

       

      This is a major benefit if staff are not provided with access to the Jenkins server directly if it is used for GitOps kinds of operations and it is then trivial to generate a URL in the log with a predicable URL based upon the job name and the BUILD ID, something which can then be sent to a message channel to gain feedback if the user only has access to the message channel and the Cloudwatch logs.

            jglick Jesse Glick
            iamasmith Andy
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: