Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • vapenation 21 posts 139 karma points
    Dec 05, 2016 @ 13:54
    vapenation
    0

    How to trigger transfer of content from two umbraco sites using Courier 2

    Hello!

    Our team have two Umbraco installations, TEST and PROD. I've been tasked with setting up an automated deployment process, which simply involves taking all content, media and settings from our TEST Umbraco and installing it on our production environment. This process is to be triggered by the click of a button from Octopos deploy (which in turn would call a c# program which would handle the actual deployment by calling the necessary Umbraco APIs and plugins).

    As my deployment tool, I've decided to use Courier 2. I'm using the trial edition to sync between two sites I've set up locally (UmbracoA.local and UmbracoB.local). I've managed to, using the Courier 2 interface in Backoffice, create a revision on UmbracoA, transfer it to UmbracoB and install it there manually.

    Now I must figure out a way to call the Courier 2 API and trigger these steps automatically. (No user should at any point have to use Backoffice to finalize any process of the deployment).

    Steps to be automated are:

    1. The creation of a revision including all content on Umbraco site A
    2. Transfer of said revision to Umbraco site B
    3. Install of said revision on Umbraco site B

    From what I understand, Courier 2 has a event model to which I can hook my own steps, but I'm simply interested in triggering Courier 2's native events of creating a revision and pushing & installing it on the second site. Surely, this must be a rather simple call to their API?

    As you can imagine, I'm fairly new to both Umbraco and Courier 2, but essentially what I'm looking for is just a code example of how I might call the events to trigger this process.

    Thanks in advance and let me know if I can supply any more info about my scenario that might help you answer my question!!

    Extra info: - Umbraco version 7.5.4 - Courier version 2.52.15

    PS:

    Using revisions in this process is not at all necessary. I just figured it was the easiest way to package everything and push it to another site. If this can be done by just selecting all nodes (pictures, content etc) and deploying them directly, I'm just as happy.

    UPDATE

    I've downloaded the public source code four Courier (https://github.com/umbraco/Courier) but this API seems severely outdated. Does anyone know whether any of this is compatible with the current Courier 2 version and Umbraco 7?

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Dec 06, 2016 @ 21:28
    Dennis Aaen
    0

    Hi vapenation,

    Have you tried see PerĀ“s comment in this thread https://our.umbraco.org/forum/umbraco-pro/courier/70029-courier-api

    Hope this helps,

    /Dennis

  • vapenation 21 posts 139 karma points
    Dec 07, 2016 @ 11:16
    vapenation
    0

    See my reply to Per. I'm still confused as to where I can find compatible DLLs.

Please Sign in or register to post replies

Write your reply to:

Draft