■ ■ ■ ■ ■ ■
src/main/java/io/onedev/agent/DockerExecutorUtils.java
| skipped 326 lines |
327 | 327 | | |
328 | 328 | | if (!successful) |
329 | 329 | | throw new FailedException(); |
330 | | - | |
331 | | - | jobLogger.log("Reporting job caches..."); |
332 | | - | |
333 | | - | target = client.target(Agent.serverUrl).path("api/k8s/report-job-caches"); |
334 | | - | builder = target.request(); |
335 | | - | builder.header(HttpHeaders.AUTHORIZATION, BEARER + " " + jobData.getJobToken()); |
336 | | - | StringBuilder toStringBuilder = new StringBuilder(); |
337 | | - | for (CacheInstance instance: getCacheInstances(hostCacheHome).keySet()) |
338 | | - | toStringBuilder.append(instance.toString()).append(";"); |
339 | | - | Response response = builder.post(Entity.entity(toStringBuilder.toString(), MediaType.APPLICATION_OCTET_STREAM)); |
340 | | - | try { |
341 | | - | checkStatus(response); |
342 | | - | } finally { |
343 | | - | response.close(); |
344 | | - | } |
345 | 330 | | } catch (IOException e) { |
346 | 331 | | throw new RuntimeException(e); |
347 | 332 | | } finally { |
| skipped 507 lines |