병렬 스레드 패브릭 명령에 대한 Jenkins 실시간 콘솔 출력 [닫힘]

다음과 같이 여러 호스트에서 병렬로 실행되는 Python 패브릭 명령이 있습니다.

$ fab --hosts=prod1.server,prod2.server,prod3.server --parallel copy_cache

캐시가 병렬로 나열된 프로덕션 서버에 복사됩니다. XXgig 캐시 디렉토리에 몇 시간이 걸릴 수 있으므로 프로세스 전체에서 발생하는 다양한 로깅이 있습니다. 복사가 동시에 수행되므로 명령 행에서 실행될 때 출력이 실시간으로 인터레이스됩니다.

[prod1.server] Executing task 'nginx_cache_copy'
[prod2.server] Executing task 'nginx_cache_copy'
[prod3.server] Executing task 'nginx_cache_copy'
2014-09-16 10:02:29.688243
[prod1.server] INFO: rsyncing cache dir
[prod1.server] run: rsync -a -q cache.server:"repo/cache/some.site.com" \
                                             "repo/cache/."
2014-09-16 10:02:29.716345
[prod2.server] INFO: rsyncing cache dir
[prod2.server] run: rsync -a -q cache.server:"repo/cache/some.site.com" \
                                             "repo/cache/."
2014-09-16 10:02:29.853275
[prod3.server] INFO: rsyncing cache dir
[prod3.server] run: rsync -a -q cache.server:"repo/cache/some.site.com" \
                                             "repo/cache/."
2014-09-16 10:02:29.984154
[prod1.server] INFO: Reloading nginx config
[prod1.server] run: sbin/nginx -s reload -c "repo/nginx.conf"
2014-09-16 10:02:30.025155
[prod2.server] INFO: Reloading nginx config
[prod2.server] run: sbin/nginx -s reload -c "repo/nginx.conf"
2014-09-16 10:02:30.100169
[prod1.server] SUCCESS: CACHE COPY COMPLETE

2014-09-16 10:02:30.181938
[prod2.server] SUCCESS: CACHE COPY COMPLETE

2014-09-16 10:02:30.331402
[prod3.server] INFO: Reloading nginx config
[prod3.server] run: sbin/nginx -s reload -c "repo/nginx.conf"
2014-09-16 10:02:30.559271
[prod3.server] SUCCESS: CACHE COPY COMPLETE

Done.

그러나 Jenkins를 통해 작업을 실행하는 경우 Jenkins는 모든 스레드가 완료되면 스레드가 결합 된 후에 Jenkins가 출력을 그룹화하므로 모든 작업이 완료 될 때까지 콘솔 출력이 표시되지 않습니다. 따라서 모든 명령이 완료되면 출력은 다음과 같습니다.

[prod1.server] Executing task 'nginx_cache_copy'
2014-09-16 10:02:29.688243
[prod1.server] INFO: rsyncing cache dir
[prod1.server] run: rsync -a -q cache.server:"repo/cache/some.site.com" \
                                             "repo/cache/."
2014-09-16 10:02:29.984154
[prod1.server] INFO: Reloading nginx config
[prod1.server] run: sbin/nginx -s reload -c "repo/nginx.conf"
2014-09-16 10:02:30.100169
[prod1.server] SUCCESS: CACHE COPY COMPLETE

[prod2.server] Executing task 'nginx_cache_copy'
2014-09-16 10:02:29.716345
[prod2.server] INFO: rsyncing cache dir
[prod2.server] run: rsync -a -q cache.server:"repo/cache/some.site.com" \
                                             "repo/cache/."
2014-09-16 10:02:30.025155
[prod2.server] INFO: Reloading nginx config
[prod2.server] run: sbin/nginx -s reload -c "repo/nginx.conf"
2014-09-16 10:02:30.181938
[prod2.server] SUCCESS: CACHE COPY COMPLETE

[prod3.server] Executing task 'nginx_cache_copy'
2014-09-16 10:02:29.853275
[prod3.server] INFO: rsyncing cache dir
[prod3.server] run: rsync -a -q cache.server:"repo/cache/some.site.com" \
                                             "repo/cache/."
2014-09-16 10:02:30.331402
[prod3.server] INFO: Reloading nginx config
[prod3.server] run: sbin/nginx -s reload -c "repo/nginx.conf"
2014-09-16 10:02:30.559271
[prod3.server] SUCCESS: CACHE COPY COMPLETE

Done.

이것은 더 읽기 쉽지만 콘솔 출력을 실시간으로 읽어 프로세스의 상태를 추적하고 싶기 때문에 이상적이지 않습니다. 이 직물 명령이 실행될 때주의 하지 않고--parallel 옵션 콘솔 출력이 실시간으로 발생합니까는 시리얼 프로세스가 실행하는 데 훨씬 더 오래 걸리기 때문에, 그러나 분명히이 가능한 없습니다.

Jenkins 에서이 스레드 그룹을 비활성화하는 설정을 찾을 수 없었습니다. 누구든지 아이디어가 있습니까?



답변