My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions

Issue 1320 attachment: libNetwork.svb (2.0 KB)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
ÿþ'USEUNIT LogManager

'USEUNIT Settings

'USEUNIT libSystem



Option Explicit



Public Function get_build_artifacts(ByVal arguments, ByRef oXML)

On Error Resume Next



Dim sCurrModule : sCurrModule = "[libNetwork->get_build_artifacts]"

Dim sArtPathUrl, sURL, sApp, sCommandLine, oStdOut, oStdErr, iResult



sArtPathUrl = Replace(arguments("artefact_path"), "\", "/")

sURL = "http://convserver/httpAuth/repository/download/" & arguments("magic_number") & "/" & arguments("build_number") & "/" & sArtPathUrl



Call oLogManager.Report(DEBUG_LEVEL, sCurrModule, "Artefact URL: " & sURL)



sApp = oSettings.VAR("TOOLS_PATH") & "wget.exe "

sCommandLine = "-q --http-user=" & Chr(34) & arguments("user") & Chr(34) & " --http-password=" & Chr(34) & arguments("password") & Chr(34) & " --directory-prefix=" & Chr(34) & arguments("dest_folder") & Chr(34) & " " & sURL

iResult = libSystem.CommandLine(sApp, sCommandLine, oStdOut, oStdErr, 300)



get_build_artifacts = iResult



On Error GoTo 0

End Function


Powered by Google Project Hosting