How can I fetch file from Urban code Deploy workspace

593 views Asked by At

I have few files in Urbancode Deploy workspace(downloaded from Artifactory). How can I fetch those files into my Java program where I am using those downloaded files in Java program.

I tried like this:

1) I am calling Java class from urbancode deploy shell, where I am passing the file name,username,password and url as arguments to Java class.

2)In my Java class I created http connection to fetch that file with help of arguments.But its failing.

3)If I could fetch file in above is good for me,or else do I need to make rest call to fetch that file(as i am using rest call to urbancode deploy(UCD) to fetch other properties needed) if so how can I?

4)Another approach, Can I send all the files from urbancode deploy to java program through command line arguments? Is that possible to send entire file from UCD to Java class?

1

There are 1 answers

0
Rocky Hai On BEST ANSWER

I have resolved this problem, as accessing a file into my Java code is simply accessing a file from desktop. As my file is on server agent and my java code is also on same server agenet inside JRE. So I just read the file using "currentdirectory/filename". Then I am able to access.