Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

    If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

    Child directories not created when using Ensure Package

    Scheduled Pinned Locked Moved Support
    packagesotterproget
    6 Posts 2 Posters 9 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ? This user is from outside of this forum
      Guest
      last edited by

      Hi,

      My environment is:

      • Otter
      • ProGet
      • A target server

      I'm trying to deploy a ProGet package to the target server. This is sort of working, but I'm having issues with the directory structure.

      My ProGet package looks something like:
      <Package Root>
      .\web.config
      .\bin\SomeDLL.dll
      .\Contents\SomeJavaScriptFile.js

      Anything in the root of the ProGet package is created correctly, e.g. the web.config file. However, the job is failing when it gets to the items in sub directories - the sub directory isn't created and so the files don't get extracted.

      If I add in "Ensure Directory" steps for the sub directories, it works - the directories are created and the files are unpacked. So I don't think it's a permission / access problem or similar.

      The packages I'm attempting to deploy are quite big and I don't want to have to create "Ensure Directory" steps for each directory in them - there's hundreds of them.

      The logs I get from Otter aren't much help - it's just "Unhandled exception: System.IO.DirectoryNotFoundException: Could not find a part of the path.
      ".

      I'm new to Otter / ProGet / UPack, but can't see anything in the documentation relating to this.

      Any help appreciated!

      Thanks,

      Andrew

      Product: Otter
      Version: 1.7.2

      1 Reply Last reply Reply Quote 0
      • benB Offline
        ben inedo-engineer
        last edited by

        Hello Andrew,

        I can't reproduce this locally. How are you creating the upack archive? Could you send me an example of a upack file that exhibits this behavior?

        My guess is that the upack file has backslash path separators and that is confusing the InedoCore extension somehow.

        1 Reply Last reply Reply Quote 0
        • benB Offline
          ben inedo-engineer
          last edited by

          My initial guess was wrong. The problem was that Ensure-Package assumed all directories would be explicitly listed in the archive. I've filed the issue as https://github.com/Inedo/inedox-inedocore/issues/45 and submitted a fix for my co-workers to review.

          As a workaround until this fix is released, the upack command can create a upack archive in the format that it expects.

          1 Reply Last reply Reply Quote 0
          • ? This user is from outside of this forum
            Guest
            last edited by

            Thanks Ben!

            You mentioned...
            "As a workaround until this fix is released, the upack command can create a upack archive in the format that it expects"

            I've taken a look through the documentation (and source code...) for the upack command, and I'm afraid I can't see a way to use it that will result in the issue not occurring - as far as I can tell, the native C# commands to create / read zip files are being used, and there doesn't seem to be any scope in there for including directory information - it's just file information?

            Have I missed something? If I need to wait for the next release, that's not a major problem, but if there is anything I can do to get up and running now, that would be great...

            Thanks again, appreciate the help and time!

            Andrew

            1 Reply Last reply Reply Quote 0
            • ? This user is from outside of this forum
              Guest
              last edited by

              The latest InedoCore extension (v1.7.1) from the Admin > Extensions page should contain this fix.

              1 Reply Last reply Reply Quote 0
              • ? This user is from outside of this forum
                Guest
                last edited by

                That works - awesome - thank you so much!

                1 Reply Last reply Reply Quote 0

                Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                With your input, this post could be even better 💗

                Register Login
                • 1 / 1
                • First post
                  Last post
                Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation