Uploaded image for project: 'Red Hat CodeReady Studio (devstudio)'
  1. Red Hat CodeReady Studio (devstudio)
  2. JBDS-4233 Migrate jbosstools, devstudio, and release process jobs to Central CI
  3. JBDS-4297

ensure downstream jobs can trigger via script & token or set up downstream groovy listener

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Done
    • Icon: Major Major
    • 10.4.0.AM1
    • 10.4.0.AM1
    • build
    • None
    • devex #128 February 2017, devex #131 April 2017
    • NEW

      Seems that Bos MW can't see CCI:

      20:57:25 + curl 'https://dev-platform-jenkins.rhev-ci-vms.eng.rdu2.redhat.com/job/devstudio.rpm_10.0.neon/build?token=DEVSTUDIO.RPM'
      20:57:25 curl: (7) couldn't connect to host

      https://jenkins.hosts.mwqe.eng.bos.redhat.com/hudson/view/DevStudio/view/devstudio_10.0.neon/job/devstudio.product_10.0.neon/162/console

      So we need another way to hook this up until all jobs can be migrated to CCI.

      Perhaps the listener hook used here will work:

      https://dev-platform-jenkins.rhev-ci-vms.eng.rdu2.redhat.com/view/Devstudio/view/devstudio_master/job/jbosstools-server-Run-Unit-and-ITests_master/

      URL xpath = new URL('http://jenkins.mw.lab.eng.bos.redhat.com/hudson/job/jbosstools-server_master/api/xml?xpath=//lastBuild/number');
      File last = new File('/tmp/${JOB_NAME}_lastBuildNumber.txt'); //println "last.toPath() = " + last.toPath()
      if (last.exists())
      {
        File check = new File('/tmp/${JOB_NAME}_checkBuildNumber.txt'); //println "check.toPath() = " + check.toPath()
        check.delete(); check.createNewFile();
        check << xpath.openStream();
        print "Compare buildNumber = " + check.text + " to lastBuildNumber = " + last.text;
        boolean status = !check.text.equals(last.text);
        java.nio.file.Files.copy(check.toPath(), last.toPath(), java.nio.file.StandardCopyOption.REPLACE_EXISTING);
        return status;
      } else {
        last << xpath.openStream();
        print "Fetch lastBuildNumber = " + last.text;
        return true;
      }
      

              nickboldt Nick Boldt
              nickboldt Nick Boldt
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: