打印了JENKINS节点日志
This commit is contained in:
parent
ec7b0aa67c
commit
341062cef5
@ -3,7 +3,7 @@ package com.qqchen.deploy.backend.deploy.integration.response;
|
|||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.OffsetDateTime;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@ -36,7 +36,7 @@ public class GitProjectResponse {
|
|||||||
private String httpUrlToRepo;
|
private String httpUrlToRepo;
|
||||||
|
|
||||||
@JsonProperty("last_activity_at")
|
@JsonProperty("last_activity_at")
|
||||||
private LocalDateTime lastActivityAt;
|
private OffsetDateTime lastActivityAt;
|
||||||
|
|
||||||
@JsonProperty("name_with_namespace")
|
@JsonProperty("name_with_namespace")
|
||||||
private String nameWithNamespace;
|
private String nameWithNamespace;
|
||||||
@ -45,7 +45,7 @@ public class GitProjectResponse {
|
|||||||
private String pathWithNamespace;
|
private String pathWithNamespace;
|
||||||
|
|
||||||
@JsonProperty("created_at")
|
@JsonProperty("created_at")
|
||||||
private LocalDateTime createdAt;
|
private OffsetDateTime createdAt;
|
||||||
|
|
||||||
@JsonProperty("tag_list")
|
@JsonProperty("tag_list")
|
||||||
private List<String> tagList;
|
private List<String> tagList;
|
||||||
|
|||||||
@ -28,6 +28,8 @@ import org.springframework.data.domain.Pageable;
|
|||||||
import org.springframework.orm.ObjectOptimisticLockingFailureException;
|
import org.springframework.orm.ObjectOptimisticLockingFailureException;
|
||||||
import org.springframework.scheduling.annotation.Async;
|
import org.springframework.scheduling.annotation.Async;
|
||||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
||||||
|
|
||||||
|
import java.time.ZoneId;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
@ -211,10 +213,14 @@ public class RepositoryProjectServiceImpl extends BaseServiceImpl<RepositoryProj
|
|||||||
project.setWebUrl(projectResponse.getWebUrl());
|
project.setWebUrl(projectResponse.getWebUrl());
|
||||||
project.setSshUrl(projectResponse.getSshUrlToRepo());
|
project.setSshUrl(projectResponse.getSshUrlToRepo());
|
||||||
project.setHttpUrl(projectResponse.getHttpUrlToRepo());
|
project.setHttpUrl(projectResponse.getHttpUrlToRepo());
|
||||||
project.setLastActivityAt(projectResponse.getLastActivityAt());
|
// 将OffsetDateTime转换为LocalDateTime
|
||||||
|
project.setLastActivityAt(projectResponse.getLastActivityAt() != null ?
|
||||||
|
projectResponse.getLastActivityAt().atZoneSameInstant(ZoneId.systemDefault()).toLocalDateTime() : null);
|
||||||
project.setNameWithNamespace(projectResponse.getNameWithNamespace());
|
project.setNameWithNamespace(projectResponse.getNameWithNamespace());
|
||||||
project.setPathWithNamespace(projectResponse.getPathWithNamespace());
|
project.setPathWithNamespace(projectResponse.getPathWithNamespace());
|
||||||
project.setCreatedAt(projectResponse.getCreatedAt());
|
// 将OffsetDateTime转换为LocalDateTime
|
||||||
|
project.setCreatedAt(projectResponse.getCreatedAt() != null ?
|
||||||
|
projectResponse.getCreatedAt().atZoneSameInstant(ZoneId.systemDefault()).toLocalDateTime() : null);
|
||||||
|
|
||||||
projectsToSave.add(project);
|
projectsToSave.add(project);
|
||||||
synchronized (existingProjects) {
|
synchronized (existingProjects) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user