Access D drive in Windows Server 2019

Derek Smart's Avatar

Derek Smart

31 Jul, 2019 02:45 PM

I've tried a few different ways to unzip an archive and then change directories to the D drive and have not had any success. What is the proper way to put and access files on the D drive for Windows Server 2019? None of the following work.

cd /d
cd /mnt/d
cd D:\

  1. 1 Posted by Ilya Finkelshte... on 31 Jul, 2019 11:50 PM

    Ilya Finkelshteyn's Avatar

    Hi Derek,

    Do you mean accessing it from the build script, or from inside Docker container? Does this sample works for you?

    Ilya.

  2. 2 Posted by Derek Smart on 01 Aug, 2019 12:47 PM

    Derek Smart's Avatar

    I looked at the sample and is how I came to the conclusion that I needed to work on the D drive.

    https://github.com/mcred/appveyor-test/blob/master/appveyor.yml

    Our build process launches docker containers from gradle and uses PWD to mount a volume to the container. We're trying to extract our archive to D, change directories to D and then run gradle, but we're not able to change directories into D.

    https://ci.appveyor.com/project/mcred/appveyor-test/builds/26399558

  3. 3 Posted by Ilya Finkelshte... on 02 Aug, 2019 07:47 AM

    Ilya Finkelshteyn's Avatar

    I see, indeed I can repro this. Need to investigate more. For now, can you try to run it directly? Like this:

    test_script:
      - D:\titan-server-develop-d6a87c56159bf39205f979d493d71b594973e476\gradlew assemble endtoendTest
    

    Let us know if this works for you.

  4. 4 Posted by Derek Smart on 02 Aug, 2019 01:48 PM

    Derek Smart's Avatar

    Thanks for the suggestion. It did not work as expected, though. I think that it will work to trigger gradle, but gradle is still looking at the current working directory for the build definitions.

    https://ci.appveyor.com/project/mcred/appveyor-test/builds/26428859

  5. 5 Posted by Ilya Finkelshte... on 06 Aug, 2019 02:50 AM

    Ilya Finkelshteyn's Avatar

    Oh sorry, I just forgot to use one command, e.g. D:. I did not test with your config but this works:

    - ps: |
        mkdir D:\host | Out-Null
        echo 1 > d:\host\1
        d: # missed one <<<<<<<<<<<<<<<<<<<<
        cd d:\host
        dir
    
  6. 6 Posted by Derek Smart on 06 Aug, 2019 08:57 PM

    Derek Smart's Avatar

    Thank you! That little command got my scripts running.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac