젠킨스 파이프 라인 내부에서 curl
명령을 사용하여 ftp로 일부 파일을 업로드하고 싶습니다.Jenkins via curl은 가끔씩 만 작동합니다.
sh "curl --verbose -T my.file --proxytunnel --proxy http://${PROXY_USER}:${PROXY_PASS}@MYPROXY:MYPROXYPORT ftp://${AZURE_USER}:${AZURE_PASS}@MYSITE.ftp.azurewebsites.windows.net/site/wwwroot/"
때때로, 나는 연속 젠킨스에 - 버튼을 "빌드"5 번을 클릭하고 모든 5 성공적으로 빌드 : 내가 사용하는 명령은 다음과 같습니다. 그런 다음 10 분 후에 다시 빌드 버튼을 클릭하면 Jenkins Job 내부에서 아무 것도 변경하지 않고 5 번 연속 실패합니다!
그래서 때때로 어떤 종류의 세션이 캐시되고 때로는 그렇지 않은 것처럼 보입니다. 하지만 어떤 종류의 세션인지 알지 못합니다. 왜냐하면 {http|https|ftp|no}_proxy
, PROXY_USER
및 AZURE_USER
을 설정했기 때문입니다.
* About to connect() to proxy MYPROXY port 80 (#0)
* Trying 1.2.3.4... connected
* Connected to MYPROXY (1.2.3.4) port 80 (#0)
* Establish HTTP proxy tunnel to MYSITE.ftp.azurewebsites.windows.net:21
* Proxy auth using Basic with user '****'
* Server auth using Basic with user 'MYUSER\****'
> CONNECT MYSITE.ftp.azurewebsites.windows.net:21 HTTP/1.1
> Host: MYSITE.ftp.azurewebsites.windows.net:21
> Proxy-Authorization: Basic xxx-xxx-xxx
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.27.1 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Proxy-Connection: Keep-Alive
>
< HTTP/1.1 200 Connection Established
< Proxy-Agent: Zscaler/6.0
<
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Proxy replied OK to CONNECT request
< 220 Microsoft FTP Service
> USER MYUSER\****
< 331 Password required
> PASS ****
< 230 User logged in.
> PWD
< 257 "/" is current directory.
* Entry path is '/'
> CWD site
< 250 CWD command successful.
> CWD wwwroot
< 250 CWD command successful.
> EPSV
* Connect data stream passively
< 229 Entering Extended Passive Mode (|||10201|)
* Trying 1.2.3.4... connected
* Connecting to MYSITE.ftp.azurewebsites.windows.net (1.2.3.4) port 80
* Establish HTTP proxy tunnel to MYSITE.ftp.azurewebsites.windows.net:10201
* Proxy auth using Basic with user '****'
* Server auth using Basic with user 'MYUSER\****'
> CONNECT MYSITE.ftp.azurewebsites.windows.net:10201 HTTP/1.1
> Host: MYSITE.ftp.azurewebsites.windows.net:10201
> Proxy-Authorization: Basic xxxxx
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.27.1 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Proxy-Connection: Keep-Alive
>
< HTTP/1.1 200 Connection Established
< Proxy-Agent: Zscaler/6.0
<
0 0 0 0 0 0 0 0 --:--:-- 0:00:02 --:--:-- 0* Proxy replied OK to CONNECT request
> TYPE I
< 200 Type set to I.
> STOR web.config
< 150 Opening BINARY mode data connection.
} [data not shown]
104 521 0 0 104 521 0 201 0:00:02 0:00:02 --:--:-- 204* Remembering we are in dir "site/wwwroot/"
104 521 0 0 104 521 0 145 0:00:03 0:00:03 --:--:-- 146
104 521 0 0 104 521 0 113 0:00:04 0:00:04 --:--:-- 114
104 521 0 0 104 521 0 93 0:00:05 0:00:05 --:--:-- 93
104 521 0 0 104 521 0 79 0:00:06 0:00:06 --:--:-- 128
104 521 0 0 104 521 0 68 0:00:07 0:00:07 --:--:-- 0
104 521 0 0 104 521 0 60 0:00:08 0:00:08 --:--:-- 0
104 521 0 0 104 521 0 54 0:00:09 0:00:09 --:--:-- 0
104 521 0 0 104 521 0 49 0:00:10 0:00:10 --:--:-- 0
104 521 0 0 104 521 0 44 0:00:11 0:00:11 --:--:-- 0
104 521 0 0 104 521 0 41 0:00:12 0:00:12 --:--:-- 0
104 521 0 0 104 521 0 38 0:00:13 0:00:13 --:--:-- 0
104 521 0 0 104 521 0 35 0:00:14 0:00:14 --:--:-- 0
104 521 0 0 104 521 0 33 0:00:15 0:00:15 --:--:-- 0
104 521 0 0 104 521 0 31 0:00:16 0:00:16 --:--:-- 0
104 521 0 0 104 521 0 29 0:00:17 0:00:17 --:--:-- 0
104 521 0 0 104 521 0 28 0:00:18 0:00:18 --:--:-- 0
104 521 0 0 104 521 0 26 0:00:20 0:00:19 0:00:01 0
104 521 0 0 104 521 0 25 0:00:20 0:00:20 --:--:-- 0
104 521 0 0 104 521 0 24 0:00:21 0:00:21 --:--:-- 0
104 521 0 0 104 521 0 23 0:00:22 0:00:22 --:--:-- 0
104 521 0 0 104 521 0 22 0:00:23 0:00:23 --:--:-- 0
104 521 0 0 104 521 0 21 0:00:24 0:00:24 --:--:-- 0
104 521 0 0 104 521 0 20 0:00:26 0:00:25 0:00:01 0
104 521 0 0 104 521 0 19 0:00:27 0:00:26 0:00:01 0
104 521 0 0 104 521 0 18 0:00:28 0:00:27 0:00:01 0
104 521 0 0 104 521 0 18 0:00:28 0:00:28 --:--:-- 0
104 521 0 0 104 521 0 17 0:00:30 0:00:29 0:00:01 0
104 521 0 0 104 521 0 17 0:00:30 0:00:30 --:--:-- 0
104 521 0 0 104 521 0 16 0:00:32 0:00:31 0:00:01 0
104 521 0 0 104 521 0 15 0:00:34 0:00:32 0:00:02 0
104 521 0 0 104 521 0 15 0:00:34 0:00:33 0:00:01 0
104 521 0 0 104 521 0 15 0:00:34 0:00:34 --:--:-- 0
104 521 0 0 104 521 0 14 0:00:37 0:00:35 0:00:02 0
104 521 0 0 104 521 0 14 0:00:37 0:00:36 0:00:01 0
104 521 0 0 104 521 0 13 0:00:40 0:00:37 0:00:03 0
104 521 0 0 104 521 0 13 0:00:40 0:00:38 0:00:02 0
104 521 0 0 104 521 0 13 0:00:40 0:00:39 0:00:01 0
104 521 0 0 104 521 0 12 0:00:43 0:00:40 0:00:03 0< 425 Data channel timed out.
* server did not report OK, got 425
104 521 0 0 104 521 0 12 0:00:43 0:00:40 0:00:03 0* Connection #0 to host MYPROXY left intact
curl: (18) server did not report OK, got 425
> QUIT
< 221 Goodbye.
* Closing connection #0
당신이 어떤 생각을 가지고 있습니까 : 빌드가 실패하면 다음
는 오류 메시지는?
명시 적 수동 모드'--ftp-pasv' 및/또는'--ftp-skip-pasv-ip'로 시도해 보셨습니까? – randomir
Btw, 하나 빠졌습니다. 기본 프록시 인증 creds .. – randomir
@randomir이 args와 동일한 동작 : 때때로 작동하지 않는 경우가 있습니다. 방금 알아 챘습니다. 원격 사이트를 들여다 보면 파일이 잠시 동안 나타나고 사라지는 것을 볼 수 있습니다. // 하나의 기본 프록시 인증 creds *로 당신은 무엇을 의미합니까? – Munchkin