Class BuildSyncRunListener

  • All Implemented Interfaces:
    ExtensionPoint

    @Extension
    public class BuildSyncRunListener
    extends RunListener<Run>
    Listens to Jenkins Job build Run start and stop then ensure there's a suitable Build object in OpenShift thats updated correctly with the current status, logsURL and metrics
    • Constructor Detail

      • BuildSyncRunListener

        public BuildSyncRunListener()
      • BuildSyncRunListener

        @DataBoundConstructor
        public BuildSyncRunListener​(long pollPeriodMs)
    • Method Detail

      • joinPaths

        public static String joinPaths​(String... strings)
        Joins all the given strings, ignoring nulls so that they form a URL with / between the paths without a // if the previous path ends with / and the next path starts with / unless a path item is blank
        Parameters:
        strings - the sequence of strings to join
        Returns:
        the strings concatenated together with / while avoiding a double // between non blank strings.
      • checkTimerStarted

        protected void checkTimerStarted()
      • pollLoop

        protected void pollLoop()
      • pollRun

        protected boolean pollRun​(Run run)
      • shouldPollRun

        protected boolean shouldPollRun​(Run run)
        Returns true if we should poll the status of this run
        Parameters:
        run - the Run to test against
        Returns:
        true if the should poll the status of this build run