Harvest

 View Only
  • 1.  Build processes

    Posted Nov 12, 2019 07:28 AM
    Hi,

    I am trying to implement automated build processes (eg. when you promote a program to the next stge, save the source on some external server, do a compile, and present the initiator of the promote with the results of the compile).

    I am guessing this would by done with UDP and I'm trying really hard to figure out how it works, but I am still very new to Harvest and would really appreciate some pointers, advice, or reference documentation on this subject matter.

    Thank you,
    Jarus


  • 2.  RE: Build processes

    Posted Nov 13, 2019 03:43 PM
    ​Jarus,

    I guess there are several methods can be used for this build process. You can schedule harsync to synchronize the file system with repository before running build and compile process or for real time with each promote post UDP can just send (ftp/scp) a simple trigger file to target server. On the server side you watch this trigger file and call your build/compile script.
    Thanks


  • 3.  RE: Build processes

    Posted Nov 22, 2019 11:12 AM
    Hi,

    We are doing what you need following this procedure:
    1) First, we have a 'Merge' state in Harvest and when the developer approves the package with the source files, the approval proccess has a post link that executes a build script.
    2) The build script copies the source files with hsync command to a build server with maven installed.
    3) Then it executes maven to compile.
    4) Finally we upload the compiled files to the same package with hci command
    5) The package is ready to be implemented.

    Hope this helps.

    Regards,
    Facundo


  • 4.  RE: Build processes

    Posted Jul 20, 2020 07:29 AM
    Hi Facundo,

    That sounds like a plan that might work. I will even use hci to check in the results of the build (compiler output etc). How did you manage to trigger the build script from the post link?

    Regards,
    Jarus



  • 5.  RE: Build processes

    Posted Jul 20, 2020 09:05 AM
    Never mind, I got it working using a UDP on the server. Is it possible to run an UDP on a machine other that the server (i.e. running an agent)?


  • 6.  RE: Build processes
    Best Answer

    Posted Jul 20, 2020 09:53 AM
    Jarus,

    You have to use hexecp to run a command on an agent:.
    For example
    hexecp -prg "mvn clean install -f c:\tmp\app1\pom.xml" -syn -rport 1234 -er YourCredentialFile.dfo -m SERVERNAME

    Regards,
    Facundo


  • 7.  RE: Build processes

    Posted Dec 07, 2020 08:14 AM
    Thanks Facundo, it works like a charm.