From a37538858551c57d6a6fc53f5671b2c0bbc3f896 Mon Sep 17 00:00:00 2001 From: "mian-bin@hotmail.com" Date: Mon, 24 Mar 2025 14:28:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=91=BD=E5=90=8D=E4=B8=8D=E8=A7=84=E8=8C=83?= =?UTF-8?q?=EF=BC=8C=E4=B8=8D=E5=BA=94=E8=AF=A5=E6=8C=89=E7=85=A7=E4=BB=A5?= =?UTF-8?q?=E5=89=8D=E4=BD=BF=E7=94=A8pipeline=20=EF=BC=8C=E5=BA=94?= =?UTF-8?q?=E8=AF=A5=E6=98=AF=E4=BB=A5ci=E4=B8=BA=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E5=88=86=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/compiler.xml | 46 +++-- .idea/encodings.xml | 38 +++-- .idea/gradle.xml | 23 +++ .idea/jarRepositories.xml | 5 + .idea/misc.xml | 6 + dependencies/pom.xml | 48 +++++- .../pom.xml | 7 +- .../ci}/commons/constant/BaseConstant.java | 2 +- .../ci}/commons/constant/CommonConstants.java | 2 +- .../commons/constant/CommonMessageCode.java | 2 +- .../commons/constant/LeafAllocConstant.java | 2 +- .../casic/ci}/commons/constant/OpsHeader.java | 2 +- .../casic/ci}/commons/enums/BkStyleEnum.java | 2 +- .../ci}/commons/enums/CommonStatusEnum.java | 2 +- .../ci}/commons/enums/DateIntervalEnum.java | 2 +- .../ci}/commons/enums/SubjectScopeType.java | 2 +- .../ci}/commons/enums/SystemModuleEnum.java | 2 +- .../casic/ci}/commons/enums/UserTypeEnum.java | 2 +- .../ci}/commons/functions/Preconditions.java | 2 +- .../commons/operationid/LeafAllocMapper.java | 4 +- .../commons/operationid/LeafAllocService.java | 5 +- .../operationid/LeafAllocServiceImpl.java | 6 +- .../operationid/SegmentIdGeneratorImpl.java | 11 +- .../commons/operationid/entity/LeafAlloc.java | 2 +- .../commons/operationid/entity/Segment.java | 2 +- .../operationid/entity/SegmentBuffer.java | 2 +- .../commons/operationid/entity/Status.java | 2 +- .../{pipeline-ci-quality => ci-event}/pom.xml | 10 +- modules/{pipeline-ci-log => ci-log}/pom.xml | 9 +- .../cd/casic/ci/log}/api/AppLogResource.java | 12 +- .../ci/log}/api/BuildLogPrintResource.java | 8 +- .../cd/casic/ci/log}/api/OpLogResource.java | 2 +- .../ci/log}/api/ServiceLogPrintResource.java | 8 +- .../casic/ci/log}/api/ServiceLogResource.java | 12 +- .../cd/casic/ci/log}/api/UserLogResource.java | 10 +- .../ci/log}/api/impl/AppLogResourceImpl.java | 16 +- .../api/impl/BuildLogPrintResourceImpl.java | 18 +- .../ci/log}/api/impl/OpLogResourceImpl.java | 4 +- .../api/impl/ServiceLogPrintResourceImpl.java | 14 +- .../log}/api/impl/ServiceLogResourceImpl.java | 14 +- .../ci/log}/api/impl/UserLogResourceImpl.java | 14 +- .../log/config/LogPrinterConfiguration.java | 27 +++ .../cd/casic/ci/log}/dal/dao/IndexMapper.java | 4 +- .../ci/log}/dal/dao/LogStatusMapper.java | 4 +- .../casic/ci/log}/dal/dao/LogTahMapper.java | 4 +- .../ci/log}/dal/dataobject/LogIndicesV2.java | 2 +- .../ci/log}/dal/dataobject/LogStatus.java | 2 +- .../ci/log}/dal/dataobject/LogSubTags.java | 2 +- .../ci/log}/dal/pojo/EndPageQueryLogs.java | 4 +- .../cd/casic/ci/log}/dal/pojo/LogLine.java | 7 +- .../casic/ci/log}/dal/pojo/PageQueryLogs.java | 4 +- .../ci/log}/dal/pojo/QueryLogLineNum.java | 2 +- .../ci/log}/dal/pojo/QueryLogStatus.java | 4 +- .../cd/casic/ci/log}/dal/pojo/QueryLogs.java | 4 +- .../log}/dal/pojo/TaskBuildLogProperty.java | 4 +- .../log/dal/pojo}/enums/LogErrorCodeEnum.java | 2 +- .../ci/log/dal/pojo}/enums/LogStatusEnum.java | 2 +- .../log/dal/pojo}/enums/LogStorageMode.java | 2 +- .../casic/ci/log/dal/pojo}/enums/LogType.java | 2 +- .../dal/pojo/message/LegacyLogMessage.java | 22 +++ .../ci/log}/dal/pojo/message/LogMessage.java | 9 +- .../pojo/message/LogMessageWithLineNo.java | 27 +++ .../ci/log/dal/pojo/message/LogStatus.java | 20 +++ .../cd/casic/ci/log}/dal/pojo/meta/Ansi.java | 2 +- .../ci/log}/dal/pojo/meta/AnsiAttribute.java | 2 +- .../ci/log}/dal/pojo/meta/AnsiColor.java | 2 +- .../casic/ci/log/dal/pojo/meta/AnsiErase.java | 22 +++ .../cd/casic/ci/log}/jmx/CreateIndexBean.java | 2 +- .../cd/casic/ci/log}/jmx/LogStorageBean.java | 2 +- .../java/cd/casic/ci/log}/log/IEvent.java | 2 +- .../java/cd/casic/ci/log}/log/ILogEvent.java | 3 +- .../cd/casic/ci/log}/log/LogOriginEvent.java | 4 +- .../cd/casic/ci/log}/log/LogStatusEvent.java | 3 +- .../cd/casic/ci/log}/log/LogStorageEvent.java | 4 +- .../log}/service/BuildLogListenerService.java | 8 +- .../ci/log}/service/BuildLogPrintService.java | 8 +- .../ci/log}/service/BuildLogQueryService.java | 10 +- .../casic/ci/log}/service/IndexService.java | 6 +- .../cd/casic/ci/log}/service/LogService.java | 16 +- .../casic/ci/log}/service/LogServiceImpl.java | 27 +-- .../ci/log}/service/LogStatusService.java | 12 +- .../casic/ci/log}/service/LogTagService.java | 4 +- .../{pipeline-ci-event => ci-market}/pom.xml | 11 +- .../market/constant/StoreMessageCode.java | 2 +- .../pipeline-ci-process-api/pom.xml | 22 +++ .../PipelineCiProcessApiApplication.java | 14 ++ .../src/main/resources/application.properties | 1 + .../PipelineCiProcessApiApplicationTests.java | 13 ++ .../pom.xml | 44 ++--- .../pom.xml | 9 +- .../project/constant/ProjectConstants.java | 2 +- .../UserProjectResourceController.java | 6 +- .../ci}/project/dal/dao/ProjectMapper.java | 14 +- .../cd/casic/ci}/project/dal/dto/Project.java | 2 +- .../dal/pojo/AuthProjectCreateInfo.java | 4 +- .../dal/pojo/PipelineAsCodeSettings.java | 2 +- .../dal/pojo/ProjectCreateExtInfo.java | 2 +- .../project/dal/pojo/ProjectCreateInfo.java | 4 +- .../project/dal/pojo/ProjectProperties.java | 2 +- .../casic/ci}/project/dal/pojo/ProjectVO.java | 2 +- .../dal/pojo/ResourceRegisterInfo.java | 2 +- .../project/dal/pojo/SubjectScopeInfo.java | 4 +- .../project/dal/pojo/user/UserDeptDetail.java | 2 +- .../project/enums/ProjectApproveStatus.java | 2 +- .../enums/ProjectAuthSecrecyStatus.java | 2 +- .../ci}/project/enums/ProjectChannelCode.java | 2 +- .../project/enums/ProjectValidateType.java | 2 +- .../project/service/ProjectExtService.java | 6 +- .../service/ProjectPermissionService.java | 8 + .../service/UserProjectResourceService.java | 4 +- .../BluekingProjectPermissionServiceImpl.java | 8 +- .../service/impl/ProjectExtServiceImpl.java | 8 +- .../service/impl/ProjectServiceImpl.java | 24 +-- .../impl/UserProjectResourceServiceImpl.java | 12 +- .../pom.xml | 9 +- .../ci}/api/ServiceQualityRuleResource.java | 6 +- .../casic/ci}/constants/QualityConstants.java | 2 +- .../java/cd/casic/ci}/dal/package-info.java | 2 +- .../casic/ci}/dal/pojo/RuleCheckResult.java | 2 +- .../ci}/dal/pojo/RuleCheckSingleResult.java | 2 +- .../ci}/dal/v2/ControlPointPosition.java | 4 +- .../cd/casic/ci}/dal/v3/package-info.java | 2 +- .../dal/v3/request/BuildCheckParamsV3.java | 2 +- .../pom.xml | 11 +- .../log}/scm/api/ServiceGithubResource.java | 10 +- .../scm/api/ServiceGithubResourceImpl.java | 14 +- .../ci/log}/scm/api/ServiceOauthResource.java | 4 +- .../scm/api/ServiceOauthResourceImpl.java | 8 +- .../scm/api/ServiceRepositoryResource.java | 6 +- .../api/ServiceRepositoryResourceImpl.java | 10 +- .../scm/api/scm/ServiceScmOauthResource.java | 8 +- .../api/scm/ServiceScmOauthResourceImpl.java | 10 +- .../log}/scm/api/scm/ServiceScmResource.java | 8 +- .../scm/api/scm/ServiceScmResourceImpl.java | 10 +- .../casic/ci/log}/scm/config/GitConfig.java | 2 +- .../cd/casic/ci/log}/scm/config/P4Config.java | 2 +- .../casic/ci/log}/scm/config/SVNConfig.java | 2 +- .../scm/dal/dao/RepositoryGitTokenMapper.java | 4 +- .../dal/dao/RepositoryGitlabTokenMapper.java | 4 +- .../scm/dal/dao/RepositoryRecordMapper.java | 4 +- .../dal/dao/RepositoryTGitTokenMapper.java | 4 +- .../log}/scm/dal/dto/RepositoryGitToken.java | 2 +- .../scm/dal/dto/RepositoryGitlabToken.java | 2 +- .../ci/log}/scm/dal/dto/RepositoryRecord.java | 2 +- .../log}/scm/dal/dto/RepositoryTGitToken.java | 2 +- .../log}/scm/dal/pojo/CodeGitRepository.java | 6 +- .../scm/dal/pojo/CodeGitlabRepository.java | 6 +- .../log}/scm/dal/pojo/CodeP4Repository.java | 2 +- .../log}/scm/dal/pojo/CodeSvnRepository.java | 4 +- .../log}/scm/dal/pojo/CodeTGitRepository.java | 6 +- .../ci/log}/scm/dal/pojo/Credential.java | 2 +- .../log}/scm/dal/pojo/GithubRepository.java | 2 +- .../cd/casic/ci/log}/scm/dal/pojo/IScm.java | 2 +- .../ci/log}/scm/dal/pojo/Repository.java | 2 +- .../ci/log}/scm/dal/pojo/RevisionInfo.java | 2 +- .../ci/log}/scm/dal/pojo/ScmFactory.java | 16 +- .../ci/log}/scm/dal/pojo/ScmOauthFactory.java | 20 +-- .../ci/log}/scm/dal/pojo/git/GitApi.java | 2 +- .../ci/log}/scm/dal/pojo/git/GitOauthApi.java | 2 +- .../ci/log}/scm/dal/pojo/git/GitUserInfo.java | 2 +- .../scm/dal/pojo/github/GithubBranch.java | 2 +- .../scm/dal/pojo/github/GithubCommit.java | 2 +- .../dal/pojo/github/GithubCommitAuthor.java | 2 +- .../scm/dal/pojo/github/GithubCommitData.java | 2 +- .../scm/dal/pojo/github/GithubObject.java | 2 +- .../log}/scm/dal/pojo/github/GithubTag.java | 2 +- .../log}/scm/dal/pojo/github/GithubToken.java | 2 +- .../ci/log}/scm/dal/pojo/oauth/GitToken.java | 2 +- .../log}/scm/dal/pojo/svn/CodeGitScmImpl.java | 10 +- .../scm/dal/pojo/svn/CodeGitlabScmImpl.java | 8 +- .../log}/scm/dal/pojo/svn/CodeP4ScmImpl.java | 6 +- .../log}/scm/dal/pojo/svn/CodeSvnScmImpl.java | 8 +- .../scm/dal/pojo/svn/CodeTGitScmImpl.java | 10 +- .../log}/scm/enums/CodeGitWebhookEvent.java | 2 +- .../ci/log}/scm/enums/CodeSvnRegion.java | 2 +- .../ci/log}/scm/enums/GitHubTokenType.java | 2 +- .../casic/ci/log}/scm/enums/RepoAuthType.java | 2 +- .../ci/log}/scm/enums/RepositoryConfig.java | 2 +- .../ci/log}/scm/enums/RepositoryType.java | 2 +- .../ci/log}/scm/enums/RepositoryTypeNew.java | 2 +- .../scm/enums/RequestChannelTypeEnum.java | 2 +- .../cd/casic/ci/log}/scm/enums/ScmType.java | 2 +- .../ci/log}/scm/enums/TokenTypeEnum.java | 2 +- .../CodeRepositoryServiceRegistrar.java | 8 +- .../ci/log}/scm/service/IGitOauthService.java | 4 +- .../service/code/CodeRepositoryService.java | 10 ++ .../scm/service/github/GithubService.java | 8 +- .../service/github/GithubTokenService.java | 10 ++ .../github/GithubTokenServiceImpl.java | 10 +- .../scm/service/github/IGithubService.java | 6 +- .../scm/service/impl/GitOauthServiceImpl.java | 12 +- .../service/impl/RepositoryServiceImpl.java | 18 +- .../log}/scm/service/scm/GitServiceImpl.java | 6 +- .../ci/log}/scm/service/scm/IGitService.java | 4 +- .../scm/service/scm/IScmOauthService.java | 8 +- .../ci/log}/scm/service/scm/IScmService.java | 8 +- .../scm/service/scm/ScmOauthServiceImpl.java | 14 +- .../log}/scm/service/scm/ScmServiceImpl.java | 16 +- .../ci/log/scm/service/tgit/ITGitService.java | 13 ++ .../scm/service/tgit/TGitOauthService.java | 9 + .../service/tgit/TGitOauthServiceImpl.java | 4 +- .../scm/service/tgit/TGitServiceImpl.java | 10 +- .../scm/service/tgit/TGitTokenService.java | 4 +- .../service/tgit/TGitTokenServiceImpl.java | 10 +- .../cd/casic/ci/log}/scm/utils/GitUtils.java | 2 +- .../cd/casic/ci/log}/scm/utils/HashUtil.java | 2 +- .../log}/scm/utils/RepositoryConfigUtils.java | 6 +- .../casic/ci/log}/scm/utils/WebhookUtils.java | 2 +- .../{pipeline-ci-ticket => ci-ticket}/pom.xml | 15 +- .../ci/ticket/UserCredentialResource.java | 160 ++++++++++++++++++ .../ticket/api/BuildAgentCredentialApi.java | 123 ++++++++++++++ .../ci/ticket}/api/BuildCredentialApi.java | 8 +- .../casic/ci/ticket}/api/OpCredentialApi.java | 6 +- .../ci/ticket/api/ServiceCredentialApi.java | 119 +++++++++++++ .../ci/ticket/api/UserCredentialApi.java | 16 ++ .../api/impl/ServiceCredentialApiImpl.java | 52 ++++++ .../ticket}/constant/TicketMessageCode.java | 2 +- .../dal/dao/CredentialRecordMapper.java | 4 +- .../dal/dataobject/CredentialRecord.java | 2 +- .../ci/ticket}/dal/enums/CredentialType.java | 2 +- .../cd/casic/ci/ticket}/dal/pojo/Cert.java | 2 +- .../casic/ci/ticket}/dal/pojo/Credential.java | 4 +- .../ci/ticket}/dal/pojo/CredentialCreate.java | 4 +- .../ci/ticket}/dal/pojo/CredentialInfo.java | 4 +- .../dal/pojo/CredentialPermissions.java | 2 +- .../dal/pojo/CredentialSettingUpdate.java | 25 +++ .../ci/ticket}/dal/pojo/CredentialUpdate.java | 4 +- .../dal/pojo/CredentialWithPermission.java | 4 +- .../ci/ticket}/service/CredentialHelper.java | 2 +- .../ci/ticket}/service/CredentialService.java | 6 +- .../service/CredentialServiceImpl.java | 12 +- .../src/main/java/cd/casic/pipeline/Main.java | 13 -- .../pipeline/config/BuildLogPrinter.java | 22 --- .../pojo/message/LogMessageWithLineNo.java | 25 --- .../pipeline/process/dal/package-info.java | 7 - .../casic/pipeline/process/utils/AESUtil.java | 86 ---------- .../pipeline/process/utils/CommonUtils.java | 16 -- .../pipeline/process/utils/LogUtils.java | 42 ----- .../pipeline/process/utils/RetryUtils.java | 30 ---- .../service/ProjectPermissionService.java | 8 - .../src/main/java/cd/casic/pipeline/Main.java | 13 -- .../service/code/CodeRepositoryService.java | 10 -- .../service/github/GithubTokenService.java | 10 -- .../scm/service/tgit/ITGitService.java | 13 -- .../scm/service/tgit/TGitOauthService.java | 9 - .../pipeline/api/ServiceCredentialApi.java | 32 ---- .../api/impl/ServiceCredentialApiImpl.java | 30 ---- modules/pom.xml | 9 + pom.xml | 18 +- 249 files changed, 1434 insertions(+), 978 deletions(-) create mode 100644 .idea/gradle.xml rename modules/{pipeline-ci-commons => ci-commons}/pom.xml (87%) rename modules/{pipeline-ci-commons/src/main/java/cd/casic/pipeline => ci-commons/src/main/java/cd/casic/ci}/commons/constant/BaseConstant.java (86%) rename modules/{pipeline-ci-commons/src/main/java/cd/casic/pipeline => ci-commons/src/main/java/cd/casic/ci}/commons/constant/CommonConstants.java (99%) rename modules/{pipeline-ci-commons/src/main/java/cd/casic/pipeline => ci-commons/src/main/java/cd/casic/ci}/commons/constant/CommonMessageCode.java (99%) rename modules/{pipeline-ci-commons/src/main/java/cd/casic/pipeline => ci-commons/src/main/java/cd/casic/ci}/commons/constant/LeafAllocConstant.java (98%) rename modules/{pipeline-ci-commons/src/main/java/cd/casic/pipeline => ci-commons/src/main/java/cd/casic/ci}/commons/constant/OpsHeader.java (99%) rename modules/{pipeline-ci-commons/src/main/java/cd/casic/pipeline => ci-commons/src/main/java/cd/casic/ci}/commons/enums/BkStyleEnum.java (97%) rename modules/{pipeline-ci-commons/src/main/java/cd/casic/pipeline => ci-commons/src/main/java/cd/casic/ci}/commons/enums/CommonStatusEnum.java (94%) rename modules/{pipeline-ci-commons/src/main/java/cd/casic/pipeline => ci-commons/src/main/java/cd/casic/ci}/commons/enums/DateIntervalEnum.java (96%) rename modules/{pipeline-ci-commons/src/main/java/cd/casic/pipeline => ci-commons/src/main/java/cd/casic/ci}/commons/enums/SubjectScopeType.java (92%) rename modules/{pipeline-ci-commons/src/main/java/cd/casic/pipeline => ci-commons/src/main/java/cd/casic/ci}/commons/enums/SystemModuleEnum.java (97%) rename modules/{pipeline-ci-commons/src/main/java/cd/casic/pipeline => ci-commons/src/main/java/cd/casic/ci}/commons/enums/UserTypeEnum.java (95%) rename modules/{pipeline-ci-commons/src/main/java/cd/casic/pipeline => ci-commons/src/main/java/cd/casic/ci}/commons/functions/Preconditions.java (90%) rename modules/{pipeline-ci-commons/src/main/java/cd/casic/pipeline => ci-commons/src/main/java/cd/casic/ci}/commons/operationid/LeafAllocMapper.java (72%) rename modules/{pipeline-ci-commons/src/main/java/cd/casic/pipeline => ci-commons/src/main/java/cd/casic/ci}/commons/operationid/LeafAllocService.java (75%) rename modules/{pipeline-ci-commons/src/main/java/cd/casic/pipeline => ci-commons/src/main/java/cd/casic/ci}/commons/operationid/LeafAllocServiceImpl.java (92%) rename modules/{pipeline-ci-commons/src/main/java/cd/casic/pipeline => ci-commons/src/main/java/cd/casic/ci}/commons/operationid/SegmentIdGeneratorImpl.java (96%) rename modules/{pipeline-ci-commons/src/main/java/cd/casic/pipeline => ci-commons/src/main/java/cd/casic/ci}/commons/operationid/entity/LeafAlloc.java (97%) rename modules/{pipeline-ci-commons/src/main/java/cd/casic/pipeline => ci-commons/src/main/java/cd/casic/ci}/commons/operationid/entity/Segment.java (90%) rename modules/{pipeline-ci-commons/src/main/java/cd/casic/pipeline => ci-commons/src/main/java/cd/casic/ci}/commons/operationid/entity/SegmentBuffer.java (96%) rename modules/{pipeline-ci-commons/src/main/java/cd/casic/pipeline => ci-commons/src/main/java/cd/casic/ci}/commons/operationid/entity/Status.java (75%) rename modules/{pipeline-ci-quality => ci-event}/pom.xml (70%) rename modules/{pipeline-ci-log => ci-log}/pom.xml (83%) rename modules/{pipeline-ci-log/src/main/java/cd/casic/pipeline => ci-log/src/main/java/cd/casic/ci/log}/api/AppLogResource.java (97%) rename modules/{pipeline-ci-log/src/main/java/cd/casic/pipeline => ci-log/src/main/java/cd/casic/ci/log}/api/BuildLogPrintResource.java (95%) rename modules/{pipeline-ci-log/src/main/java/cd/casic/pipeline => ci-log/src/main/java/cd/casic/ci/log}/api/OpLogResource.java (94%) rename modules/{pipeline-ci-log/src/main/java/cd/casic/pipeline => ci-log/src/main/java/cd/casic/ci/log}/api/ServiceLogPrintResource.java (94%) rename modules/{pipeline-ci-log/src/main/java/cd/casic/pipeline => ci-log/src/main/java/cd/casic/ci/log}/api/ServiceLogResource.java (96%) rename modules/{pipeline-ci-log/src/main/java/cd/casic/pipeline => ci-log/src/main/java/cd/casic/ci/log}/api/UserLogResource.java (97%) rename modules/{pipeline-ci-log/src/main/java/cd/casic/pipeline => ci-log/src/main/java/cd/casic/ci/log}/api/impl/AppLogResourceImpl.java (89%) rename modules/{pipeline-ci-log/src/main/java/cd/casic/pipeline => ci-log/src/main/java/cd/casic/ci/log}/api/impl/BuildLogPrintResourceImpl.java (92%) rename modules/{pipeline-ci-log/src/main/java/cd/casic/pipeline => ci-log/src/main/java/cd/casic/ci/log}/api/impl/OpLogResourceImpl.java (80%) rename modules/{pipeline-ci-log/src/main/java/cd/casic/pipeline => ci-log/src/main/java/cd/casic/ci/log}/api/impl/ServiceLogPrintResourceImpl.java (89%) rename modules/{pipeline-ci-log/src/main/java/cd/casic/pipeline => ci-log/src/main/java/cd/casic/ci/log}/api/impl/ServiceLogResourceImpl.java (86%) rename modules/{pipeline-ci-log/src/main/java/cd/casic/pipeline => ci-log/src/main/java/cd/casic/ci/log}/api/impl/UserLogResourceImpl.java (91%) create mode 100644 modules/ci-log/src/main/java/cd/casic/ci/log/config/LogPrinterConfiguration.java rename modules/{pipeline-ci-log/src/main/java/cd/casic/pipeline => ci-log/src/main/java/cd/casic/ci/log}/dal/dao/IndexMapper.java (94%) rename modules/{pipeline-ci-log/src/main/java/cd/casic/pipeline => ci-log/src/main/java/cd/casic/ci/log}/dal/dao/LogStatusMapper.java (76%) rename modules/{pipeline-ci-log/src/main/java/cd/casic/pipeline => ci-log/src/main/java/cd/casic/ci/log}/dal/dao/LogTahMapper.java (93%) rename modules/{pipeline-ci-log/src/main/java/cd/casic/pipeline => ci-log/src/main/java/cd/casic/ci/log}/dal/dataobject/LogIndicesV2.java (97%) rename modules/{pipeline-ci-log/src/main/java/cd/casic/pipeline => ci-log/src/main/java/cd/casic/ci/log}/dal/dataobject/LogStatus.java (96%) rename modules/{pipeline-ci-log/src/main/java/cd/casic/pipeline => ci-log/src/main/java/cd/casic/ci/log}/dal/dataobject/LogSubTags.java (95%) rename modules/{pipeline-ci-log/src/main/java/cd/casic/pipeline => ci-log/src/main/java/cd/casic/ci/log}/dal/pojo/EndPageQueryLogs.java (91%) rename modules/{pipeline-ci-log/src/main/java/cd/casic/pipeline => ci-log/src/main/java/cd/casic/ci/log}/dal/pojo/LogLine.java (83%) rename modules/{pipeline-ci-log/src/main/java/cd/casic/pipeline => ci-log/src/main/java/cd/casic/ci/log}/dal/pojo/PageQueryLogs.java (89%) rename modules/{pipeline-ci-log/src/main/java/cd/casic/pipeline => ci-log/src/main/java/cd/casic/ci/log}/dal/pojo/QueryLogLineNum.java (94%) rename modules/{pipeline-ci-log/src/main/java/cd/casic/pipeline => ci-log/src/main/java/cd/casic/ci/log}/dal/pojo/QueryLogStatus.java (86%) rename modules/{pipeline-ci-log/src/main/java/cd/casic/pipeline => ci-log/src/main/java/cd/casic/ci/log}/dal/pojo/QueryLogs.java (92%) rename modules/{pipeline-ci-log/src/main/java/cd/casic/pipeline => ci-log/src/main/java/cd/casic/ci/log}/dal/pojo/TaskBuildLogProperty.java (89%) rename modules/{pipeline-ci-log/src/main/java/cd/casic/pipeline => ci-log/src/main/java/cd/casic/ci/log/dal/pojo}/enums/LogErrorCodeEnum.java (92%) rename modules/{pipeline-ci-log/src/main/java/cd/casic/pipeline => ci-log/src/main/java/cd/casic/ci/log/dal/pojo}/enums/LogStatusEnum.java (96%) rename modules/{pipeline-ci-log/src/main/java/cd/casic/pipeline => ci-log/src/main/java/cd/casic/ci/log/dal/pojo}/enums/LogStorageMode.java (94%) rename modules/{pipeline-ci-log/src/main/java/cd/casic/pipeline => ci-log/src/main/java/cd/casic/ci/log/dal/pojo}/enums/LogType.java (91%) create mode 100644 modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/message/LegacyLogMessage.java rename modules/{pipeline-ci-log/src/main/java/cd/casic/pipeline => ci-log/src/main/java/cd/casic/ci/log}/dal/pojo/message/LogMessage.java (77%) create mode 100644 modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/message/LogMessageWithLineNo.java create mode 100644 modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/message/LogStatus.java rename modules/{pipeline-ci-log/src/main/java/cd/casic/pipeline => ci-log/src/main/java/cd/casic/ci/log}/dal/pojo/meta/Ansi.java (98%) rename modules/{pipeline-ci-log/src/main/java/cd/casic/pipeline => ci-log/src/main/java/cd/casic/ci/log}/dal/pojo/meta/AnsiAttribute.java (92%) rename modules/{pipeline-ci-log/src/main/java/cd/casic/pipeline => ci-log/src/main/java/cd/casic/ci/log}/dal/pojo/meta/AnsiColor.java (91%) create mode 100644 modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/meta/AnsiErase.java rename modules/{pipeline-ci-log/src/main/java/cd/casic/pipeline => ci-log/src/main/java/cd/casic/ci/log}/jmx/CreateIndexBean.java (98%) rename modules/{pipeline-ci-log/src/main/java/cd/casic/pipeline => ci-log/src/main/java/cd/casic/ci/log}/jmx/LogStorageBean.java (98%) rename modules/{pipeline-ci-log/src/main/java/cd/casic/pipeline/event => ci-log/src/main/java/cd/casic/ci/log}/log/IEvent.java (85%) rename modules/{pipeline-ci-log/src/main/java/cd/casic/pipeline/event => ci-log/src/main/java/cd/casic/ci/log}/log/ILogEvent.java (89%) rename modules/{pipeline-ci-log/src/main/java/cd/casic/pipeline/event => ci-log/src/main/java/cd/casic/ci/log}/log/LogOriginEvent.java (87%) rename modules/{pipeline-ci-log/src/main/java/cd/casic/pipeline/event => ci-log/src/main/java/cd/casic/ci/log}/log/LogStatusEvent.java (89%) rename modules/{pipeline-ci-log/src/main/java/cd/casic/pipeline/event => ci-log/src/main/java/cd/casic/ci/log}/log/LogStorageEvent.java (83%) rename modules/{pipeline-ci-log/src/main/java/cd/casic/pipeline => ci-log/src/main/java/cd/casic/ci/log}/service/BuildLogListenerService.java (94%) rename modules/{pipeline-ci-log/src/main/java/cd/casic/pipeline => ci-log/src/main/java/cd/casic/ci/log}/service/BuildLogPrintService.java (91%) rename modules/{pipeline-ci-log/src/main/java/cd/casic/pipeline => ci-log/src/main/java/cd/casic/ci/log}/service/BuildLogQueryService.java (97%) rename modules/{pipeline-ci-log/src/main/java/cd/casic/pipeline => ci-log/src/main/java/cd/casic/ci/log}/service/IndexService.java (97%) rename modules/{pipeline-ci-log/src/main/java/cd/casic/pipeline => ci-log/src/main/java/cd/casic/ci/log}/service/LogService.java (85%) rename modules/{pipeline-ci-log/src/main/java/cd/casic/pipeline => ci-log/src/main/java/cd/casic/ci/log}/service/LogServiceImpl.java (93%) rename modules/{pipeline-ci-log/src/main/java/cd/casic/pipeline => ci-log/src/main/java/cd/casic/ci/log}/service/LogStatusService.java (92%) rename modules/{pipeline-ci-log/src/main/java/cd/casic/pipeline => ci-log/src/main/java/cd/casic/ci/log}/service/LogTagService.java (97%) rename modules/{pipeline-ci-event => ci-market}/pom.xml (66%) rename modules/{pipeline-ci-market/src/main/java/cd/casic/pipeline => ci-market/src/main/java/cd/casic/ci/event}/market/constant/StoreMessageCode.java (99%) create mode 100644 modules/ci-process/pipeline-ci-process-api/pom.xml create mode 100644 modules/ci-process/pipeline-ci-process-api/src/main/java/cd/casic/ci/pipelineciprocessapi/PipelineCiProcessApiApplication.java create mode 100644 modules/ci-process/pipeline-ci-process-api/src/main/resources/application.properties create mode 100644 modules/ci-process/pipeline-ci-process-api/src/test/java/cd/casic/ci/pipelineciprocessapi/PipelineCiProcessApiApplicationTests.java rename modules/{pipeline-ci-process => ci-process}/pom.xml (56%) rename modules/{pipeline-ci-project => ci-project}/pom.xml (82%) rename modules/{pipeline-ci-project/src/main/java/cd/casic/pipeline => ci-project/src/main/java/cd/casic/ci}/project/constant/ProjectConstants.java (93%) rename modules/{pipeline-ci-project/src/main/java/cd/casic/pipeline => ci-project/src/main/java/cd/casic/ci}/project/controller/UserProjectResourceController.java (86%) rename modules/{pipeline-ci-project/src/main/java/cd/casic/pipeline => ci-project/src/main/java/cd/casic/ci}/project/dal/dao/ProjectMapper.java (57%) rename modules/{pipeline-ci-project/src/main/java/cd/casic/pipeline => ci-project/src/main/java/cd/casic/ci}/project/dal/dto/Project.java (98%) rename modules/{pipeline-ci-project/src/main/java/cd/casic/pipeline => ci-project/src/main/java/cd/casic/ci}/project/dal/pojo/AuthProjectCreateInfo.java (88%) rename modules/{pipeline-ci-project/src/main/java/cd/casic/pipeline => ci-project/src/main/java/cd/casic/ci}/project/dal/pojo/PipelineAsCodeSettings.java (81%) rename modules/{pipeline-ci-project/src/main/java/cd/casic/pipeline => ci-project/src/main/java/cd/casic/ci}/project/dal/pojo/ProjectCreateExtInfo.java (86%) rename modules/{pipeline-ci-project/src/main/java/cd/casic/pipeline => ci-project/src/main/java/cd/casic/ci}/project/dal/pojo/ProjectCreateInfo.java (93%) rename modules/{pipeline-ci-project/src/main/java/cd/casic/pipeline => ci-project/src/main/java/cd/casic/ci}/project/dal/pojo/ProjectProperties.java (86%) rename modules/{pipeline-ci-project/src/main/java/cd/casic/pipeline => ci-project/src/main/java/cd/casic/ci}/project/dal/pojo/ProjectVO.java (99%) rename modules/{pipeline-ci-project/src/main/java/cd/casic/pipeline => ci-project/src/main/java/cd/casic/ci}/project/dal/pojo/ResourceRegisterInfo.java (84%) rename modules/{pipeline-ci-project/src/main/java/cd/casic/pipeline => ci-project/src/main/java/cd/casic/ci}/project/dal/pojo/SubjectScopeInfo.java (86%) rename modules/{pipeline-ci-project/src/main/java/cd/casic/pipeline => ci-project/src/main/java/cd/casic/ci}/project/dal/pojo/user/UserDeptDetail.java (94%) rename modules/{pipeline-ci-project/src/main/java/cd/casic/pipeline => ci-project/src/main/java/cd/casic/ci}/project/enums/ProjectApproveStatus.java (95%) rename modules/{pipeline-ci-project/src/main/java/cd/casic/pipeline => ci-project/src/main/java/cd/casic/ci}/project/enums/ProjectAuthSecrecyStatus.java (94%) rename modules/{pipeline-ci-project/src/main/java/cd/casic/pipeline => ci-project/src/main/java/cd/casic/ci}/project/enums/ProjectChannelCode.java (90%) rename modules/{pipeline-ci-project/src/main/java/cd/casic/pipeline => ci-project/src/main/java/cd/casic/ci}/project/enums/ProjectValidateType.java (63%) rename modules/{pipeline-ci-project/src/main/java/cd/casic/pipeline => ci-project/src/main/java/cd/casic/ci}/project/service/ProjectExtService.java (56%) create mode 100644 modules/ci-project/src/main/java/cd/casic/ci/project/service/ProjectPermissionService.java rename modules/{pipeline-ci-project/src/main/java/cd/casic/pipeline => ci-project/src/main/java/cd/casic/ci}/project/service/UserProjectResourceService.java (57%) rename modules/{pipeline-ci-project/src/main/java/cd/casic/pipeline => ci-project/src/main/java/cd/casic/ci}/project/service/impl/BluekingProjectPermissionServiceImpl.java (63%) rename modules/{pipeline-ci-project/src/main/java/cd/casic/pipeline => ci-project/src/main/java/cd/casic/ci}/project/service/impl/ProjectExtServiceImpl.java (68%) rename modules/{pipeline-ci-project/src/main/java/cd/casic/pipeline => ci-project/src/main/java/cd/casic/ci}/project/service/impl/ProjectServiceImpl.java (93%) rename modules/{pipeline-ci-project/src/main/java/cd/casic/pipeline => ci-project/src/main/java/cd/casic/ci}/project/service/impl/UserProjectResourceServiceImpl.java (68%) rename modules/{pipeline-ci-market => ci-quality}/pom.xml (73%) rename modules/{pipeline-ci-quality/src/main/java/cd/casic/pipeline => ci-quality/src/main/java/cd/casic/ci}/api/ServiceQualityRuleResource.java (88%) rename modules/{pipeline-ci-quality/src/main/java/cd/casic/pipeline => ci-quality/src/main/java/cd/casic/ci}/constants/QualityConstants.java (99%) rename modules/{pipeline-ci-quality/src/main/java/cd/casic/pipeline => ci-quality/src/main/java/cd/casic/ci}/dal/package-info.java (77%) rename modules/{pipeline-ci-quality/src/main/java/cd/casic/pipeline => ci-quality/src/main/java/cd/casic/ci}/dal/pojo/RuleCheckResult.java (95%) rename modules/{pipeline-ci-quality/src/main/java/cd/casic/pipeline => ci-quality/src/main/java/cd/casic/ci}/dal/pojo/RuleCheckSingleResult.java (89%) rename modules/{pipeline-ci-quality/src/main/java/cd/casic/pipeline => ci-quality/src/main/java/cd/casic/ci}/dal/v2/ControlPointPosition.java (91%) rename modules/{pipeline-ci-quality/src/main/java/cd/casic/pipeline => ci-quality/src/main/java/cd/casic/ci}/dal/v3/package-info.java (75%) rename modules/{pipeline-ci-quality/src/main/java/cd/casic/pipeline => ci-quality/src/main/java/cd/casic/ci}/dal/v3/request/BuildCheckParamsV3.java (94%) rename modules/{pipeline-ci-scm-repository => ci-scm-repository}/pom.xml (82%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/api/ServiceGithubResource.java (89%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/api/ServiceGithubResourceImpl.java (74%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/api/ServiceOauthResource.java (92%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/api/ServiceOauthResourceImpl.java (76%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/api/ServiceRepositoryResource.java (89%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/api/ServiceRepositoryResourceImpl.java (82%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/api/scm/ServiceScmOauthResource.java (95%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/api/scm/ServiceScmOauthResourceImpl.java (86%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/api/scm/ServiceScmResource.java (95%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/api/scm/ServiceScmResourceImpl.java (85%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/config/GitConfig.java (97%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/config/P4Config.java (92%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/config/SVNConfig.java (94%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/dal/dao/RepositoryGitTokenMapper.java (75%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/dal/dao/RepositoryGitlabTokenMapper.java (76%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/dal/dao/RepositoryRecordMapper.java (75%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/dal/dao/RepositoryTGitTokenMapper.java (72%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/dal/dto/RepositoryGitToken.java (95%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/dal/dto/RepositoryGitlabToken.java (94%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/dal/dto/RepositoryRecord.java (96%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/dal/dto/RepositoryTGitToken.java (95%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/dal/pojo/CodeGitRepository.java (87%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/dal/pojo/CodeGitlabRepository.java (87%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/dal/pojo/CodeP4Repository.java (86%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/dal/pojo/CodeSvnRepository.java (93%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/dal/pojo/CodeTGitRepository.java (87%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/dal/pojo/Credential.java (88%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/dal/pojo/GithubRepository.java (89%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/dal/pojo/IScm.java (72%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/dal/pojo/Repository.java (97%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/dal/pojo/RevisionInfo.java (90%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/dal/pojo/ScmFactory.java (89%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/dal/pojo/ScmOauthFactory.java (82%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/dal/pojo/git/GitApi.java (73%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/dal/pojo/git/GitOauthApi.java (73%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/dal/pojo/git/GitUserInfo.java (90%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/dal/pojo/github/GithubBranch.java (85%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/dal/pojo/github/GithubCommit.java (88%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/dal/pojo/github/GithubCommitAuthor.java (88%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/dal/pojo/github/GithubCommitData.java (86%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/dal/pojo/github/GithubObject.java (87%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/dal/pojo/github/GithubTag.java (90%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/dal/pojo/github/GithubToken.java (90%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/dal/pojo/oauth/GitToken.java (95%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/dal/pojo/svn/CodeGitScmImpl.java (71%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/dal/pojo/svn/CodeGitlabScmImpl.java (75%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/dal/pojo/svn/CodeP4ScmImpl.java (78%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/dal/pojo/svn/CodeSvnScmImpl.java (74%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/dal/pojo/svn/CodeTGitScmImpl.java (72%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/enums/CodeGitWebhookEvent.java (95%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/enums/CodeSvnRegion.java (95%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/enums/GitHubTokenType.java (88%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/enums/RepoAuthType.java (90%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/enums/RepositoryConfig.java (97%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/enums/RepositoryType.java (89%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/enums/RepositoryTypeNew.java (88%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/enums/RequestChannelTypeEnum.java (71%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/enums/ScmType.java (93%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/enums/TokenTypeEnum.java (81%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/service/CodeRepositoryServiceRegistrar.java (91%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/service/IGitOauthService.java (60%) create mode 100644 modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/code/CodeRepositoryService.java rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/service/github/GithubService.java (96%) create mode 100644 modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/github/GithubTokenService.java rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/service/github/GithubTokenServiceImpl.java (76%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/service/github/IGithubService.java (53%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/service/impl/GitOauthServiceImpl.java (91%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/service/impl/RepositoryServiceImpl.java (83%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/service/scm/GitServiceImpl.java (92%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/service/scm/IGitService.java (51%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/service/scm/IScmOauthService.java (70%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/service/scm/IScmService.java (71%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/service/scm/ScmOauthServiceImpl.java (86%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/service/scm/ScmServiceImpl.java (87%) create mode 100644 modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/tgit/ITGitService.java create mode 100644 modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/tgit/TGitOauthService.java rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/service/tgit/TGitOauthServiceImpl.java (78%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/service/tgit/TGitServiceImpl.java (92%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/service/tgit/TGitTokenService.java (63%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/service/tgit/TGitTokenServiceImpl.java (93%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/utils/GitUtils.java (91%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/utils/HashUtil.java (97%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/utils/RepositoryConfigUtils.java (74%) rename modules/{pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline => ci-scm-repository/src/main/java/cd/casic/ci/log}/scm/utils/WebhookUtils.java (93%) rename modules/{pipeline-ci-ticket => ci-ticket}/pom.xml (68%) create mode 100644 modules/ci-ticket/src/main/java/cd/casic/ci/ticket/UserCredentialResource.java create mode 100644 modules/ci-ticket/src/main/java/cd/casic/ci/ticket/api/BuildAgentCredentialApi.java rename modules/{pipeline-ci-ticket/src/main/java/cd/casic/pipeline => ci-ticket/src/main/java/cd/casic/ci/ticket}/api/BuildCredentialApi.java (96%) rename modules/{pipeline-ci-ticket/src/main/java/cd/casic/pipeline => ci-ticket/src/main/java/cd/casic/ci/ticket}/api/OpCredentialApi.java (90%) create mode 100644 modules/ci-ticket/src/main/java/cd/casic/ci/ticket/api/ServiceCredentialApi.java create mode 100644 modules/ci-ticket/src/main/java/cd/casic/ci/ticket/api/UserCredentialApi.java create mode 100644 modules/ci-ticket/src/main/java/cd/casic/ci/ticket/api/impl/ServiceCredentialApiImpl.java rename modules/{pipeline-ci-ticket/src/main/java/cd/casic/pipeline => ci-ticket/src/main/java/cd/casic/ci/ticket}/constant/TicketMessageCode.java (95%) rename modules/{pipeline-ci-ticket/src/main/java/cd/casic/pipeline => ci-ticket/src/main/java/cd/casic/ci/ticket}/dal/dao/CredentialRecordMapper.java (73%) rename modules/{pipeline-ci-ticket/src/main/java/cd/casic/pipeline => ci-ticket/src/main/java/cd/casic/ci/ticket}/dal/dataobject/CredentialRecord.java (95%) rename modules/{pipeline-ci-ticket/src/main/java/cd/casic/pipeline => ci-ticket/src/main/java/cd/casic/ci/ticket}/dal/enums/CredentialType.java (98%) rename modules/{pipeline-ci-ticket/src/main/java/cd/casic/pipeline => ci-ticket/src/main/java/cd/casic/ci/ticket}/dal/pojo/Cert.java (96%) rename modules/{pipeline-ci-ticket/src/main/java/cd/casic/pipeline => ci-ticket/src/main/java/cd/casic/ci/ticket}/dal/pojo/Credential.java (94%) rename modules/{pipeline-ci-ticket/src/main/java/cd/casic/pipeline => ci-ticket/src/main/java/cd/casic/ci/ticket}/dal/pojo/CredentialCreate.java (92%) rename modules/{pipeline-ci-ticket/src/main/java/cd/casic/pipeline => ci-ticket/src/main/java/cd/casic/ci/ticket}/dal/pojo/CredentialInfo.java (93%) rename modules/{pipeline-ci-ticket/src/main/java/cd/casic/pipeline => ci-ticket/src/main/java/cd/casic/ci/ticket}/dal/pojo/CredentialPermissions.java (95%) create mode 100644 modules/ci-ticket/src/main/java/cd/casic/ci/ticket/dal/pojo/CredentialSettingUpdate.java rename modules/{pipeline-ci-ticket/src/main/java/cd/casic/pipeline => ci-ticket/src/main/java/cd/casic/ci/ticket}/dal/pojo/CredentialUpdate.java (92%) rename modules/{pipeline-ci-ticket/src/main/java/cd/casic/pipeline => ci-ticket/src/main/java/cd/casic/ci/ticket}/dal/pojo/CredentialWithPermission.java (95%) rename modules/{pipeline-ci-ticket/src/main/java/cd/casic/pipeline => ci-ticket/src/main/java/cd/casic/ci/ticket}/service/CredentialHelper.java (97%) rename modules/{pipeline-ci-ticket/src/main/java/cd/casic/pipeline => ci-ticket/src/main/java/cd/casic/ci/ticket}/service/CredentialService.java (59%) rename modules/{pipeline-ci-ticket/src/main/java/cd/casic/pipeline => ci-ticket/src/main/java/cd/casic/ci/ticket}/service/CredentialServiceImpl.java (92%) delete mode 100644 modules/pipeline-ci-event/src/main/java/cd/casic/pipeline/Main.java delete mode 100644 modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/config/BuildLogPrinter.java delete mode 100644 modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/dal/pojo/message/LogMessageWithLineNo.java delete mode 100644 modules/pipeline-ci-process/src/main/java/cd/casic/pipeline/process/dal/package-info.java delete mode 100644 modules/pipeline-ci-process/src/main/java/cd/casic/pipeline/process/utils/AESUtil.java delete mode 100644 modules/pipeline-ci-process/src/main/java/cd/casic/pipeline/process/utils/CommonUtils.java delete mode 100644 modules/pipeline-ci-process/src/main/java/cd/casic/pipeline/process/utils/LogUtils.java delete mode 100644 modules/pipeline-ci-process/src/main/java/cd/casic/pipeline/process/utils/RetryUtils.java delete mode 100644 modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/service/ProjectPermissionService.java delete mode 100644 modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/Main.java delete mode 100644 modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/code/CodeRepositoryService.java delete mode 100644 modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/github/GithubTokenService.java delete mode 100644 modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/tgit/ITGitService.java delete mode 100644 modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/tgit/TGitOauthService.java delete mode 100644 modules/pipeline-ci-ticket/src/main/java/cd/casic/pipeline/api/ServiceCredentialApi.java delete mode 100644 modules/pipeline-ci-ticket/src/main/java/cd/casic/pipeline/api/impl/ServiceCredentialApiImpl.java diff --git a/.idea/compiler.xml b/.idea/compiler.xml index 859bf4f..19c1013 100644 --- a/.idea/compiler.xml +++ b/.idea/compiler.xml @@ -13,44 +13,62 @@ + + - + + + - - - - + + - - - + - + + + + + + + + + + + + + + diff --git a/dependencies/pom.xml b/dependencies/pom.xml index 9ecc05d..94a2c71 100644 --- a/dependencies/pom.xml +++ b/dependencies/pom.xml @@ -205,20 +205,56 @@ - cd.casic.pipeline - pipeline-ci-commons + cd.casic.ci + ci-commons ${revision} - cd.casic.pipeline - pipeline-ci-event + cd.casic.ci + ci-event ${revision} - cd.casic.pipeline - pipeline-ci-log + cd.casic.ci + ci-log + ${revision} + + + + cd.casic.ci + ci-market + ${revision} + + + + cd.casic.ci + ci-process + ${revision} + + + + cd.casic.ci + ci-project + ${revision} + + + + cd.casic.ci + ci-quality + ${revision} + + + + cd.casic.ci + ci-ticket + ${revision} + + + + cd.casic.ci + ci-scm-repository ${revision} diff --git a/modules/pipeline-ci-commons/pom.xml b/modules/ci-commons/pom.xml similarity index 87% rename from modules/pipeline-ci-commons/pom.xml rename to modules/ci-commons/pom.xml index 7c81ebb..027857a 100644 --- a/modules/pipeline-ci-commons/pom.xml +++ b/modules/ci-commons/pom.xml @@ -7,12 +7,15 @@ cd.casic.boot modules ${revision} + ../pom.xml - cd.casic.pipeline - pipeline-ci-commons + cd.casic.ci + ci-commons ${revision} + jar + 流水线process、流水线engine、流水线work、资源管理层、环境管理、agent、构建调度、项目管理、代码库、凭证、扩展Plugin、日志、流水线外设需要的commons diff --git a/modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/constant/BaseConstant.java b/modules/ci-commons/src/main/java/cd/casic/ci/commons/constant/BaseConstant.java similarity index 86% rename from modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/constant/BaseConstant.java rename to modules/ci-commons/src/main/java/cd/casic/ci/commons/constant/BaseConstant.java index e26e7d0..421766d 100644 --- a/modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/constant/BaseConstant.java +++ b/modules/ci-commons/src/main/java/cd/casic/ci/commons/constant/BaseConstant.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.commons.constant; +package cd.casic.ci.commons.constant; /** * @Classname BaseConstant diff --git a/modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/constant/CommonConstants.java b/modules/ci-commons/src/main/java/cd/casic/ci/commons/constant/CommonConstants.java similarity index 99% rename from modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/constant/CommonConstants.java rename to modules/ci-commons/src/main/java/cd/casic/ci/commons/constant/CommonConstants.java index 78ec33e..636ecd4 100644 --- a/modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/constant/CommonConstants.java +++ b/modules/ci-commons/src/main/java/cd/casic/ci/commons/constant/CommonConstants.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.commons.constant; +package cd.casic.ci.commons.constant; /** * @Classname CommonConstants diff --git a/modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/constant/CommonMessageCode.java b/modules/ci-commons/src/main/java/cd/casic/ci/commons/constant/CommonMessageCode.java similarity index 99% rename from modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/constant/CommonMessageCode.java rename to modules/ci-commons/src/main/java/cd/casic/ci/commons/constant/CommonMessageCode.java index 8ef614a..b2abb14 100644 --- a/modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/constant/CommonMessageCode.java +++ b/modules/ci-commons/src/main/java/cd/casic/ci/commons/constant/CommonMessageCode.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.commons.constant; +package cd.casic.ci.commons.constant; /** * @Classname CommonMessageCode diff --git a/modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/constant/LeafAllocConstant.java b/modules/ci-commons/src/main/java/cd/casic/ci/commons/constant/LeafAllocConstant.java similarity index 98% rename from modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/constant/LeafAllocConstant.java rename to modules/ci-commons/src/main/java/cd/casic/ci/commons/constant/LeafAllocConstant.java index 9412c12..52e0eaf 100644 --- a/modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/constant/LeafAllocConstant.java +++ b/modules/ci-commons/src/main/java/cd/casic/ci/commons/constant/LeafAllocConstant.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.commons.constant; +package cd.casic.ci.commons.constant; /** * @Classname LeafAllocConstant diff --git a/modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/constant/OpsHeader.java b/modules/ci-commons/src/main/java/cd/casic/ci/commons/constant/OpsHeader.java similarity index 99% rename from modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/constant/OpsHeader.java rename to modules/ci-commons/src/main/java/cd/casic/ci/commons/constant/OpsHeader.java index d1f30ac..d339145 100644 --- a/modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/constant/OpsHeader.java +++ b/modules/ci-commons/src/main/java/cd/casic/ci/commons/constant/OpsHeader.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.commons.constant; +package cd.casic.ci.commons.constant; import lombok.NoArgsConstructor; import lombok.val; diff --git a/modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/enums/BkStyleEnum.java b/modules/ci-commons/src/main/java/cd/casic/ci/commons/enums/BkStyleEnum.java similarity index 97% rename from modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/enums/BkStyleEnum.java rename to modules/ci-commons/src/main/java/cd/casic/ci/commons/enums/BkStyleEnum.java index 8db88cb..0b0651d 100644 --- a/modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/enums/BkStyleEnum.java +++ b/modules/ci-commons/src/main/java/cd/casic/ci/commons/enums/BkStyleEnum.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.commons.enums; +package cd.casic.ci.commons.enums; /** * @Classname StyleEnum diff --git a/modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/enums/CommonStatusEnum.java b/modules/ci-commons/src/main/java/cd/casic/ci/commons/enums/CommonStatusEnum.java similarity index 94% rename from modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/enums/CommonStatusEnum.java rename to modules/ci-commons/src/main/java/cd/casic/ci/commons/enums/CommonStatusEnum.java index 8b2255a..004188e 100644 --- a/modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/enums/CommonStatusEnum.java +++ b/modules/ci-commons/src/main/java/cd/casic/ci/commons/enums/CommonStatusEnum.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.commons.enums; +package cd.casic.ci.commons.enums; import cd.casic.framework.commons.core.IntArrayValuable; import lombok.AllArgsConstructor; diff --git a/modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/enums/DateIntervalEnum.java b/modules/ci-commons/src/main/java/cd/casic/ci/commons/enums/DateIntervalEnum.java similarity index 96% rename from modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/enums/DateIntervalEnum.java rename to modules/ci-commons/src/main/java/cd/casic/ci/commons/enums/DateIntervalEnum.java index 9400c61..5677d57 100644 --- a/modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/enums/DateIntervalEnum.java +++ b/modules/ci-commons/src/main/java/cd/casic/ci/commons/enums/DateIntervalEnum.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.commons.enums; +package cd.casic.ci.commons.enums; import cd.casic.framework.commons.core.IntArrayValuable; import cn.hutool.core.util.ArrayUtil; diff --git a/modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/enums/SubjectScopeType.java b/modules/ci-commons/src/main/java/cd/casic/ci/commons/enums/SubjectScopeType.java similarity index 92% rename from modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/enums/SubjectScopeType.java rename to modules/ci-commons/src/main/java/cd/casic/ci/commons/enums/SubjectScopeType.java index 8dd9a00..9565c6c 100644 --- a/modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/enums/SubjectScopeType.java +++ b/modules/ci-commons/src/main/java/cd/casic/ci/commons/enums/SubjectScopeType.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.commons.enums; +package cd.casic.ci.commons.enums; /** diff --git a/modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/enums/SystemModuleEnum.java b/modules/ci-commons/src/main/java/cd/casic/ci/commons/enums/SystemModuleEnum.java similarity index 97% rename from modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/enums/SystemModuleEnum.java rename to modules/ci-commons/src/main/java/cd/casic/ci/commons/enums/SystemModuleEnum.java index ad8c108..c42ae95 100644 --- a/modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/enums/SystemModuleEnum.java +++ b/modules/ci-commons/src/main/java/cd/casic/ci/commons/enums/SystemModuleEnum.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.commons.enums; +package cd.casic.ci.commons.enums; /** * @author mianbin diff --git a/modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/enums/UserTypeEnum.java b/modules/ci-commons/src/main/java/cd/casic/ci/commons/enums/UserTypeEnum.java similarity index 95% rename from modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/enums/UserTypeEnum.java rename to modules/ci-commons/src/main/java/cd/casic/ci/commons/enums/UserTypeEnum.java index 8a4229e..2cb048c 100644 --- a/modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/enums/UserTypeEnum.java +++ b/modules/ci-commons/src/main/java/cd/casic/ci/commons/enums/UserTypeEnum.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.commons.enums; +package cd.casic.ci.commons.enums; import cd.casic.framework.commons.core.IntArrayValuable; import cn.hutool.core.util.ArrayUtil; diff --git a/modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/functions/Preconditions.java b/modules/ci-commons/src/main/java/cd/casic/ci/commons/functions/Preconditions.java similarity index 90% rename from modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/functions/Preconditions.java rename to modules/ci-commons/src/main/java/cd/casic/ci/commons/functions/Preconditions.java index e988e35..d77544b 100644 --- a/modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/functions/Preconditions.java +++ b/modules/ci-commons/src/main/java/cd/casic/ci/commons/functions/Preconditions.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.commons.functions; +package cd.casic.ci.commons.functions; import lombok.SneakyThrows; diff --git a/modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/operationid/LeafAllocMapper.java b/modules/ci-commons/src/main/java/cd/casic/ci/commons/operationid/LeafAllocMapper.java similarity index 72% rename from modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/operationid/LeafAllocMapper.java rename to modules/ci-commons/src/main/java/cd/casic/ci/commons/operationid/LeafAllocMapper.java index d1e6fed..30016f8 100644 --- a/modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/operationid/LeafAllocMapper.java +++ b/modules/ci-commons/src/main/java/cd/casic/ci/commons/operationid/LeafAllocMapper.java @@ -1,7 +1,7 @@ -package cd.casic.pipeline.commons.operationid; +package cd.casic.ci.commons.operationid; +import cd.casic.ci.commons.operationid.entity.LeafAlloc; import cd.casic.framework.mybatis.core.mapper.BaseMapperX; -import cd.casic.pipeline.commons.operationid.entity.LeafAlloc; import org.apache.ibatis.annotations.Mapper; /** diff --git a/modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/operationid/LeafAllocService.java b/modules/ci-commons/src/main/java/cd/casic/ci/commons/operationid/LeafAllocService.java similarity index 75% rename from modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/operationid/LeafAllocService.java rename to modules/ci-commons/src/main/java/cd/casic/ci/commons/operationid/LeafAllocService.java index 997be6a..3992e60 100644 --- a/modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/operationid/LeafAllocService.java +++ b/modules/ci-commons/src/main/java/cd/casic/ci/commons/operationid/LeafAllocService.java @@ -1,8 +1,7 @@ -package cd.casic.pipeline.commons.operationid; +package cd.casic.ci.commons.operationid; -import cd.casic.framework.mybatis.core.mapper.BaseMapperX; -import cd.casic.pipeline.commons.operationid.entity.LeafAlloc; +import cd.casic.ci.commons.operationid.entity.LeafAlloc; import java.util.List; /** diff --git a/modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/operationid/LeafAllocServiceImpl.java b/modules/ci-commons/src/main/java/cd/casic/ci/commons/operationid/LeafAllocServiceImpl.java similarity index 92% rename from modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/operationid/LeafAllocServiceImpl.java rename to modules/ci-commons/src/main/java/cd/casic/ci/commons/operationid/LeafAllocServiceImpl.java index 8b4a378..26508c6 100644 --- a/modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/operationid/LeafAllocServiceImpl.java +++ b/modules/ci-commons/src/main/java/cd/casic/ci/commons/operationid/LeafAllocServiceImpl.java @@ -1,11 +1,9 @@ -package cd.casic.pipeline.commons.operationid; +package cd.casic.ci.commons.operationid; +import cd.casic.ci.commons.operationid.entity.LeafAlloc; import cd.casic.framework.commons.exception.ServiceException; import cd.casic.framework.commons.exception.enums.GlobalErrorCodeConstants; -import cd.casic.framework.commons.util.date.DateUtils; -import cd.casic.framework.mybatis.core.query.LambdaQueryWrapperX; -import cd.casic.pipeline.commons.operationid.entity.LeafAlloc; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.date.DateUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; diff --git a/modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/operationid/SegmentIdGeneratorImpl.java b/modules/ci-commons/src/main/java/cd/casic/ci/commons/operationid/SegmentIdGeneratorImpl.java similarity index 96% rename from modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/operationid/SegmentIdGeneratorImpl.java rename to modules/ci-commons/src/main/java/cd/casic/ci/commons/operationid/SegmentIdGeneratorImpl.java index 430bc32..328c592 100644 --- a/modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/operationid/SegmentIdGeneratorImpl.java +++ b/modules/ci-commons/src/main/java/cd/casic/ci/commons/operationid/SegmentIdGeneratorImpl.java @@ -1,14 +1,13 @@ -package cd.casic.pipeline.commons.operationid; +package cd.casic.ci.commons.operationid; +import cd.casic.ci.commons.constant.LeafAllocConstant; +import cd.casic.ci.commons.operationid.entity.LeafAlloc; +import cd.casic.ci.commons.operationid.entity.Segment; +import cd.casic.ci.commons.operationid.entity.SegmentBuffer; import cd.casic.framework.commons.exception.ErrorCode; import cd.casic.framework.commons.exception.ServiceException; -import cd.casic.framework.commons.exception.enums.GlobalErrorCodeConstants; import cd.casic.framework.commons.util.generator.IdGenerator; -import cd.casic.pipeline.commons.constant.LeafAllocConstant; -import cd.casic.pipeline.commons.operationid.entity.LeafAlloc; -import cd.casic.pipeline.commons.operationid.entity.Segment; -import cd.casic.pipeline.commons.operationid.entity.SegmentBuffer; import lombok.extern.slf4j.Slf4j; import java.lang.reflect.Field; diff --git a/modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/operationid/entity/LeafAlloc.java b/modules/ci-commons/src/main/java/cd/casic/ci/commons/operationid/entity/LeafAlloc.java similarity index 97% rename from modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/operationid/entity/LeafAlloc.java rename to modules/ci-commons/src/main/java/cd/casic/ci/commons/operationid/entity/LeafAlloc.java index 5e4c9ad..e8aeb48 100644 --- a/modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/operationid/entity/LeafAlloc.java +++ b/modules/ci-commons/src/main/java/cd/casic/ci/commons/operationid/entity/LeafAlloc.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.commons.operationid.entity; +package cd.casic.ci.commons.operationid.entity; import cd.casic.framework.commons.util.validation.ValidGroup; import cd.casic.framework.mybatis.core.dataobject.BaseDO; diff --git a/modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/operationid/entity/Segment.java b/modules/ci-commons/src/main/java/cd/casic/ci/commons/operationid/entity/Segment.java similarity index 90% rename from modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/operationid/entity/Segment.java rename to modules/ci-commons/src/main/java/cd/casic/ci/commons/operationid/entity/Segment.java index 26d89b3..e41508b 100644 --- a/modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/operationid/entity/Segment.java +++ b/modules/ci-commons/src/main/java/cd/casic/ci/commons/operationid/entity/Segment.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.commons.operationid.entity; +package cd.casic.ci.commons.operationid.entity; import lombok.Data; diff --git a/modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/operationid/entity/SegmentBuffer.java b/modules/ci-commons/src/main/java/cd/casic/ci/commons/operationid/entity/SegmentBuffer.java similarity index 96% rename from modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/operationid/entity/SegmentBuffer.java rename to modules/ci-commons/src/main/java/cd/casic/ci/commons/operationid/entity/SegmentBuffer.java index 6d7ad70..286c8f3 100644 --- a/modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/operationid/entity/SegmentBuffer.java +++ b/modules/ci-commons/src/main/java/cd/casic/ci/commons/operationid/entity/SegmentBuffer.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.commons.operationid.entity; +package cd.casic.ci.commons.operationid.entity; import lombok.Data; diff --git a/modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/operationid/entity/Status.java b/modules/ci-commons/src/main/java/cd/casic/ci/commons/operationid/entity/Status.java similarity index 75% rename from modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/operationid/entity/Status.java rename to modules/ci-commons/src/main/java/cd/casic/ci/commons/operationid/entity/Status.java index 1f603f1..2bc0935 100644 --- a/modules/pipeline-ci-commons/src/main/java/cd/casic/pipeline/commons/operationid/entity/Status.java +++ b/modules/ci-commons/src/main/java/cd/casic/ci/commons/operationid/entity/Status.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.commons.operationid.entity; +package cd.casic.ci.commons.operationid.entity; /** * @author mianbin * @Classname Segment diff --git a/modules/pipeline-ci-quality/pom.xml b/modules/ci-event/pom.xml similarity index 70% rename from modules/pipeline-ci-quality/pom.xml rename to modules/ci-event/pom.xml index 7a3ff75..7c3e1fb 100644 --- a/modules/pipeline-ci-quality/pom.xml +++ b/modules/ci-event/pom.xml @@ -7,17 +7,19 @@ cd.casic.boot modules ${revision} + ../pom.xml - cd.casic.pipeline - pipeline-ci-quality + cd.casic.ci + ci-event ${revision} + jar - cd.casic.pipeline - pipeline-ci-commons + cd.casic.ci + ci-commons diff --git a/modules/pipeline-ci-log/pom.xml b/modules/ci-log/pom.xml similarity index 83% rename from modules/pipeline-ci-log/pom.xml rename to modules/ci-log/pom.xml index 18b4f51..b10eeba 100644 --- a/modules/pipeline-ci-log/pom.xml +++ b/modules/ci-log/pom.xml @@ -7,17 +7,18 @@ cd.casic.boot modules ${revision} + ../pom.xml - cd.casic.pipeline - pipeline-ci-log + cd.casic.ci + ci-log ${revision} - cd.casic.pipeline - pipeline-ci-commons + cd.casic.ci + ci-commons diff --git a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/api/AppLogResource.java b/modules/ci-log/src/main/java/cd/casic/ci/log/api/AppLogResource.java similarity index 97% rename from modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/api/AppLogResource.java rename to modules/ci-log/src/main/java/cd/casic/ci/log/api/AppLogResource.java index 04104e7..e76aa4d 100644 --- a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/api/AppLogResource.java +++ b/modules/ci-log/src/main/java/cd/casic/ci/log/api/AppLogResource.java @@ -1,17 +1,17 @@ -package cd.casic.pipeline.api; +package cd.casic.ci.log.api; +import cd.casic.ci.log.dal.pojo.EndPageQueryLogs; +import cd.casic.ci.log.dal.pojo.PageQueryLogs; +import cd.casic.ci.log.dal.pojo.QueryLogs; +import cd.casic.ci.log.dal.pojo.enums.LogType; import cd.casic.framework.commons.pojo.CommonResult; -import cd.casic.pipeline.enums.LogType; -import cd.casic.pipeline.dal.pojo.EndPageQueryLogs; -import cd.casic.pipeline.dal.pojo.PageQueryLogs; -import cd.casic.pipeline.dal.pojo.QueryLogs; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.web.bind.annotation.*; -import static cd.casic.pipeline.commons.constant.OpsHeader.*; +import static cd.casic.ci.commons.constant.OpsHeader.*; @Tag(name = "用户-日志资源") diff --git a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/api/BuildLogPrintResource.java b/modules/ci-log/src/main/java/cd/casic/ci/log/api/BuildLogPrintResource.java similarity index 95% rename from modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/api/BuildLogPrintResource.java rename to modules/ci-log/src/main/java/cd/casic/ci/log/api/BuildLogPrintResource.java index 9d3f1ba..268ea12 100644 --- a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/api/BuildLogPrintResource.java +++ b/modules/ci-log/src/main/java/cd/casic/ci/log/api/BuildLogPrintResource.java @@ -1,8 +1,8 @@ -package cd.casic.pipeline.api; +package cd.casic.ci.log.api; +import cd.casic.ci.log.dal.pojo.TaskBuildLogProperty; import cd.casic.framework.commons.pojo.CommonResult; -import cd.casic.pipeline.dal.pojo.TaskBuildLogProperty; -import cd.casic.pipeline.dal.pojo.message.LogMessage; +import cd.casic.ci.log.dal.pojo.message.LogMessage; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; @@ -11,7 +11,7 @@ import org.springframework.web.bind.annotation.*; import java.util.List; -import static cd.casic.pipeline.commons.constant.OpsHeader.*; +import static cd.casic.ci.commons.constant.OpsHeader.*; /** * @author by mianbin diff --git a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/api/OpLogResource.java b/modules/ci-log/src/main/java/cd/casic/ci/log/api/OpLogResource.java similarity index 94% rename from modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/api/OpLogResource.java rename to modules/ci-log/src/main/java/cd/casic/ci/log/api/OpLogResource.java index 94f83d5..cf28df1 100644 --- a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/api/OpLogResource.java +++ b/modules/ci-log/src/main/java/cd/casic/ci/log/api/OpLogResource.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.api; +package cd.casic.ci.log.api; import cd.casic.framework.commons.pojo.CommonResult; diff --git a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/api/ServiceLogPrintResource.java b/modules/ci-log/src/main/java/cd/casic/ci/log/api/ServiceLogPrintResource.java similarity index 94% rename from modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/api/ServiceLogPrintResource.java rename to modules/ci-log/src/main/java/cd/casic/ci/log/api/ServiceLogPrintResource.java index acbea24..cf3d310 100644 --- a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/api/ServiceLogPrintResource.java +++ b/modules/ci-log/src/main/java/cd/casic/ci/log/api/ServiceLogPrintResource.java @@ -1,10 +1,10 @@ -package cd.casic.pipeline.api; +package cd.casic.ci.log.api; import cd.casic.framework.commons.pojo.CommonResult; -import cd.casic.pipeline.enums.LogStorageMode; -import cd.casic.pipeline.dal.pojo.message.LogMessage; +import cd.casic.ci.log.dal.pojo.enums.LogStorageMode; +import cd.casic.ci.log.dal.pojo.message.LogMessage; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; @@ -13,7 +13,7 @@ import org.springframework.web.bind.annotation.*; import java.util.List; -import static cd.casic.pipeline.commons.constant.OpsHeader.AUTH_HEADER_DEVOPS_BUILD_ID; +import static cd.casic.ci.commons.constant.OpsHeader.AUTH_HEADER_DEVOPS_BUILD_ID; @RestController diff --git a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/api/ServiceLogResource.java b/modules/ci-log/src/main/java/cd/casic/ci/log/api/ServiceLogResource.java similarity index 96% rename from modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/api/ServiceLogResource.java rename to modules/ci-log/src/main/java/cd/casic/ci/log/api/ServiceLogResource.java index a06d2da..0555c3d 100644 --- a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/api/ServiceLogResource.java +++ b/modules/ci-log/src/main/java/cd/casic/ci/log/api/ServiceLogResource.java @@ -1,17 +1,17 @@ -package cd.casic.pipeline.api; +package cd.casic.ci.log.api; +import cd.casic.ci.log.dal.pojo.QueryLogLineNum; +import cd.casic.ci.log.dal.pojo.QueryLogStatus; +import cd.casic.ci.log.dal.pojo.QueryLogs; +import cd.casic.ci.log.dal.pojo.enums.LogType; import cd.casic.framework.commons.pojo.CommonResult; -import cd.casic.pipeline.enums.LogType; -import cd.casic.pipeline.dal.pojo.QueryLogLineNum; -import cd.casic.pipeline.dal.pojo.QueryLogStatus; -import cd.casic.pipeline.dal.pojo.QueryLogs; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.web.bind.annotation.*; -import static cd.casic.pipeline.commons.constant.OpsHeader.*; +import static cd.casic.ci.commons.constant.OpsHeader.*; @RestController diff --git a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/api/UserLogResource.java b/modules/ci-log/src/main/java/cd/casic/ci/log/api/UserLogResource.java similarity index 97% rename from modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/api/UserLogResource.java rename to modules/ci-log/src/main/java/cd/casic/ci/log/api/UserLogResource.java index 2ac860a..90b1790 100644 --- a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/api/UserLogResource.java +++ b/modules/ci-log/src/main/java/cd/casic/ci/log/api/UserLogResource.java @@ -1,17 +1,17 @@ -package cd.casic.pipeline.api; +package cd.casic.ci.log.api; +import cd.casic.ci.log.dal.pojo.QueryLogStatus; +import cd.casic.ci.log.dal.pojo.QueryLogs; +import cd.casic.ci.log.dal.pojo.enums.LogType; import cd.casic.framework.commons.pojo.CommonResult; -import cd.casic.pipeline.enums.LogType; -import cd.casic.pipeline.dal.pojo.QueryLogStatus; -import cd.casic.pipeline.dal.pojo.QueryLogs; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; -import static cd.casic.pipeline.commons.constant.OpsHeader.*; +import static cd.casic.ci.commons.constant.OpsHeader.*; @RestController diff --git a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/api/impl/AppLogResourceImpl.java b/modules/ci-log/src/main/java/cd/casic/ci/log/api/impl/AppLogResourceImpl.java similarity index 89% rename from modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/api/impl/AppLogResourceImpl.java rename to modules/ci-log/src/main/java/cd/casic/ci/log/api/impl/AppLogResourceImpl.java index 85be563..aac97f9 100644 --- a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/api/impl/AppLogResourceImpl.java +++ b/modules/ci-log/src/main/java/cd/casic/ci/log/api/impl/AppLogResourceImpl.java @@ -1,14 +1,14 @@ -package cd.casic.pipeline.api.impl; +package cd.casic.ci.log.api.impl; +import cd.casic.ci.log.dal.pojo.EndPageQueryLogs; +import cd.casic.ci.log.dal.pojo.PageQueryLogs; +import cd.casic.ci.log.dal.pojo.QueryLogs; import cd.casic.framework.commons.pojo.CommonResult; -import cd.casic.pipeline.api.AppLogResource; -import cd.casic.pipeline.enums.LogType; -import cd.casic.pipeline.dal.pojo.EndPageQueryLogs; -import cd.casic.pipeline.dal.pojo.PageQueryLogs; -import cd.casic.pipeline.dal.pojo.QueryLogs; -import cd.casic.pipeline.service.BuildLogQueryService; -import cd.casic.pipeline.service.LogTagService; +import cd.casic.ci.log.api.AppLogResource; +import cd.casic.ci.log.dal.pojo.enums.LogType; +import cd.casic.ci.log.service.BuildLogQueryService; +import cd.casic.ci.log.service.LogTagService; import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.RestController; diff --git a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/api/impl/BuildLogPrintResourceImpl.java b/modules/ci-log/src/main/java/cd/casic/ci/log/api/impl/BuildLogPrintResourceImpl.java similarity index 92% rename from modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/api/impl/BuildLogPrintResourceImpl.java rename to modules/ci-log/src/main/java/cd/casic/ci/log/api/impl/BuildLogPrintResourceImpl.java index f82218a..dea3f97 100644 --- a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/api/impl/BuildLogPrintResourceImpl.java +++ b/modules/ci-log/src/main/java/cd/casic/ci/log/api/impl/BuildLogPrintResourceImpl.java @@ -1,20 +1,20 @@ -package cd.casic.pipeline.api.impl; +package cd.casic.ci.log.api.impl; +import cd.casic.ci.log.dal.pojo.TaskBuildLogProperty; +import cd.casic.ci.log.dal.pojo.meta.Ansi; import cd.casic.framework.commons.exception.ErrorCode; import cd.casic.framework.commons.pojo.CommonResult; -import cd.casic.pipeline.api.BuildLogPrintResource; -import cd.casic.pipeline.enums.LogStorageMode; -import cd.casic.pipeline.dal.pojo.meta.Ansi; -import cd.casic.pipeline.dal.pojo.TaskBuildLogProperty; -import cd.casic.pipeline.service.BuildLogPrintService; -import cd.casic.pipeline.service.IndexService; -import cd.casic.pipeline.service.LogStatusService; +import cd.casic.ci.log.api.BuildLogPrintResource; +import cd.casic.ci.log.dal.pojo.enums.LogStorageMode; +import cd.casic.ci.log.service.BuildLogPrintService; +import cd.casic.ci.log.service.IndexService; +import cd.casic.ci.log.service.LogStatusService; import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; import org.apache.logging.log4j.util.Strings; import org.springframework.beans.factory.annotation.Value; -import cd.casic.pipeline.dal.pojo.message.LogMessage; +import cd.casic.ci.log.dal.pojo.message.LogMessage; import org.springframework.web.bind.annotation.RestController; import java.util.ArrayList; diff --git a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/api/impl/OpLogResourceImpl.java b/modules/ci-log/src/main/java/cd/casic/ci/log/api/impl/OpLogResourceImpl.java similarity index 80% rename from modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/api/impl/OpLogResourceImpl.java rename to modules/ci-log/src/main/java/cd/casic/ci/log/api/impl/OpLogResourceImpl.java index 87e4dcf..9cec8f2 100644 --- a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/api/impl/OpLogResourceImpl.java +++ b/modules/ci-log/src/main/java/cd/casic/ci/log/api/impl/OpLogResourceImpl.java @@ -1,8 +1,8 @@ -package cd.casic.pipeline.api.impl; +package cd.casic.ci.log.api.impl; import cd.casic.framework.commons.pojo.CommonResult; -import cd.casic.pipeline.api.OpLogResource; +import cd.casic.ci.log.api.OpLogResource; import org.springframework.web.bind.annotation.RestController; diff --git a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/api/impl/ServiceLogPrintResourceImpl.java b/modules/ci-log/src/main/java/cd/casic/ci/log/api/impl/ServiceLogPrintResourceImpl.java similarity index 89% rename from modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/api/impl/ServiceLogPrintResourceImpl.java rename to modules/ci-log/src/main/java/cd/casic/ci/log/api/impl/ServiceLogPrintResourceImpl.java index ab20a65..d0a0ae2 100644 --- a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/api/impl/ServiceLogPrintResourceImpl.java +++ b/modules/ci-log/src/main/java/cd/casic/ci/log/api/impl/ServiceLogPrintResourceImpl.java @@ -1,14 +1,14 @@ -package cd.casic.pipeline.api.impl; +package cd.casic.ci.log.api.impl; +import cd.casic.ci.log.api.ServiceLogPrintResource; import cd.casic.framework.commons.exception.ErrorCode; import cd.casic.framework.commons.pojo.CommonResult; -import cd.casic.pipeline.api.ServiceLogPrintResource; -import cd.casic.pipeline.enums.LogStorageMode; -import cd.casic.pipeline.event.log.LogOriginEvent; -import cd.casic.pipeline.dal.pojo.message.LogMessage; -import cd.casic.pipeline.service.BuildLogPrintService; -import cd.casic.pipeline.service.IndexService; +import cd.casic.ci.log.dal.pojo.enums.LogStorageMode; +import cd.casic.ci.log.log.LogOriginEvent; +import cd.casic.ci.log.dal.pojo.message.LogMessage; +import cd.casic.ci.log.service.BuildLogPrintService; +import cd.casic.ci.log.service.IndexService; import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; import org.apache.logging.log4j.util.Strings; diff --git a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/api/impl/ServiceLogResourceImpl.java b/modules/ci-log/src/main/java/cd/casic/ci/log/api/impl/ServiceLogResourceImpl.java similarity index 86% rename from modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/api/impl/ServiceLogResourceImpl.java rename to modules/ci-log/src/main/java/cd/casic/ci/log/api/impl/ServiceLogResourceImpl.java index e2c8888..44abdb3 100644 --- a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/api/impl/ServiceLogResourceImpl.java +++ b/modules/ci-log/src/main/java/cd/casic/ci/log/api/impl/ServiceLogResourceImpl.java @@ -1,14 +1,14 @@ -package cd.casic.pipeline.api.impl; +package cd.casic.ci.log.api.impl; +import cd.casic.ci.log.dal.pojo.QueryLogLineNum; +import cd.casic.ci.log.dal.pojo.QueryLogStatus; +import cd.casic.ci.log.dal.pojo.QueryLogs; import cd.casic.framework.commons.pojo.CommonResult; -import cd.casic.pipeline.api.ServiceLogResource; -import cd.casic.pipeline.enums.LogType; -import cd.casic.pipeline.dal.pojo.QueryLogLineNum; -import cd.casic.pipeline.dal.pojo.QueryLogStatus; -import cd.casic.pipeline.dal.pojo.QueryLogs; -import cd.casic.pipeline.service.BuildLogQueryService; +import cd.casic.ci.log.api.ServiceLogResource; +import cd.casic.ci.log.dal.pojo.enums.LogType; +import cd.casic.ci.log.service.BuildLogQueryService; import jakarta.annotation.Resource; import org.springframework.web.bind.annotation.RestController; diff --git a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/api/impl/UserLogResourceImpl.java b/modules/ci-log/src/main/java/cd/casic/ci/log/api/impl/UserLogResourceImpl.java similarity index 91% rename from modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/api/impl/UserLogResourceImpl.java rename to modules/ci-log/src/main/java/cd/casic/ci/log/api/impl/UserLogResourceImpl.java index aa992d5..1aa34a5 100644 --- a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/api/impl/UserLogResourceImpl.java +++ b/modules/ci-log/src/main/java/cd/casic/ci/log/api/impl/UserLogResourceImpl.java @@ -1,14 +1,14 @@ -package cd.casic.pipeline.api.impl; +package cd.casic.ci.log.api.impl; +import cd.casic.ci.log.dal.pojo.LogLine; +import cd.casic.ci.log.dal.pojo.QueryLogStatus; +import cd.casic.ci.log.dal.pojo.QueryLogs; import io.micrometer.core.instrument.Counter; import io.micrometer.core.instrument.MeterRegistry; import cd.casic.framework.commons.pojo.CommonResult; -import cd.casic.pipeline.api.UserLogResource; -import cd.casic.pipeline.enums.LogType; -import cd.casic.pipeline.dal.pojo.LogLine; -import cd.casic.pipeline.dal.pojo.QueryLogStatus; -import cd.casic.pipeline.dal.pojo.QueryLogs; -import cd.casic.pipeline.service.BuildLogQueryService; +import cd.casic.ci.log.api.UserLogResource; +import cd.casic.ci.log.dal.pojo.enums.LogType; +import cd.casic.ci.log.service.BuildLogQueryService; import io.micrometer.core.annotation.Timed; import jakarta.annotation.Resource; import org.springframework.beans.factory.annotation.Value; diff --git a/modules/ci-log/src/main/java/cd/casic/ci/log/config/LogPrinterConfiguration.java b/modules/ci-log/src/main/java/cd/casic/ci/log/config/LogPrinterConfiguration.java new file mode 100644 index 0000000..ea7c0a5 --- /dev/null +++ b/modules/ci-log/src/main/java/cd/casic/ci/log/config/LogPrinterConfiguration.java @@ -0,0 +1,27 @@ +package cd.casic.ci.log.config; + +import lombok.val; +import org.springframework.boot.autoconfigure.AutoConfigureOrder; +import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.core.Ordered; + +import java.time.Duration; + +/** + * @Author:mianbin + * @Package:cd.casic.pipeline.config + * @Project:ops-pro + * @name:LogPrinterConfiguration + * @Date:2025/03/24 10:45 + * @Filename:LogPrinterConfiguration + * @description:Todo暂时日志的先放着 + */ +@Configuration +@ConditionalOnWebApplication +@AutoConfigureOrder(Ordered.LOWEST_PRECEDENCE) +public class LogPrinterConfiguration { + + +} diff --git a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/dal/dao/IndexMapper.java b/modules/ci-log/src/main/java/cd/casic/ci/log/dal/dao/IndexMapper.java similarity index 94% rename from modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/dal/dao/IndexMapper.java rename to modules/ci-log/src/main/java/cd/casic/ci/log/dal/dao/IndexMapper.java index 57f5f61..d0c2ab3 100644 --- a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/dal/dao/IndexMapper.java +++ b/modules/ci-log/src/main/java/cd/casic/ci/log/dal/dao/IndexMapper.java @@ -1,7 +1,7 @@ -package cd.casic.pipeline.dal.dao; +package cd.casic.ci.log.dal.dao; import cd.casic.framework.mybatis.core.mapper.BaseMapperX; -import cd.casic.pipeline.dal.dataobject.LogIndicesV2; +import cd.casic.ci.log.dal.dataobject.LogIndicesV2; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import org.apache.ibatis.annotations.Mapper; diff --git a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/dal/dao/LogStatusMapper.java b/modules/ci-log/src/main/java/cd/casic/ci/log/dal/dao/LogStatusMapper.java similarity index 76% rename from modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/dal/dao/LogStatusMapper.java rename to modules/ci-log/src/main/java/cd/casic/ci/log/dal/dao/LogStatusMapper.java index c3228c8..9482e50 100644 --- a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/dal/dao/LogStatusMapper.java +++ b/modules/ci-log/src/main/java/cd/casic/ci/log/dal/dao/LogStatusMapper.java @@ -1,7 +1,7 @@ -package cd.casic.pipeline.dal.dao; +package cd.casic.ci.log.dal.dao; import cd.casic.framework.mybatis.core.mapper.BaseMapperX; -import cd.casic.pipeline.dal.dataobject.LogStatus; +import cd.casic.ci.log.dal.dataobject.LogStatus; import org.apache.ibatis.annotations.Mapper; /** diff --git a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/dal/dao/LogTahMapper.java b/modules/ci-log/src/main/java/cd/casic/ci/log/dal/dao/LogTahMapper.java similarity index 93% rename from modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/dal/dao/LogTahMapper.java rename to modules/ci-log/src/main/java/cd/casic/ci/log/dal/dao/LogTahMapper.java index 5b83a36..8759a4c 100644 --- a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/dal/dao/LogTahMapper.java +++ b/modules/ci-log/src/main/java/cd/casic/ci/log/dal/dao/LogTahMapper.java @@ -1,7 +1,7 @@ -package cd.casic.pipeline.dal.dao; +package cd.casic.ci.log.dal.dao; import cd.casic.framework.mybatis.core.mapper.BaseMapperX; -import cd.casic.pipeline.dal.dataobject.LogSubTags; +import cd.casic.ci.log.dal.dataobject.LogSubTags; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import org.apache.ibatis.annotations.Mapper; diff --git a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/dal/dataobject/LogIndicesV2.java b/modules/ci-log/src/main/java/cd/casic/ci/log/dal/dataobject/LogIndicesV2.java similarity index 97% rename from modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/dal/dataobject/LogIndicesV2.java rename to modules/ci-log/src/main/java/cd/casic/ci/log/dal/dataobject/LogIndicesV2.java index 9a5072e..5c349e9 100644 --- a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/dal/dataobject/LogIndicesV2.java +++ b/modules/ci-log/src/main/java/cd/casic/ci/log/dal/dataobject/LogIndicesV2.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.dal.dataobject; +package cd.casic.ci.log.dal.dataobject; import cd.casic.framework.mybatis.core.dataobject.BaseDO; import com.baomidou.mybatisplus.annotation.TableId; diff --git a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/dal/dataobject/LogStatus.java b/modules/ci-log/src/main/java/cd/casic/ci/log/dal/dataobject/LogStatus.java similarity index 96% rename from modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/dal/dataobject/LogStatus.java rename to modules/ci-log/src/main/java/cd/casic/ci/log/dal/dataobject/LogStatus.java index 5198926..777c43c 100644 --- a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/dal/dataobject/LogStatus.java +++ b/modules/ci-log/src/main/java/cd/casic/ci/log/dal/dataobject/LogStatus.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.dal.dataobject; +package cd.casic.ci.log.dal.dataobject; import cd.casic.framework.mybatis.core.dataobject.BaseDO; import com.baomidou.mybatisplus.annotation.TableId; diff --git a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/dal/dataobject/LogSubTags.java b/modules/ci-log/src/main/java/cd/casic/ci/log/dal/dataobject/LogSubTags.java similarity index 95% rename from modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/dal/dataobject/LogSubTags.java rename to modules/ci-log/src/main/java/cd/casic/ci/log/dal/dataobject/LogSubTags.java index 50bfa02..84fc541 100644 --- a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/dal/dataobject/LogSubTags.java +++ b/modules/ci-log/src/main/java/cd/casic/ci/log/dal/dataobject/LogSubTags.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.dal.dataobject; +package cd.casic.ci.log.dal.dataobject; import cd.casic.framework.mybatis.core.dataobject.BaseDO; import com.baomidou.mybatisplus.annotation.TableId; diff --git a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/dal/pojo/EndPageQueryLogs.java b/modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/EndPageQueryLogs.java similarity index 91% rename from modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/dal/pojo/EndPageQueryLogs.java rename to modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/EndPageQueryLogs.java index d13d583..8952824 100644 --- a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/dal/pojo/EndPageQueryLogs.java +++ b/modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/EndPageQueryLogs.java @@ -1,6 +1,6 @@ -package cd.casic.pipeline.dal.pojo; +package cd.casic.ci.log.dal.pojo; -import cd.casic.pipeline.enums.LogStatusEnum; +import cd.casic.ci.log.dal.pojo.enums.LogStatusEnum; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import java.util.ArrayList; diff --git a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/dal/pojo/LogLine.java b/modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/LogLine.java similarity index 83% rename from modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/dal/pojo/LogLine.java rename to modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/LogLine.java index 3cd6303..72b3a03 100644 --- a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/dal/pojo/LogLine.java +++ b/modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/LogLine.java @@ -1,9 +1,10 @@ -package cd.casic.pipeline.dal.pojo; +package cd.casic.ci.log.dal.pojo; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; +import lombok.val; /** * @author by mianbin @@ -30,6 +31,10 @@ public class LogLine { private String subTag = ""; @Schema(description = "日志jobId", required = true) private String jobId = ""; + @Schema(title = "日志containerHashId", required = true) + private String containerHashId; + @Schema(title = "日志stepId", required = true) + private String stepId; @Schema(description = "日志执行次数", required = true) private int executeCount = 1; diff --git a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/dal/pojo/PageQueryLogs.java b/modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/PageQueryLogs.java similarity index 89% rename from modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/dal/pojo/PageQueryLogs.java rename to modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/PageQueryLogs.java index b7d0704..65b2953 100644 --- a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/dal/pojo/PageQueryLogs.java +++ b/modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/PageQueryLogs.java @@ -1,7 +1,7 @@ -package cd.casic.pipeline.dal.pojo; +package cd.casic.ci.log.dal.pojo; import cd.casic.framework.commons.pojo.PageResult; -import cd.casic.pipeline.enums.LogStatusEnum; +import cd.casic.ci.log.dal.pojo.enums.LogStatusEnum; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; diff --git a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/dal/pojo/QueryLogLineNum.java b/modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/QueryLogLineNum.java similarity index 94% rename from modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/dal/pojo/QueryLogLineNum.java rename to modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/QueryLogLineNum.java index 346fdf1..70e6648 100644 --- a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/dal/pojo/QueryLogLineNum.java +++ b/modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/QueryLogLineNum.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.dal.pojo; +package cd.casic.ci.log.dal.pojo; import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; diff --git a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/dal/pojo/QueryLogStatus.java b/modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/QueryLogStatus.java similarity index 86% rename from modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/dal/pojo/QueryLogStatus.java rename to modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/QueryLogStatus.java index b1db4b7..8a04de5 100644 --- a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/dal/pojo/QueryLogStatus.java +++ b/modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/QueryLogStatus.java @@ -1,6 +1,6 @@ -package cd.casic.pipeline.dal.pojo; +package cd.casic.ci.log.dal.pojo; -import cd.casic.pipeline.enums.LogStorageMode; +import cd.casic.ci.log.dal.pojo.enums.LogStorageMode; import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Data; diff --git a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/dal/pojo/QueryLogs.java b/modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/QueryLogs.java similarity index 92% rename from modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/dal/pojo/QueryLogs.java rename to modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/QueryLogs.java index 1f0e282..a0c8c8a 100644 --- a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/dal/pojo/QueryLogs.java +++ b/modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/QueryLogs.java @@ -1,6 +1,6 @@ -package cd.casic.pipeline.dal.pojo; +package cd.casic.ci.log.dal.pojo; -import cd.casic.pipeline.enums.LogStatusEnum; +import cd.casic.ci.log.dal.pojo.enums.LogStatusEnum; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; diff --git a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/dal/pojo/TaskBuildLogProperty.java b/modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/TaskBuildLogProperty.java similarity index 89% rename from modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/dal/pojo/TaskBuildLogProperty.java rename to modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/TaskBuildLogProperty.java index 51ea9b5..15581e5 100644 --- a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/dal/pojo/TaskBuildLogProperty.java +++ b/modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/TaskBuildLogProperty.java @@ -1,6 +1,6 @@ -package cd.casic.pipeline.dal.pojo; +package cd.casic.ci.log.dal.pojo; -import cd.casic.pipeline.enums.LogStorageMode; +import cd.casic.ci.log.dal.pojo.enums.LogStorageMode; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; diff --git a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/enums/LogErrorCodeEnum.java b/modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/enums/LogErrorCodeEnum.java similarity index 92% rename from modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/enums/LogErrorCodeEnum.java rename to modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/enums/LogErrorCodeEnum.java index 6063d79..d7ea269 100644 --- a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/enums/LogErrorCodeEnum.java +++ b/modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/enums/LogErrorCodeEnum.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.enums; +package cd.casic.ci.log.dal.pojo.enums; import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; diff --git a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/enums/LogStatusEnum.java b/modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/enums/LogStatusEnum.java similarity index 96% rename from modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/enums/LogStatusEnum.java rename to modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/enums/LogStatusEnum.java index 5bb57c7..f87ff1c 100644 --- a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/enums/LogStatusEnum.java +++ b/modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/enums/LogStatusEnum.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.enums; +package cd.casic.ci.log.dal.pojo.enums; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/enums/LogStorageMode.java b/modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/enums/LogStorageMode.java similarity index 94% rename from modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/enums/LogStorageMode.java rename to modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/enums/LogStorageMode.java index 4de3566..ee13b06 100644 --- a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/enums/LogStorageMode.java +++ b/modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/enums/LogStorageMode.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.enums; +package cd.casic.ci.log.dal.pojo.enums; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/enums/LogType.java b/modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/enums/LogType.java similarity index 91% rename from modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/enums/LogType.java rename to modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/enums/LogType.java index 7b112ae..c5adc33 100644 --- a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/enums/LogType.java +++ b/modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/enums/LogType.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.enums; +package cd.casic.ci.log.dal.pojo.enums; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/message/LegacyLogMessage.java b/modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/message/LegacyLogMessage.java new file mode 100644 index 0000000..ad8d38e --- /dev/null +++ b/modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/message/LegacyLogMessage.java @@ -0,0 +1,22 @@ +package cd.casic.ci.log.dal.pojo.message; + +import lombok.Data; +import lombok.val; + +/** + * @Author:mianbin + * @Package:cd.casic.pipeline.dal.pojo.message + * @Project:ops-pro + * @name:LegacyLogMessage + * @Date:2025/03/24 10:37 + * @Filename:LegacyLogMessage + * @description:Todo + */ +@Data +public class LegacyLogMessage { + String tag; + String buildId; + String message; + Long timestamp; + Long nanoTime; +} diff --git a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/dal/pojo/message/LogMessage.java b/modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/message/LogMessage.java similarity index 77% rename from modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/dal/pojo/message/LogMessage.java rename to modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/message/LogMessage.java index 4cf7374..5ea1b36 100644 --- a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/dal/pojo/message/LogMessage.java +++ b/modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/message/LogMessage.java @@ -1,6 +1,6 @@ -package cd.casic.pipeline.dal.pojo.message; +package cd.casic.ci.log.dal.pojo.message; -import cd.casic.pipeline.enums.LogType; +import cd.casic.ci.log.dal.pojo.enums.LogType; import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Data; @@ -22,13 +22,16 @@ public class LogMessage { long timestamp; @Schema(description = "标签") String tag = ""; + @Schema(title = "step Id") + String stepId = ""; @Schema(description = "job id") String jobId = ""; + @Schema(title = "container Hash Id") + String containerHashId = ""; @Schema(description = "日志类型") LogType logType = LogType.LOG; @Schema(description = "执行次数") int executeCount; @Schema(description = "子标签") String subTag = null; - } diff --git a/modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/message/LogMessageWithLineNo.java b/modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/message/LogMessageWithLineNo.java new file mode 100644 index 0000000..764a4d4 --- /dev/null +++ b/modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/message/LogMessageWithLineNo.java @@ -0,0 +1,27 @@ +package cd.casic.ci.log.dal.pojo.message; + +import cd.casic.ci.log.dal.pojo.enums.LogType; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.AllArgsConstructor; +import lombok.Data; + +/** + * @author by mianbin + * @Classname LogMessageWithLineNo + * @Date 2025/3/19 17:14 + */ +@Data +@Schema(title = "带行号的日志消息") +@AllArgsConstructor +public class LogMessageWithLineNo { + String tag; + String containerHashId = ""; + String subTag; + String message; + Long timestamp = 0L; + LogType logType = LogType.LOG; + Long lineNo = 0L; + Integer executeCount = 1; + String jobId; + String stepId; +} diff --git a/modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/message/LogStatus.java b/modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/message/LogStatus.java new file mode 100644 index 0000000..4a6709d --- /dev/null +++ b/modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/message/LogStatus.java @@ -0,0 +1,20 @@ +package cd.casic.ci.log.dal.pojo.message; + +import lombok.Data; +import lombok.val; + +/** + * @Author:mianbin + * @Package:cd.casic.pipeline.dal.pojo.message + * @Project:ops-pro + * @name:LogStatus + * @Date:2025/03/24 10:38 + * @Filename:LogStatus + * @description:Todo + */ +@Data +public class LogStatus { + String buildId; + Boolean finished; + Long updateTime; +} diff --git a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/dal/pojo/meta/Ansi.java b/modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/meta/Ansi.java similarity index 98% rename from modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/dal/pojo/meta/Ansi.java rename to modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/meta/Ansi.java index ee2db4f..60fbc17 100644 --- a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/dal/pojo/meta/Ansi.java +++ b/modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/meta/Ansi.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.dal.pojo.meta; +package cd.casic.ci.log.dal.pojo.meta; import org.apache.logging.log4j.util.Strings; diff --git a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/dal/pojo/meta/AnsiAttribute.java b/modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/meta/AnsiAttribute.java similarity index 92% rename from modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/dal/pojo/meta/AnsiAttribute.java rename to modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/meta/AnsiAttribute.java index 2ddcb75..bf36096 100644 --- a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/dal/pojo/meta/AnsiAttribute.java +++ b/modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/meta/AnsiAttribute.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.dal.pojo.meta; +package cd.casic.ci.log.dal.pojo.meta; public enum AnsiAttribute { RESET(0), diff --git a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/dal/pojo/meta/AnsiColor.java b/modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/meta/AnsiColor.java similarity index 91% rename from modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/dal/pojo/meta/AnsiColor.java rename to modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/meta/AnsiColor.java index cc097d3..535152c 100644 --- a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/dal/pojo/meta/AnsiColor.java +++ b/modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/meta/AnsiColor.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.dal.pojo.meta; +package cd.casic.ci.log.dal.pojo.meta; public enum AnsiColor { BLACK(0), diff --git a/modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/meta/AnsiErase.java b/modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/meta/AnsiErase.java new file mode 100644 index 0000000..de2cb51 --- /dev/null +++ b/modules/ci-log/src/main/java/cd/casic/ci/log/dal/pojo/meta/AnsiErase.java @@ -0,0 +1,22 @@ +package cd.casic.ci.log.dal.pojo.meta; + +/** + * @Author:mianbin + * @Package:cd.casic.pipeline.dal.pojo.meta + * @Project:ops-pro + * @name:AnsiErase + * @Date:2025/03/24 10:41 + * @Filename:AnsiErase + * @description:Todo + */ +public enum AnsiErase { + + FORWARD(0), + BACKWARD(1), + ALL(2); + private int value; + + AnsiErase(int value) { + this.value = value; + } +} diff --git a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/jmx/CreateIndexBean.java b/modules/ci-log/src/main/java/cd/casic/ci/log/jmx/CreateIndexBean.java similarity index 98% rename from modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/jmx/CreateIndexBean.java rename to modules/ci-log/src/main/java/cd/casic/ci/log/jmx/CreateIndexBean.java index 0b5ae7d..5e1a4f4 100644 --- a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/jmx/CreateIndexBean.java +++ b/modules/ci-log/src/main/java/cd/casic/ci/log/jmx/CreateIndexBean.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.jmx; +package cd.casic.ci.log.jmx; import lombok.Synchronized; import org.springframework.jmx.export.annotation.ManagedAttribute; diff --git a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/jmx/LogStorageBean.java b/modules/ci-log/src/main/java/cd/casic/ci/log/jmx/LogStorageBean.java similarity index 98% rename from modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/jmx/LogStorageBean.java rename to modules/ci-log/src/main/java/cd/casic/ci/log/jmx/LogStorageBean.java index 4efb7f9..79207dd 100644 --- a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/jmx/LogStorageBean.java +++ b/modules/ci-log/src/main/java/cd/casic/ci/log/jmx/LogStorageBean.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.jmx; +package cd.casic.ci.log.jmx; import lombok.Synchronized; import org.springframework.jmx.export.annotation.ManagedResource; diff --git a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/event/log/IEvent.java b/modules/ci-log/src/main/java/cd/casic/ci/log/log/IEvent.java similarity index 85% rename from modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/event/log/IEvent.java rename to modules/ci-log/src/main/java/cd/casic/ci/log/log/IEvent.java index 6b81ffe..1431801 100644 --- a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/event/log/IEvent.java +++ b/modules/ci-log/src/main/java/cd/casic/ci/log/log/IEvent.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.event.log; +package cd.casic.ci.log.log; import org.springframework.context.ApplicationEvent; diff --git a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/event/log/ILogEvent.java b/modules/ci-log/src/main/java/cd/casic/ci/log/log/ILogEvent.java similarity index 89% rename from modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/event/log/ILogEvent.java rename to modules/ci-log/src/main/java/cd/casic/ci/log/log/ILogEvent.java index b4a2890..54e2f43 100644 --- a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/event/log/ILogEvent.java +++ b/modules/ci-log/src/main/java/cd/casic/ci/log/log/ILogEvent.java @@ -1,8 +1,7 @@ -package cd.casic.pipeline.event.log; +package cd.casic.ci.log.log; import lombok.Data; import lombok.EqualsAndHashCode; -import lombok.Getter; /** * @author by mianbin diff --git a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/event/log/LogOriginEvent.java b/modules/ci-log/src/main/java/cd/casic/ci/log/log/LogOriginEvent.java similarity index 87% rename from modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/event/log/LogOriginEvent.java rename to modules/ci-log/src/main/java/cd/casic/ci/log/log/LogOriginEvent.java index 0632059..ef1a80a 100644 --- a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/event/log/LogOriginEvent.java +++ b/modules/ci-log/src/main/java/cd/casic/ci/log/log/LogOriginEvent.java @@ -1,6 +1,6 @@ -package cd.casic.pipeline.event.log; +package cd.casic.ci.log.log; -import cd.casic.pipeline.dal.pojo.message.LogMessage; +import cd.casic.ci.log.dal.pojo.message.LogMessage; import lombok.AllArgsConstructor; import lombok.Data; import lombok.EqualsAndHashCode; diff --git a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/event/log/LogStatusEvent.java b/modules/ci-log/src/main/java/cd/casic/ci/log/log/LogStatusEvent.java similarity index 89% rename from modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/event/log/LogStatusEvent.java rename to modules/ci-log/src/main/java/cd/casic/ci/log/log/LogStatusEvent.java index 9ddbaf7..bbeb015 100644 --- a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/event/log/LogStatusEvent.java +++ b/modules/ci-log/src/main/java/cd/casic/ci/log/log/LogStatusEvent.java @@ -1,8 +1,7 @@ -package cd.casic.pipeline.event.log; +package cd.casic.ci.log.log; import lombok.AllArgsConstructor; import lombok.Data; -import lombok.Getter; /** * @author by mianbin diff --git a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/event/log/LogStorageEvent.java b/modules/ci-log/src/main/java/cd/casic/ci/log/log/LogStorageEvent.java similarity index 83% rename from modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/event/log/LogStorageEvent.java rename to modules/ci-log/src/main/java/cd/casic/ci/log/log/LogStorageEvent.java index 065ecdb..26d764a 100644 --- a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/event/log/LogStorageEvent.java +++ b/modules/ci-log/src/main/java/cd/casic/ci/log/log/LogStorageEvent.java @@ -1,6 +1,6 @@ -package cd.casic.pipeline.event.log; +package cd.casic.ci.log.log; -import cd.casic.pipeline.dal.pojo.message.LogMessageWithLineNo; +import cd.casic.ci.log.dal.pojo.message.LogMessageWithLineNo; import lombok.AllArgsConstructor; import lombok.Data; import lombok.EqualsAndHashCode; diff --git a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/service/BuildLogListenerService.java b/modules/ci-log/src/main/java/cd/casic/ci/log/service/BuildLogListenerService.java similarity index 94% rename from modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/service/BuildLogListenerService.java rename to modules/ci-log/src/main/java/cd/casic/ci/log/service/BuildLogListenerService.java index 2b4e9d2..fd960ae 100644 --- a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/service/BuildLogListenerService.java +++ b/modules/ci-log/src/main/java/cd/casic/ci/log/service/BuildLogListenerService.java @@ -1,8 +1,8 @@ -package cd.casic.pipeline.service; +package cd.casic.ci.log.service; -import cd.casic.pipeline.event.log.LogOriginEvent; -import cd.casic.pipeline.event.log.LogStatusEvent; -import cd.casic.pipeline.event.log.LogStorageEvent; +import cd.casic.ci.log.log.LogStorageEvent; +import cd.casic.ci.log.log.LogOriginEvent; +import cd.casic.ci.log.log.LogStatusEvent; import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; import org.apache.logging.log4j.util.Strings; diff --git a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/service/BuildLogPrintService.java b/modules/ci-log/src/main/java/cd/casic/ci/log/service/BuildLogPrintService.java similarity index 91% rename from modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/service/BuildLogPrintService.java rename to modules/ci-log/src/main/java/cd/casic/ci/log/service/BuildLogPrintService.java index 0013ab0..380563b 100644 --- a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/service/BuildLogPrintService.java +++ b/modules/ci-log/src/main/java/cd/casic/ci/log/service/BuildLogPrintService.java @@ -1,12 +1,10 @@ -package cd.casic.pipeline.service; +package cd.casic.ci.log.service; +import cd.casic.ci.log.log.ILogEvent; import cd.casic.framework.commons.pojo.CommonResult; import cd.casic.framework.commons.util.spring.SpringUtils; -import cd.casic.pipeline.enums.LogErrorCodeEnum; -import cd.casic.pipeline.event.log.ILogEvent; +import cd.casic.ci.log.dal.pojo.enums.LogErrorCodeEnum; import lombok.extern.slf4j.Slf4j; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; import java.util.concurrent.LinkedBlockingQueue; diff --git a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/service/BuildLogQueryService.java b/modules/ci-log/src/main/java/cd/casic/ci/log/service/BuildLogQueryService.java similarity index 97% rename from modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/service/BuildLogQueryService.java rename to modules/ci-log/src/main/java/cd/casic/ci/log/service/BuildLogQueryService.java index 5f649ec..4239b53 100644 --- a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/service/BuildLogQueryService.java +++ b/modules/ci-log/src/main/java/cd/casic/ci/log/service/BuildLogQueryService.java @@ -1,10 +1,10 @@ -package cd.casic.pipeline.service; +package cd.casic.ci.log.service; +import cd.casic.ci.log.dal.pojo.*; import cd.casic.framework.commons.pojo.CommonResult; -import cd.casic.pipeline.dal.pojo.*; -import cd.casic.pipeline.enums.LogStatusEnum; -import cd.casic.pipeline.enums.LogType; -import cd.casic.pipeline.jmx.LogStorageBean; +import cd.casic.ci.log.dal.pojo.enums.LogStatusEnum; +import cd.casic.ci.log.dal.pojo.enums.LogType; +import cd.casic.ci.log.jmx.LogStorageBean; import jakarta.annotation.Resource; import org.springframework.http.ResponseEntity; diff --git a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/service/IndexService.java b/modules/ci-log/src/main/java/cd/casic/ci/log/service/IndexService.java similarity index 97% rename from modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/service/IndexService.java rename to modules/ci-log/src/main/java/cd/casic/ci/log/service/IndexService.java index 7ed56bd..a3fc91b 100644 --- a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/service/IndexService.java +++ b/modules/ci-log/src/main/java/cd/casic/ci/log/service/IndexService.java @@ -1,8 +1,8 @@ -package cd.casic.pipeline.service; +package cd.casic.ci.log.service; +import cd.casic.ci.log.dal.dao.IndexMapper; import cd.casic.framework.redis.core.RedisTemplateUtils; -import cd.casic.pipeline.dal.dao.IndexMapper; -import cd.casic.pipeline.dal.dataobject.LogIndicesV2; +import cd.casic.ci.log.dal.dataobject.LogIndicesV2; import com.github.benmanes.caffeine.cache.Caffeine; import com.github.benmanes.caffeine.cache.LoadingCache; import jakarta.annotation.Resource; diff --git a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/service/LogService.java b/modules/ci-log/src/main/java/cd/casic/ci/log/service/LogService.java similarity index 85% rename from modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/service/LogService.java rename to modules/ci-log/src/main/java/cd/casic/ci/log/service/LogService.java index 3179bab..58f1b67 100644 --- a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/service/LogService.java +++ b/modules/ci-log/src/main/java/cd/casic/ci/log/service/LogService.java @@ -1,12 +1,12 @@ -package cd.casic.pipeline.service; +package cd.casic.ci.log.service; -import cd.casic.pipeline.enums.LogType; -import cd.casic.pipeline.event.log.LogOriginEvent; -import cd.casic.pipeline.event.log.LogStatusEvent; -import cd.casic.pipeline.event.log.LogStorageEvent; -import cd.casic.pipeline.dal.pojo.EndPageQueryLogs; -import cd.casic.pipeline.dal.pojo.PageQueryLogs; -import cd.casic.pipeline.dal.pojo.QueryLogs; +import cd.casic.ci.log.dal.pojo.EndPageQueryLogs; +import cd.casic.ci.log.dal.pojo.PageQueryLogs; +import cd.casic.ci.log.dal.pojo.QueryLogs; +import cd.casic.ci.log.log.LogStorageEvent; +import cd.casic.ci.log.dal.pojo.enums.LogType; +import cd.casic.ci.log.log.LogOriginEvent; +import cd.casic.ci.log.log.LogStatusEvent; /** * @author by mianbin diff --git a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/service/LogServiceImpl.java b/modules/ci-log/src/main/java/cd/casic/ci/log/service/LogServiceImpl.java similarity index 93% rename from modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/service/LogServiceImpl.java rename to modules/ci-log/src/main/java/cd/casic/ci/log/service/LogServiceImpl.java index 5b7a2de..325d38d 100644 --- a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/service/LogServiceImpl.java +++ b/modules/ci-log/src/main/java/cd/casic/ci/log/service/LogServiceImpl.java @@ -1,16 +1,16 @@ -package cd.casic.pipeline.service; +package cd.casic.ci.log.service; -import cd.casic.pipeline.enums.LogType; -import cd.casic.pipeline.event.log.LogOriginEvent; -import cd.casic.pipeline.event.log.LogStatusEvent; -import cd.casic.pipeline.event.log.LogStorageEvent; -import cd.casic.pipeline.jmx.CreateIndexBean; -import cd.casic.pipeline.jmx.LogStorageBean; -import cd.casic.pipeline.dal.pojo.EndPageQueryLogs; -import cd.casic.pipeline.dal.pojo.PageQueryLogs; -import cd.casic.pipeline.dal.pojo.QueryLogs; -import cd.casic.pipeline.dal.pojo.message.LogMessage; -import cd.casic.pipeline.dal.pojo.message.LogMessageWithLineNo; +import cd.casic.ci.log.dal.pojo.EndPageQueryLogs; +import cd.casic.ci.log.dal.pojo.PageQueryLogs; +import cd.casic.ci.log.dal.pojo.QueryLogs; +import cd.casic.ci.log.log.LogStorageEvent; +import cd.casic.ci.log.dal.pojo.enums.LogType; +import cd.casic.ci.log.log.LogOriginEvent; +import cd.casic.ci.log.log.LogStatusEvent; +import cd.casic.ci.log.jmx.CreateIndexBean; +import cd.casic.ci.log.jmx.LogStorageBean; +import cd.casic.ci.log.dal.pojo.message.LogMessage; +import cd.casic.ci.log.dal.pojo.message.LogMessageWithLineNo; import com.github.benmanes.caffeine.cache.Cache; import com.github.benmanes.caffeine.cache.Caffeine; import jakarta.annotation.Resource; @@ -194,9 +194,10 @@ public class LogServiceImpl implements LogService { if (!StringUtils.isEmpty((logMessage.getSubTag()))) { logTagService.saveSubTag(buildId, logMessage.getTag(), logMessage.getSubTag()); } + //todo 这个传参先null,后面再弄 res.add(new LogMessageWithLineNo(logMessage.getTag(), logMessage.getSubTag(), logMessage.getJobId(), logMessage.getMessage(), - timestamp, logMessage.getLogType(), startLineNum++, logMessage.getExecuteCount()) + timestamp, logMessage.getLogType(), startLineNum++, logMessage.getExecuteCount(), null, null) ); } return res; diff --git a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/service/LogStatusService.java b/modules/ci-log/src/main/java/cd/casic/ci/log/service/LogStatusService.java similarity index 92% rename from modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/service/LogStatusService.java rename to modules/ci-log/src/main/java/cd/casic/ci/log/service/LogStatusService.java index 032cbe8..be97356 100644 --- a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/service/LogStatusService.java +++ b/modules/ci-log/src/main/java/cd/casic/ci/log/service/LogStatusService.java @@ -1,10 +1,10 @@ -package cd.casic.pipeline.service; +package cd.casic.ci.log.service; -import cd.casic.pipeline.dal.dao.LogStatusMapper; -import cd.casic.pipeline.enums.LogStorageMode; -import cd.casic.pipeline.dal.pojo.QueryLogStatus; -import cd.casic.pipeline.dal.pojo.TaskBuildLogProperty; -import cd.casic.pipeline.dal.dataobject.LogStatus; +import cd.casic.ci.log.dal.pojo.QueryLogStatus; +import cd.casic.ci.log.dal.pojo.TaskBuildLogProperty; +import cd.casic.ci.log.dal.dao.LogStatusMapper; +import cd.casic.ci.log.dal.pojo.enums.LogStorageMode; +import cd.casic.ci.log.dal.dataobject.LogStatus; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import jakarta.annotation.Resource; diff --git a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/service/LogTagService.java b/modules/ci-log/src/main/java/cd/casic/ci/log/service/LogTagService.java similarity index 97% rename from modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/service/LogTagService.java rename to modules/ci-log/src/main/java/cd/casic/ci/log/service/LogTagService.java index 7793d18..8c561d2 100644 --- a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/service/LogTagService.java +++ b/modules/ci-log/src/main/java/cd/casic/ci/log/service/LogTagService.java @@ -1,8 +1,8 @@ -package cd.casic.pipeline.service; +package cd.casic.ci.log.service; +import cd.casic.ci.log.dal.dao.LogTahMapper; import cd.casic.framework.commons.util.json.JsonUtils; import cd.casic.framework.redis.core.RedisTemplateUtils; -import cd.casic.pipeline.dal.dao.LogTahMapper; import com.fasterxml.jackson.core.type.TypeReference; import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; diff --git a/modules/pipeline-ci-event/pom.xml b/modules/ci-market/pom.xml similarity index 66% rename from modules/pipeline-ci-event/pom.xml rename to modules/ci-market/pom.xml index 303bc75..69a3588 100644 --- a/modules/pipeline-ci-event/pom.xml +++ b/modules/ci-market/pom.xml @@ -7,15 +7,18 @@ cd.casic.boot modules ${revision} + ../pom.xml - cd.casic.pipeline - pipeline-ci-event + cd.casic.ci + ci-market + jar + ${revision} - cd.casic.pipeline - pipeline-ci-commons + cd.casic.ci + ci-commons diff --git a/modules/pipeline-ci-market/src/main/java/cd/casic/pipeline/market/constant/StoreMessageCode.java b/modules/ci-market/src/main/java/cd/casic/ci/event/market/constant/StoreMessageCode.java similarity index 99% rename from modules/pipeline-ci-market/src/main/java/cd/casic/pipeline/market/constant/StoreMessageCode.java rename to modules/ci-market/src/main/java/cd/casic/ci/event/market/constant/StoreMessageCode.java index 351562b..6b7a720 100644 --- a/modules/pipeline-ci-market/src/main/java/cd/casic/pipeline/market/constant/StoreMessageCode.java +++ b/modules/ci-market/src/main/java/cd/casic/ci/event/market/constant/StoreMessageCode.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.market.constant; +package cd.casic.ci.event.market.constant; /** * 流水线微服务模块请求返回状态码 diff --git a/modules/ci-process/pipeline-ci-process-api/pom.xml b/modules/ci-process/pipeline-ci-process-api/pom.xml new file mode 100644 index 0000000..1a4b0d9 --- /dev/null +++ b/modules/ci-process/pipeline-ci-process-api/pom.xml @@ -0,0 +1,22 @@ + + + 4.0.0 + + cd.casic.ci + ci-process + ${revision} + ../pom.xml + + + cd.casic.ci + pipeline-ci-process-api + + pipeline-ci-process-api + pipeline-ci-process-api + + ${revision} + + jar + + diff --git a/modules/ci-process/pipeline-ci-process-api/src/main/java/cd/casic/ci/pipelineciprocessapi/PipelineCiProcessApiApplication.java b/modules/ci-process/pipeline-ci-process-api/src/main/java/cd/casic/ci/pipelineciprocessapi/PipelineCiProcessApiApplication.java new file mode 100644 index 0000000..a3eda9c --- /dev/null +++ b/modules/ci-process/pipeline-ci-process-api/src/main/java/cd/casic/ci/pipelineciprocessapi/PipelineCiProcessApiApplication.java @@ -0,0 +1,14 @@ +package cd.casic.ci.pipelineciprocessapi; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class PipelineCiProcessApiApplication { + + public static void main(String[] args) { + SpringApplication.run(PipelineCiProcessApiApplication.class, args); + } + +} + diff --git a/modules/ci-process/pipeline-ci-process-api/src/main/resources/application.properties b/modules/ci-process/pipeline-ci-process-api/src/main/resources/application.properties new file mode 100644 index 0000000..98a782a --- /dev/null +++ b/modules/ci-process/pipeline-ci-process-api/src/main/resources/application.properties @@ -0,0 +1 @@ +spring.application.name=pipeline-ci-process-api diff --git a/modules/ci-process/pipeline-ci-process-api/src/test/java/cd/casic/ci/pipelineciprocessapi/PipelineCiProcessApiApplicationTests.java b/modules/ci-process/pipeline-ci-process-api/src/test/java/cd/casic/ci/pipelineciprocessapi/PipelineCiProcessApiApplicationTests.java new file mode 100644 index 0000000..54f22ff --- /dev/null +++ b/modules/ci-process/pipeline-ci-process-api/src/test/java/cd/casic/ci/pipelineciprocessapi/PipelineCiProcessApiApplicationTests.java @@ -0,0 +1,13 @@ +package cd.casic.ci.pipelineciprocessapi; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +@SpringBootTest +class PipelineCiProcessApiApplicationTests { + + @Test + void contextLoads() { + } + +} diff --git a/modules/pipeline-ci-process/pom.xml b/modules/ci-process/pom.xml similarity index 56% rename from modules/pipeline-ci-process/pom.xml rename to modules/ci-process/pom.xml index 493957a..7e98dad 100644 --- a/modules/pipeline-ci-process/pom.xml +++ b/modules/ci-process/pom.xml @@ -7,54 +7,54 @@ cd.casic.boot modules ${revision} + ../pom.xml - cd.casic.pipeline - pipeline-ci-process - + cd.casic.ci + ci-process + pom ${revision} + + pipeline-ci-process-api + + - cd.casic.pipeline - pipeline-ci-commons + cd.casic.ci + ci-commons - cd.casic.pipeline - pipeline-ci-event + cd.casic.ci + ci-event - cd.casic.pipeline - pipeline-ci-log + cd.casic.ci + ci-log - cd.casic.pipeline - pipeline-ci-project - 2.0.0-jdk17 + cd.casic.ci + ci-project - cd.casic.pipeline - pipeline-ci-quality - 2.0.0-jdk17 + cd.casic.ci + ci-quality - cd.casic.pipeline - pipeline-ci-scm-repository - 2.0.0-jdk17 + cd.casic.ci + ci-scm-repository - cd.casic.pipeline - pipeline-ci-ticket - 2.0.0-jdk17 + cd.casic.ci + ci-ticket - cd.casic.boot spring-boot-starter-redis diff --git a/modules/pipeline-ci-project/pom.xml b/modules/ci-project/pom.xml similarity index 82% rename from modules/pipeline-ci-project/pom.xml rename to modules/ci-project/pom.xml index cd87f57..1129a9e 100644 --- a/modules/pipeline-ci-project/pom.xml +++ b/modules/ci-project/pom.xml @@ -7,17 +7,18 @@ cd.casic.boot modules ${revision} + ../pom.xml - cd.casic.pipeline - pipeline-ci-project + cd.casic.ci + ci-project ${revision} - cd.casic.pipeline - pipeline-ci-commons + cd.casic.ci + ci-commons diff --git a/modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/constant/ProjectConstants.java b/modules/ci-project/src/main/java/cd/casic/ci/project/constant/ProjectConstants.java similarity index 93% rename from modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/constant/ProjectConstants.java rename to modules/ci-project/src/main/java/cd/casic/ci/project/constant/ProjectConstants.java index d3d2101..3f8e237 100644 --- a/modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/constant/ProjectConstants.java +++ b/modules/ci-project/src/main/java/cd/casic/ci/project/constant/ProjectConstants.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.project.constant; +package cd.casic.ci.project.constant; /** * @author by mianbin diff --git a/modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/controller/UserProjectResourceController.java b/modules/ci-project/src/main/java/cd/casic/ci/project/controller/UserProjectResourceController.java similarity index 86% rename from modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/controller/UserProjectResourceController.java rename to modules/ci-project/src/main/java/cd/casic/ci/project/controller/UserProjectResourceController.java index 8ceb3b6..a226876 100644 --- a/modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/controller/UserProjectResourceController.java +++ b/modules/ci-project/src/main/java/cd/casic/ci/project/controller/UserProjectResourceController.java @@ -1,9 +1,9 @@ -package cd.casic.pipeline.project.controller; +package cd.casic.ci.project.controller; +import cd.casic.ci.project.dal.pojo.ProjectCreateInfo; import cd.casic.framework.commons.pojo.CommonResult; -import cd.casic.pipeline.project.dal.pojo.ProjectCreateInfo; -import cd.casic.pipeline.project.service.UserProjectResourceService; +import cd.casic.ci.project.service.UserProjectResourceService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.annotation.Resource; diff --git a/modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/dal/dao/ProjectMapper.java b/modules/ci-project/src/main/java/cd/casic/ci/project/dal/dao/ProjectMapper.java similarity index 57% rename from modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/dal/dao/ProjectMapper.java rename to modules/ci-project/src/main/java/cd/casic/ci/project/dal/dao/ProjectMapper.java index e2a6e02..e681b6e 100644 --- a/modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/dal/dao/ProjectMapper.java +++ b/modules/ci-project/src/main/java/cd/casic/ci/project/dal/dao/ProjectMapper.java @@ -1,12 +1,12 @@ -package cd.casic.pipeline.project.dal.dao; +package cd.casic.ci.project.dal.dao; +import cd.casic.ci.project.dal.pojo.ProjectCreateInfo; +import cd.casic.ci.project.dal.pojo.ProjectVO; +import cd.casic.ci.project.enums.ProjectChannelCode; +import cd.casic.ci.project.enums.ProjectValidateType; import cd.casic.framework.mybatis.core.mapper.BaseMapperX; -import cd.casic.pipeline.project.dal.dto.Project; -import cd.casic.pipeline.project.dal.pojo.ProjectCreateExtInfo; -import cd.casic.pipeline.project.dal.pojo.ProjectCreateInfo; -import cd.casic.pipeline.project.dal.pojo.ProjectVO; -import cd.casic.pipeline.project.enums.ProjectChannelCode; -import cd.casic.pipeline.project.enums.ProjectValidateType; +import cd.casic.ci.project.dal.dto.Project; +import cd.casic.ci.project.dal.pojo.ProjectCreateExtInfo; import org.apache.ibatis.annotations.Mapper; @Mapper diff --git a/modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/dal/dto/Project.java b/modules/ci-project/src/main/java/cd/casic/ci/project/dal/dto/Project.java similarity index 98% rename from modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/dal/dto/Project.java rename to modules/ci-project/src/main/java/cd/casic/ci/project/dal/dto/Project.java index af17709..aa1b26d 100644 --- a/modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/dal/dto/Project.java +++ b/modules/ci-project/src/main/java/cd/casic/ci/project/dal/dto/Project.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.project.dal.dto; +package cd.casic.ci.project.dal.dto; import cd.casic.framework.mybatis.core.dataobject.BaseDO; diff --git a/modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/dal/pojo/AuthProjectCreateInfo.java b/modules/ci-project/src/main/java/cd/casic/ci/project/dal/pojo/AuthProjectCreateInfo.java similarity index 88% rename from modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/dal/pojo/AuthProjectCreateInfo.java rename to modules/ci-project/src/main/java/cd/casic/ci/project/dal/pojo/AuthProjectCreateInfo.java index 999a502..60f1e45 100644 --- a/modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/dal/pojo/AuthProjectCreateInfo.java +++ b/modules/ci-project/src/main/java/cd/casic/ci/project/dal/pojo/AuthProjectCreateInfo.java @@ -1,7 +1,7 @@ -package cd.casic.pipeline.project.dal.pojo; +package cd.casic.ci.project.dal.pojo; -import cd.casic.pipeline.project.dal.pojo.user.UserDeptDetail; +import cd.casic.ci.project.dal.pojo.user.UserDeptDetail; import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Data; diff --git a/modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/dal/pojo/PipelineAsCodeSettings.java b/modules/ci-project/src/main/java/cd/casic/ci/project/dal/pojo/PipelineAsCodeSettings.java similarity index 81% rename from modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/dal/pojo/PipelineAsCodeSettings.java rename to modules/ci-project/src/main/java/cd/casic/ci/project/dal/pojo/PipelineAsCodeSettings.java index 83b8c30..478694e 100644 --- a/modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/dal/pojo/PipelineAsCodeSettings.java +++ b/modules/ci-project/src/main/java/cd/casic/ci/project/dal/pojo/PipelineAsCodeSettings.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.project.dal.pojo; +package cd.casic.ci.project.dal.pojo; import lombok.Data; diff --git a/modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/dal/pojo/ProjectCreateExtInfo.java b/modules/ci-project/src/main/java/cd/casic/ci/project/dal/pojo/ProjectCreateExtInfo.java similarity index 86% rename from modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/dal/pojo/ProjectCreateExtInfo.java rename to modules/ci-project/src/main/java/cd/casic/ci/project/dal/pojo/ProjectCreateExtInfo.java index bb02038..6b5f51d 100644 --- a/modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/dal/pojo/ProjectCreateExtInfo.java +++ b/modules/ci-project/src/main/java/cd/casic/ci/project/dal/pojo/ProjectCreateExtInfo.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.project.dal.pojo; +package cd.casic.ci.project.dal.pojo; import lombok.AllArgsConstructor; import lombok.Data; diff --git a/modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/dal/pojo/ProjectCreateInfo.java b/modules/ci-project/src/main/java/cd/casic/ci/project/dal/pojo/ProjectCreateInfo.java similarity index 93% rename from modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/dal/pojo/ProjectCreateInfo.java rename to modules/ci-project/src/main/java/cd/casic/ci/project/dal/pojo/ProjectCreateInfo.java index e81fd7d..086499e 100644 --- a/modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/dal/pojo/ProjectCreateInfo.java +++ b/modules/ci-project/src/main/java/cd/casic/ci/project/dal/pojo/ProjectCreateInfo.java @@ -1,6 +1,6 @@ -package cd.casic.pipeline.project.dal.pojo; +package cd.casic.ci.project.dal.pojo; -import cd.casic.pipeline.project.enums.ProjectAuthSecrecyStatus; +import cd.casic.ci.project.enums.ProjectAuthSecrecyStatus; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; diff --git a/modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/dal/pojo/ProjectProperties.java b/modules/ci-project/src/main/java/cd/casic/ci/project/dal/pojo/ProjectProperties.java similarity index 86% rename from modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/dal/pojo/ProjectProperties.java rename to modules/ci-project/src/main/java/cd/casic/ci/project/dal/pojo/ProjectProperties.java index faa670c..115eec5 100644 --- a/modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/dal/pojo/ProjectProperties.java +++ b/modules/ci-project/src/main/java/cd/casic/ci/project/dal/pojo/ProjectProperties.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.project.dal.pojo; +package cd.casic.ci.project.dal.pojo; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; diff --git a/modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/dal/pojo/ProjectVO.java b/modules/ci-project/src/main/java/cd/casic/ci/project/dal/pojo/ProjectVO.java similarity index 99% rename from modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/dal/pojo/ProjectVO.java rename to modules/ci-project/src/main/java/cd/casic/ci/project/dal/pojo/ProjectVO.java index 7ef85e1..d6a9535 100644 --- a/modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/dal/pojo/ProjectVO.java +++ b/modules/ci-project/src/main/java/cd/casic/ci/project/dal/pojo/ProjectVO.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.project.dal.pojo; +package cd.casic.ci.project.dal.pojo; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; diff --git a/modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/dal/pojo/ResourceRegisterInfo.java b/modules/ci-project/src/main/java/cd/casic/ci/project/dal/pojo/ResourceRegisterInfo.java similarity index 84% rename from modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/dal/pojo/ResourceRegisterInfo.java rename to modules/ci-project/src/main/java/cd/casic/ci/project/dal/pojo/ResourceRegisterInfo.java index cdfc7e7..e4ba32e 100644 --- a/modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/dal/pojo/ResourceRegisterInfo.java +++ b/modules/ci-project/src/main/java/cd/casic/ci/project/dal/pojo/ResourceRegisterInfo.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.project.dal.pojo; +package cd.casic.ci.project.dal.pojo; import lombok.AllArgsConstructor; import lombok.Data; diff --git a/modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/dal/pojo/SubjectScopeInfo.java b/modules/ci-project/src/main/java/cd/casic/ci/project/dal/pojo/SubjectScopeInfo.java similarity index 86% rename from modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/dal/pojo/SubjectScopeInfo.java rename to modules/ci-project/src/main/java/cd/casic/ci/project/dal/pojo/SubjectScopeInfo.java index 541cdbb..b6cfe2c 100644 --- a/modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/dal/pojo/SubjectScopeInfo.java +++ b/modules/ci-project/src/main/java/cd/casic/ci/project/dal/pojo/SubjectScopeInfo.java @@ -1,6 +1,6 @@ -package cd.casic.pipeline.project.dal.pojo; +package cd.casic.ci.project.dal.pojo; -import cd.casic.pipeline.commons.enums.SubjectScopeType; +import cd.casic.ci.commons.enums.SubjectScopeType; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; diff --git a/modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/dal/pojo/user/UserDeptDetail.java b/modules/ci-project/src/main/java/cd/casic/ci/project/dal/pojo/user/UserDeptDetail.java similarity index 94% rename from modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/dal/pojo/user/UserDeptDetail.java rename to modules/ci-project/src/main/java/cd/casic/ci/project/dal/pojo/user/UserDeptDetail.java index 41f96f9..22cad0a 100644 --- a/modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/dal/pojo/user/UserDeptDetail.java +++ b/modules/ci-project/src/main/java/cd/casic/ci/project/dal/pojo/user/UserDeptDetail.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.project.dal.pojo.user; +package cd.casic.ci.project.dal.pojo.user; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; diff --git a/modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/enums/ProjectApproveStatus.java b/modules/ci-project/src/main/java/cd/casic/ci/project/enums/ProjectApproveStatus.java similarity index 95% rename from modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/enums/ProjectApproveStatus.java rename to modules/ci-project/src/main/java/cd/casic/ci/project/enums/ProjectApproveStatus.java index 1e7a4b9..870a8f2 100644 --- a/modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/enums/ProjectApproveStatus.java +++ b/modules/ci-project/src/main/java/cd/casic/ci/project/enums/ProjectApproveStatus.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.project.enums; +package cd.casic.ci.project.enums; public enum ProjectApproveStatus { UNKNOWN(-1), diff --git a/modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/enums/ProjectAuthSecrecyStatus.java b/modules/ci-project/src/main/java/cd/casic/ci/project/enums/ProjectAuthSecrecyStatus.java similarity index 94% rename from modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/enums/ProjectAuthSecrecyStatus.java rename to modules/ci-project/src/main/java/cd/casic/ci/project/enums/ProjectAuthSecrecyStatus.java index 07cf7db..667f696 100644 --- a/modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/enums/ProjectAuthSecrecyStatus.java +++ b/modules/ci-project/src/main/java/cd/casic/ci/project/enums/ProjectAuthSecrecyStatus.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.project.enums; +package cd.casic.ci.project.enums; public enum ProjectAuthSecrecyStatus { PUBLIC(0, "私有项目"), diff --git a/modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/enums/ProjectChannelCode.java b/modules/ci-project/src/main/java/cd/casic/ci/project/enums/ProjectChannelCode.java similarity index 90% rename from modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/enums/ProjectChannelCode.java rename to modules/ci-project/src/main/java/cd/casic/ci/project/enums/ProjectChannelCode.java index 9db052a..124335a 100644 --- a/modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/enums/ProjectChannelCode.java +++ b/modules/ci-project/src/main/java/cd/casic/ci/project/enums/ProjectChannelCode.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.project.enums; +package cd.casic.ci.project.enums; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/enums/ProjectValidateType.java b/modules/ci-project/src/main/java/cd/casic/ci/project/enums/ProjectValidateType.java similarity index 63% rename from modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/enums/ProjectValidateType.java rename to modules/ci-project/src/main/java/cd/casic/ci/project/enums/ProjectValidateType.java index 64f0fb2..49ce7c7 100644 --- a/modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/enums/ProjectValidateType.java +++ b/modules/ci-project/src/main/java/cd/casic/ci/project/enums/ProjectValidateType.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.project.enums; +package cd.casic.ci.project.enums; public enum ProjectValidateType { PROJECT_NAME, diff --git a/modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/service/ProjectExtService.java b/modules/ci-project/src/main/java/cd/casic/ci/project/service/ProjectExtService.java similarity index 56% rename from modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/service/ProjectExtService.java rename to modules/ci-project/src/main/java/cd/casic/ci/project/service/ProjectExtService.java index d9b6d34..8cc7754 100644 --- a/modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/service/ProjectExtService.java +++ b/modules/ci-project/src/main/java/cd/casic/ci/project/service/ProjectExtService.java @@ -1,8 +1,8 @@ -package cd.casic.pipeline.project.service; +package cd.casic.ci.project.service; -import cd.casic.pipeline.project.dal.pojo.ProjectCreateExtInfo; -import cd.casic.pipeline.project.dal.pojo.ProjectCreateInfo; +import cd.casic.ci.project.dal.pojo.ProjectCreateInfo; +import cd.casic.ci.project.dal.pojo.ProjectCreateExtInfo; public interface ProjectExtService { void createExtProjectInfo(Long userId, String projectId, String accessToken, ProjectCreateInfo projectCreateInfo, ProjectCreateExtInfo createExtInfo, String logoAddress); diff --git a/modules/ci-project/src/main/java/cd/casic/ci/project/service/ProjectPermissionService.java b/modules/ci-project/src/main/java/cd/casic/ci/project/service/ProjectPermissionService.java new file mode 100644 index 0000000..9d1bc2e --- /dev/null +++ b/modules/ci-project/src/main/java/cd/casic/ci/project/service/ProjectPermissionService.java @@ -0,0 +1,8 @@ +package cd.casic.ci.project.service; + +import cd.casic.ci.project.dal.pojo.AuthProjectCreateInfo; +import cd.casic.ci.project.dal.pojo.ResourceRegisterInfo; + +public interface ProjectPermissionService { + String createResources(ResourceRegisterInfo resourceRegisterInfo, AuthProjectCreateInfo authProjectCreateInfo); +} diff --git a/modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/service/UserProjectResourceService.java b/modules/ci-project/src/main/java/cd/casic/ci/project/service/UserProjectResourceService.java similarity index 57% rename from modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/service/UserProjectResourceService.java rename to modules/ci-project/src/main/java/cd/casic/ci/project/service/UserProjectResourceService.java index 6fb874a..3f7d141 100644 --- a/modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/service/UserProjectResourceService.java +++ b/modules/ci-project/src/main/java/cd/casic/ci/project/service/UserProjectResourceService.java @@ -1,7 +1,7 @@ -package cd.casic.pipeline.project.service; +package cd.casic.ci.project.service; -import cd.casic.pipeline.project.dal.pojo.ProjectCreateInfo; +import cd.casic.ci.project.dal.pojo.ProjectCreateInfo; public interface UserProjectResourceService { diff --git a/modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/service/impl/BluekingProjectPermissionServiceImpl.java b/modules/ci-project/src/main/java/cd/casic/ci/project/service/impl/BluekingProjectPermissionServiceImpl.java similarity index 63% rename from modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/service/impl/BluekingProjectPermissionServiceImpl.java rename to modules/ci-project/src/main/java/cd/casic/ci/project/service/impl/BluekingProjectPermissionServiceImpl.java index 3392232..15094ef 100644 --- a/modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/service/impl/BluekingProjectPermissionServiceImpl.java +++ b/modules/ci-project/src/main/java/cd/casic/ci/project/service/impl/BluekingProjectPermissionServiceImpl.java @@ -1,8 +1,8 @@ -package cd.casic.pipeline.project.service.impl; +package cd.casic.ci.project.service.impl; -import cd.casic.pipeline.project.dal.pojo.AuthProjectCreateInfo; -import cd.casic.pipeline.project.dal.pojo.ResourceRegisterInfo; -import cd.casic.pipeline.project.service.ProjectPermissionService; +import cd.casic.ci.project.dal.pojo.AuthProjectCreateInfo; +import cd.casic.ci.project.dal.pojo.ResourceRegisterInfo; +import cd.casic.ci.project.service.ProjectPermissionService; import org.springframework.stereotype.Service; import java.util.ArrayList; diff --git a/modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/service/impl/ProjectExtServiceImpl.java b/modules/ci-project/src/main/java/cd/casic/ci/project/service/impl/ProjectExtServiceImpl.java similarity index 68% rename from modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/service/impl/ProjectExtServiceImpl.java rename to modules/ci-project/src/main/java/cd/casic/ci/project/service/impl/ProjectExtServiceImpl.java index 65a924d..c3f9da2 100644 --- a/modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/service/impl/ProjectExtServiceImpl.java +++ b/modules/ci-project/src/main/java/cd/casic/ci/project/service/impl/ProjectExtServiceImpl.java @@ -1,9 +1,9 @@ -package cd.casic.pipeline.project.service.impl; +package cd.casic.ci.project.service.impl; -import cd.casic.pipeline.project.dal.pojo.ProjectCreateExtInfo; -import cd.casic.pipeline.project.dal.pojo.ProjectCreateInfo; -import cd.casic.pipeline.project.service.ProjectExtService; +import cd.casic.ci.project.dal.pojo.ProjectCreateExtInfo; +import cd.casic.ci.project.dal.pojo.ProjectCreateInfo; +import cd.casic.ci.project.service.ProjectExtService; import org.springframework.stereotype.Service; @Service("projectExtService") diff --git a/modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/service/impl/ProjectServiceImpl.java b/modules/ci-project/src/main/java/cd/casic/ci/project/service/impl/ProjectServiceImpl.java similarity index 93% rename from modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/service/impl/ProjectServiceImpl.java rename to modules/ci-project/src/main/java/cd/casic/ci/project/service/impl/ProjectServiceImpl.java index 2efeb33..c82c9ab 100644 --- a/modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/service/impl/ProjectServiceImpl.java +++ b/modules/ci-project/src/main/java/cd/casic/ci/project/service/impl/ProjectServiceImpl.java @@ -1,20 +1,20 @@ -package cd.casic.pipeline.project.service.impl; +package cd.casic.ci.project.service.impl; +import cd.casic.ci.project.dal.pojo.*; import cd.casic.framework.commons.exception.ServiceException; import cd.casic.framework.commons.util.json.JsonUtils; import cd.casic.framework.redis.core.RedisTemplateUtils; -import cd.casic.pipeline.commons.constant.BaseConstant; -import cd.casic.pipeline.project.constant.ProjectConstants; -import cd.casic.pipeline.project.dal.dao.ProjectMapper; -import cd.casic.pipeline.project.dal.dto.Project; -import cd.casic.pipeline.project.dal.pojo.*; -import cd.casic.pipeline.project.dal.pojo.user.UserDeptDetail; -import cd.casic.pipeline.project.enums.ProjectApproveStatus; -import cd.casic.pipeline.project.enums.ProjectAuthSecrecyStatus; -import cd.casic.pipeline.project.enums.ProjectChannelCode; -import cd.casic.pipeline.project.enums.ProjectValidateType; -import cd.casic.pipeline.project.service.ProjectExtService; +import cd.casic.ci.commons.constant.BaseConstant; +import cd.casic.ci.project.constant.ProjectConstants; +import cd.casic.ci.project.dal.dao.ProjectMapper; +import cd.casic.ci.project.dal.dto.Project; +import cd.casic.ci.project.dal.pojo.user.UserDeptDetail; +import cd.casic.ci.project.enums.ProjectApproveStatus; +import cd.casic.ci.project.enums.ProjectAuthSecrecyStatus; +import cd.casic.ci.project.enums.ProjectChannelCode; +import cd.casic.ci.project.enums.ProjectValidateType; +import cd.casic.ci.project.service.ProjectExtService; import cn.hutool.core.convert.Convert; import cn.hutool.core.date.DateUtil; import cn.hutool.core.util.IdUtil; diff --git a/modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/service/impl/UserProjectResourceServiceImpl.java b/modules/ci-project/src/main/java/cd/casic/ci/project/service/impl/UserProjectResourceServiceImpl.java similarity index 68% rename from modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/service/impl/UserProjectResourceServiceImpl.java rename to modules/ci-project/src/main/java/cd/casic/ci/project/service/impl/UserProjectResourceServiceImpl.java index d618277..410c725 100644 --- a/modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/service/impl/UserProjectResourceServiceImpl.java +++ b/modules/ci-project/src/main/java/cd/casic/ci/project/service/impl/UserProjectResourceServiceImpl.java @@ -1,11 +1,11 @@ -package cd.casic.pipeline.project.service.impl; +package cd.casic.ci.project.service.impl; -import cd.casic.pipeline.project.dal.dao.ProjectMapper; -import cd.casic.pipeline.project.dal.pojo.ProjectCreateExtInfo; -import cd.casic.pipeline.project.dal.pojo.ProjectCreateInfo; -import cd.casic.pipeline.project.enums.ProjectChannelCode; -import cd.casic.pipeline.project.service.UserProjectResourceService; +import cd.casic.ci.project.dal.dao.ProjectMapper; +import cd.casic.ci.project.dal.pojo.ProjectCreateExtInfo; +import cd.casic.ci.project.dal.pojo.ProjectCreateInfo; +import cd.casic.ci.project.enums.ProjectChannelCode; +import cd.casic.ci.project.service.UserProjectResourceService; import jakarta.annotation.Resource; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/modules/pipeline-ci-market/pom.xml b/modules/ci-quality/pom.xml similarity index 73% rename from modules/pipeline-ci-market/pom.xml rename to modules/ci-quality/pom.xml index 7dc6d65..a39021e 100644 --- a/modules/pipeline-ci-market/pom.xml +++ b/modules/ci-quality/pom.xml @@ -7,17 +7,18 @@ cd.casic.boot modules ${revision} + ../pom.xml - cd.casic.pipeline - pipeline-ci-market + cd.casic.ci + ci-quality ${revision} - cd.casic.pipeline - pipeline-ci-commons + cd.casic.ci + ci-commons diff --git a/modules/pipeline-ci-quality/src/main/java/cd/casic/pipeline/api/ServiceQualityRuleResource.java b/modules/ci-quality/src/main/java/cd/casic/ci/api/ServiceQualityRuleResource.java similarity index 88% rename from modules/pipeline-ci-quality/src/main/java/cd/casic/pipeline/api/ServiceQualityRuleResource.java rename to modules/ci-quality/src/main/java/cd/casic/ci/api/ServiceQualityRuleResource.java index 6a0dfd9..ab7d85b 100644 --- a/modules/pipeline-ci-quality/src/main/java/cd/casic/pipeline/api/ServiceQualityRuleResource.java +++ b/modules/ci-quality/src/main/java/cd/casic/ci/api/ServiceQualityRuleResource.java @@ -1,8 +1,8 @@ -package cd.casic.pipeline.api; +package cd.casic.ci.api; +import cd.casic.ci.dal.pojo.RuleCheckResult; +import cd.casic.ci.dal.v3.request.BuildCheckParamsV3; import cd.casic.framework.commons.pojo.CommonResult; -import cd.casic.pipeline.dal.pojo.RuleCheckResult; -import cd.casic.pipeline.dal.v3.request.BuildCheckParamsV3; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; diff --git a/modules/pipeline-ci-quality/src/main/java/cd/casic/pipeline/constants/QualityConstants.java b/modules/ci-quality/src/main/java/cd/casic/ci/constants/QualityConstants.java similarity index 99% rename from modules/pipeline-ci-quality/src/main/java/cd/casic/pipeline/constants/QualityConstants.java rename to modules/ci-quality/src/main/java/cd/casic/ci/constants/QualityConstants.java index d22f832..1c8908f 100644 --- a/modules/pipeline-ci-quality/src/main/java/cd/casic/pipeline/constants/QualityConstants.java +++ b/modules/ci-quality/src/main/java/cd/casic/ci/constants/QualityConstants.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.constants; +package cd.casic.ci.constants; /** * @author by mianbin diff --git a/modules/pipeline-ci-quality/src/main/java/cd/casic/pipeline/dal/package-info.java b/modules/ci-quality/src/main/java/cd/casic/ci/dal/package-info.java similarity index 77% rename from modules/pipeline-ci-quality/src/main/java/cd/casic/pipeline/dal/package-info.java rename to modules/ci-quality/src/main/java/cd/casic/ci/dal/package-info.java index 3f5cf9d..04542bc 100644 --- a/modules/pipeline-ci-quality/src/main/java/cd/casic/pipeline/dal/package-info.java +++ b/modules/ci-quality/src/main/java/cd/casic/ci/dal/package-info.java @@ -4,4 +4,4 @@ * @Date 2025/3/20 19:59 * @author by mianbin */ -package cd.casic.pipeline.dal; \ No newline at end of file +package cd.casic.ci.dal; \ No newline at end of file diff --git a/modules/pipeline-ci-quality/src/main/java/cd/casic/pipeline/dal/pojo/RuleCheckResult.java b/modules/ci-quality/src/main/java/cd/casic/ci/dal/pojo/RuleCheckResult.java similarity index 95% rename from modules/pipeline-ci-quality/src/main/java/cd/casic/pipeline/dal/pojo/RuleCheckResult.java rename to modules/ci-quality/src/main/java/cd/casic/ci/dal/pojo/RuleCheckResult.java index ba95119..329b8a9 100644 --- a/modules/pipeline-ci-quality/src/main/java/cd/casic/pipeline/dal/pojo/RuleCheckResult.java +++ b/modules/ci-quality/src/main/java/cd/casic/ci/dal/pojo/RuleCheckResult.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.dal.pojo; +package cd.casic.ci.dal.pojo; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; diff --git a/modules/pipeline-ci-quality/src/main/java/cd/casic/pipeline/dal/pojo/RuleCheckSingleResult.java b/modules/ci-quality/src/main/java/cd/casic/ci/dal/pojo/RuleCheckSingleResult.java similarity index 89% rename from modules/pipeline-ci-quality/src/main/java/cd/casic/pipeline/dal/pojo/RuleCheckSingleResult.java rename to modules/ci-quality/src/main/java/cd/casic/ci/dal/pojo/RuleCheckSingleResult.java index d18aa5b..4886481 100644 --- a/modules/pipeline-ci-quality/src/main/java/cd/casic/pipeline/dal/pojo/RuleCheckSingleResult.java +++ b/modules/ci-quality/src/main/java/cd/casic/ci/dal/pojo/RuleCheckSingleResult.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.dal.pojo; +package cd.casic.ci.dal.pojo; import io.swagger.v3.oas.annotations.media.Schema; import org.apache.commons.lang3.tuple.Triple; diff --git a/modules/pipeline-ci-quality/src/main/java/cd/casic/pipeline/dal/v2/ControlPointPosition.java b/modules/ci-quality/src/main/java/cd/casic/ci/dal/v2/ControlPointPosition.java similarity index 91% rename from modules/pipeline-ci-quality/src/main/java/cd/casic/pipeline/dal/v2/ControlPointPosition.java rename to modules/ci-quality/src/main/java/cd/casic/ci/dal/v2/ControlPointPosition.java index 2af891e..e8b7a64 100644 --- a/modules/pipeline-ci-quality/src/main/java/cd/casic/pipeline/dal/v2/ControlPointPosition.java +++ b/modules/ci-quality/src/main/java/cd/casic/ci/dal/v2/ControlPointPosition.java @@ -1,6 +1,6 @@ -package cd.casic.pipeline.dal.v2; +package cd.casic.ci.dal.v2; -import cd.casic.pipeline.constants.QualityConstants; +import cd.casic.ci.constants.QualityConstants; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; diff --git a/modules/pipeline-ci-quality/src/main/java/cd/casic/pipeline/dal/v3/package-info.java b/modules/ci-quality/src/main/java/cd/casic/ci/dal/v3/package-info.java similarity index 75% rename from modules/pipeline-ci-quality/src/main/java/cd/casic/pipeline/dal/v3/package-info.java rename to modules/ci-quality/src/main/java/cd/casic/ci/dal/v3/package-info.java index eb2dfbd..d068a13 100644 --- a/modules/pipeline-ci-quality/src/main/java/cd/casic/pipeline/dal/v3/package-info.java +++ b/modules/ci-quality/src/main/java/cd/casic/ci/dal/v3/package-info.java @@ -4,4 +4,4 @@ * @Date 2025/3/20 20:00 * @author by mianbin */ -package cd.casic.pipeline.dal.v3; \ No newline at end of file +package cd.casic.ci.dal.v3; \ No newline at end of file diff --git a/modules/pipeline-ci-quality/src/main/java/cd/casic/pipeline/dal/v3/request/BuildCheckParamsV3.java b/modules/ci-quality/src/main/java/cd/casic/ci/dal/v3/request/BuildCheckParamsV3.java similarity index 94% rename from modules/pipeline-ci-quality/src/main/java/cd/casic/pipeline/dal/v3/request/BuildCheckParamsV3.java rename to modules/ci-quality/src/main/java/cd/casic/ci/dal/v3/request/BuildCheckParamsV3.java index 0e843bd..7d1a3a8 100644 --- a/modules/pipeline-ci-quality/src/main/java/cd/casic/pipeline/dal/v3/request/BuildCheckParamsV3.java +++ b/modules/ci-quality/src/main/java/cd/casic/ci/dal/v3/request/BuildCheckParamsV3.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.dal.v3.request; +package cd.casic.ci.dal.v3.request; import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; diff --git a/modules/pipeline-ci-scm-repository/pom.xml b/modules/ci-scm-repository/pom.xml similarity index 82% rename from modules/pipeline-ci-scm-repository/pom.xml rename to modules/ci-scm-repository/pom.xml index a9a2d34..52a14ae 100644 --- a/modules/pipeline-ci-scm-repository/pom.xml +++ b/modules/ci-scm-repository/pom.xml @@ -7,22 +7,25 @@ cd.casic.boot modules ${revision} + ../pom.xml - cd.casic.pipeline - pipeline-ci-scm-repository + cd.casic.ci + ci-scm-repository ${revision} - cd.casic.pipeline - pipeline-ci-commons + cd.casic.ci + ci-commons + cd.casic.boot spring-boot-starter-mybatis + cd.casic.boot spring-boot-starter-redis diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/api/ServiceGithubResource.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/api/ServiceGithubResource.java similarity index 89% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/api/ServiceGithubResource.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/api/ServiceGithubResource.java index bf6ad2e..e0970d1 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/api/ServiceGithubResource.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/api/ServiceGithubResource.java @@ -1,11 +1,11 @@ -package cd.casic.pipeline.scm.api; +package cd.casic.ci.log.scm.api; +import cd.casic.ci.log.scm.dal.pojo.github.GithubBranch; +import cd.casic.ci.log.scm.dal.pojo.github.GithubTag; +import cd.casic.ci.log.scm.dal.pojo.github.GithubToken; import cd.casic.framework.commons.pojo.CommonResult; -import cd.casic.pipeline.scm.dal.pojo.github.GithubBranch; -import cd.casic.pipeline.scm.dal.pojo.github.GithubTag; -import cd.casic.pipeline.scm.dal.pojo.github.GithubToken; -import cd.casic.pipeline.scm.enums.GitHubTokenType; +import cd.casic.ci.log.scm.enums.GitHubTokenType; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/api/ServiceGithubResourceImpl.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/api/ServiceGithubResourceImpl.java similarity index 74% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/api/ServiceGithubResourceImpl.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/api/ServiceGithubResourceImpl.java index 84ee68c..4522c98 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/api/ServiceGithubResourceImpl.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/api/ServiceGithubResourceImpl.java @@ -1,13 +1,13 @@ -package cd.casic.pipeline.scm.api; +package cd.casic.ci.log.scm.api; +import cd.casic.ci.log.scm.dal.pojo.github.GithubBranch; +import cd.casic.ci.log.scm.dal.pojo.github.GithubTag; +import cd.casic.ci.log.scm.dal.pojo.github.GithubToken; +import cd.casic.ci.log.scm.service.github.GithubTokenService; +import cd.casic.ci.log.scm.service.github.IGithubService; import cd.casic.framework.commons.pojo.CommonResult; -import cd.casic.pipeline.scm.dal.pojo.github.GithubBranch; -import cd.casic.pipeline.scm.dal.pojo.github.GithubTag; -import cd.casic.pipeline.scm.dal.pojo.github.GithubToken; -import cd.casic.pipeline.scm.enums.GitHubTokenType; -import cd.casic.pipeline.scm.service.github.GithubTokenService; -import cd.casic.pipeline.scm.service.github.IGithubService; +import cd.casic.ci.log.scm.enums.GitHubTokenType; import jakarta.annotation.Resource; import org.springframework.web.bind.annotation.RestController; diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/api/ServiceOauthResource.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/api/ServiceOauthResource.java similarity index 92% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/api/ServiceOauthResource.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/api/ServiceOauthResource.java index e078368..423c940 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/api/ServiceOauthResource.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/api/ServiceOauthResource.java @@ -1,8 +1,8 @@ -package cd.casic.pipeline.scm.api; +package cd.casic.ci.log.scm.api; +import cd.casic.ci.log.scm.dal.pojo.oauth.GitToken; import cd.casic.framework.commons.pojo.CommonResult; -import cd.casic.pipeline.scm.dal.pojo.oauth.GitToken; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/api/ServiceOauthResourceImpl.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/api/ServiceOauthResourceImpl.java similarity index 76% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/api/ServiceOauthResourceImpl.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/api/ServiceOauthResourceImpl.java index d90f312..765c2a5 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/api/ServiceOauthResourceImpl.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/api/ServiceOauthResourceImpl.java @@ -1,10 +1,10 @@ -package cd.casic.pipeline.scm.api; +package cd.casic.ci.log.scm.api; +import cd.casic.ci.log.scm.dal.pojo.oauth.GitToken; +import cd.casic.ci.log.scm.service.IGitOauthService; +import cd.casic.ci.log.scm.service.tgit.TGitOauthService; import cd.casic.framework.commons.pojo.CommonResult; -import cd.casic.pipeline.scm.dal.pojo.oauth.GitToken; -import cd.casic.pipeline.scm.service.IGitOauthService; -import cd.casic.pipeline.scm.service.tgit.TGitOauthService; import jakarta.annotation.Resource; import org.springframework.web.bind.annotation.RestController; diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/api/ServiceRepositoryResource.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/api/ServiceRepositoryResource.java similarity index 89% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/api/ServiceRepositoryResource.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/api/ServiceRepositoryResource.java index 72caae0..ac122e2 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/api/ServiceRepositoryResource.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/api/ServiceRepositoryResource.java @@ -1,9 +1,9 @@ -package cd.casic.pipeline.scm.api; +package cd.casic.ci.log.scm.api; +import cd.casic.ci.log.scm.dal.pojo.Repository; import cd.casic.framework.commons.pojo.CommonResult; -import cd.casic.pipeline.scm.dal.pojo.Repository; -import cd.casic.pipeline.scm.enums.RepositoryType; +import cd.casic.ci.log.scm.enums.RepositoryType; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/api/ServiceRepositoryResourceImpl.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/api/ServiceRepositoryResourceImpl.java similarity index 82% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/api/ServiceRepositoryResourceImpl.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/api/ServiceRepositoryResourceImpl.java index 439aea8..6e9fbcb 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/api/ServiceRepositoryResourceImpl.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/api/ServiceRepositoryResourceImpl.java @@ -1,12 +1,12 @@ -package cd.casic.pipeline.scm.api; +package cd.casic.ci.log.scm.api; +import cd.casic.ci.log.scm.dal.pojo.Repository; +import cd.casic.ci.log.scm.enums.RepositoryType; +import cd.casic.ci.log.scm.service.impl.RepositoryServiceImpl; import cd.casic.framework.commons.exception.ServiceException; import cd.casic.framework.commons.pojo.CommonResult; -import cd.casic.pipeline.scm.dal.pojo.Repository; -import cd.casic.pipeline.scm.enums.RepositoryType; -import cd.casic.pipeline.scm.service.impl.RepositoryServiceImpl; -import cd.casic.pipeline.scm.utils.RepositoryConfigUtils; +import cd.casic.ci.log.scm.utils.RepositoryConfigUtils; import jakarta.annotation.Resource; import org.apache.commons.lang3.StringUtils; import org.springframework.web.bind.annotation.RestController; diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/api/scm/ServiceScmOauthResource.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/api/scm/ServiceScmOauthResource.java similarity index 95% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/api/scm/ServiceScmOauthResource.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/api/scm/ServiceScmOauthResource.java index 491ad54..eeb1b2d 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/api/scm/ServiceScmOauthResource.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/api/scm/ServiceScmOauthResource.java @@ -1,10 +1,10 @@ -package cd.casic.pipeline.scm.api.scm; +package cd.casic.ci.log.scm.api.scm; +import cd.casic.ci.log.scm.dal.pojo.RevisionInfo; +import cd.casic.ci.log.scm.enums.ScmType; import cd.casic.framework.commons.pojo.CommonResult; -import cd.casic.pipeline.scm.dal.pojo.RevisionInfo; -import cd.casic.pipeline.scm.enums.CodeSvnRegion; -import cd.casic.pipeline.scm.enums.ScmType; +import cd.casic.ci.log.scm.enums.CodeSvnRegion; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/api/scm/ServiceScmOauthResourceImpl.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/api/scm/ServiceScmOauthResourceImpl.java similarity index 86% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/api/scm/ServiceScmOauthResourceImpl.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/api/scm/ServiceScmOauthResourceImpl.java index 89f426a..c12334a 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/api/scm/ServiceScmOauthResourceImpl.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/api/scm/ServiceScmOauthResourceImpl.java @@ -1,11 +1,11 @@ -package cd.casic.pipeline.scm.api.scm; +package cd.casic.ci.log.scm.api.scm; +import cd.casic.ci.log.scm.dal.pojo.RevisionInfo; +import cd.casic.ci.log.scm.enums.ScmType; +import cd.casic.ci.log.scm.service.scm.IScmOauthService; import cd.casic.framework.commons.pojo.CommonResult; -import cd.casic.pipeline.scm.dal.pojo.RevisionInfo; -import cd.casic.pipeline.scm.enums.CodeSvnRegion; -import cd.casic.pipeline.scm.enums.ScmType; -import cd.casic.pipeline.scm.service.scm.IScmOauthService; +import cd.casic.ci.log.scm.enums.CodeSvnRegion; import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.RestController; diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/api/scm/ServiceScmResource.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/api/scm/ServiceScmResource.java similarity index 95% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/api/scm/ServiceScmResource.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/api/scm/ServiceScmResource.java index 19703f5..79700a9 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/api/scm/ServiceScmResource.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/api/scm/ServiceScmResource.java @@ -1,9 +1,9 @@ -package cd.casic.pipeline.scm.api.scm; +package cd.casic.ci.log.scm.api.scm; +import cd.casic.ci.log.scm.dal.pojo.RevisionInfo; +import cd.casic.ci.log.scm.enums.ScmType; import cd.casic.framework.commons.pojo.CommonResult; -import cd.casic.pipeline.scm.dal.pojo.RevisionInfo; -import cd.casic.pipeline.scm.enums.CodeSvnRegion; -import cd.casic.pipeline.scm.enums.ScmType; +import cd.casic.ci.log.scm.enums.CodeSvnRegion; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/api/scm/ServiceScmResourceImpl.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/api/scm/ServiceScmResourceImpl.java similarity index 85% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/api/scm/ServiceScmResourceImpl.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/api/scm/ServiceScmResourceImpl.java index df5009e..76001c1 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/api/scm/ServiceScmResourceImpl.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/api/scm/ServiceScmResourceImpl.java @@ -1,11 +1,11 @@ -package cd.casic.pipeline.scm.api.scm; +package cd.casic.ci.log.scm.api.scm; +import cd.casic.ci.log.scm.dal.pojo.RevisionInfo; +import cd.casic.ci.log.scm.enums.ScmType; +import cd.casic.ci.log.scm.service.scm.IScmService; import cd.casic.framework.commons.pojo.CommonResult; -import cd.casic.pipeline.scm.dal.pojo.RevisionInfo; -import cd.casic.pipeline.scm.enums.CodeSvnRegion; -import cd.casic.pipeline.scm.enums.ScmType; -import cd.casic.pipeline.scm.service.scm.IScmService; +import cd.casic.ci.log.scm.enums.CodeSvnRegion; import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.RestController; diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/config/GitConfig.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/config/GitConfig.java similarity index 97% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/config/GitConfig.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/config/GitConfig.java index f0f39ab..251fe28 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/config/GitConfig.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/config/GitConfig.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.scm.config; +package cd.casic.ci.log.scm.config; import org.springframework.boot.autoconfigure.AutoConfigureOrder; import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication; diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/config/P4Config.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/config/P4Config.java similarity index 92% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/config/P4Config.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/config/P4Config.java index 4e456b7..4a80ac8 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/config/P4Config.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/config/P4Config.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.scm.config; +package cd.casic.ci.log.scm.config; import org.springframework.boot.autoconfigure.AutoConfigureOrder; import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication; diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/config/SVNConfig.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/config/SVNConfig.java similarity index 94% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/config/SVNConfig.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/config/SVNConfig.java index adc0e3d..6c685cb 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/config/SVNConfig.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/config/SVNConfig.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.scm.config; +package cd.casic.ci.log.scm.config; import org.springframework.boot.autoconfigure.AutoConfigureOrder; import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication; diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/dao/RepositoryGitTokenMapper.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/dao/RepositoryGitTokenMapper.java similarity index 75% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/dao/RepositoryGitTokenMapper.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/dao/RepositoryGitTokenMapper.java index 631fc96..ca6f37b 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/dao/RepositoryGitTokenMapper.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/dao/RepositoryGitTokenMapper.java @@ -1,7 +1,7 @@ -package cd.casic.pipeline.scm.dal.dao; +package cd.casic.ci.log.scm.dal.dao; +import cd.casic.ci.log.scm.dal.dto.RepositoryGitToken; import cd.casic.framework.mybatis.core.mapper.BaseMapperX; -import cd.casic.pipeline.scm.dal.dto.RepositoryGitToken; import org.apache.ibatis.annotations.Mapper; /** diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/dao/RepositoryGitlabTokenMapper.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/dao/RepositoryGitlabTokenMapper.java similarity index 76% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/dao/RepositoryGitlabTokenMapper.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/dao/RepositoryGitlabTokenMapper.java index 6991f65..a07937c 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/dao/RepositoryGitlabTokenMapper.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/dao/RepositoryGitlabTokenMapper.java @@ -1,7 +1,7 @@ -package cd.casic.pipeline.scm.dal.dao; +package cd.casic.ci.log.scm.dal.dao; import cd.casic.framework.mybatis.core.mapper.BaseMapperX; -import cd.casic.pipeline.scm.dal.dto.RepositoryGitlabToken; +import cd.casic.ci.log.scm.dal.dto.RepositoryGitlabToken; import org.apache.ibatis.annotations.Mapper; /** diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/dao/RepositoryRecordMapper.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/dao/RepositoryRecordMapper.java similarity index 75% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/dao/RepositoryRecordMapper.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/dao/RepositoryRecordMapper.java index f8c3046..112b77b 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/dao/RepositoryRecordMapper.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/dao/RepositoryRecordMapper.java @@ -1,7 +1,7 @@ -package cd.casic.pipeline.scm.dal.dao; +package cd.casic.ci.log.scm.dal.dao; +import cd.casic.ci.log.scm.dal.dto.RepositoryRecord; import cd.casic.framework.mybatis.core.mapper.BaseMapperX; -import cd.casic.pipeline.scm.dal.dto.RepositoryRecord; import org.apache.ibatis.annotations.Mapper; /** diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/dao/RepositoryTGitTokenMapper.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/dao/RepositoryTGitTokenMapper.java similarity index 72% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/dao/RepositoryTGitTokenMapper.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/dao/RepositoryTGitTokenMapper.java index 0abe8b8..ce21091 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/dao/RepositoryTGitTokenMapper.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/dao/RepositoryTGitTokenMapper.java @@ -1,7 +1,7 @@ -package cd.casic.pipeline.scm.dal.dao; +package cd.casic.ci.log.scm.dal.dao; +import cd.casic.ci.log.scm.dal.dto.RepositoryTGitToken; import cd.casic.framework.mybatis.core.mapper.BaseMapperX; -import cd.casic.pipeline.scm.dal.dto.RepositoryTGitToken; /** * @author by mianbin diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/dto/RepositoryGitToken.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/dto/RepositoryGitToken.java similarity index 95% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/dto/RepositoryGitToken.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/dto/RepositoryGitToken.java index 49b90f1..f3ce602 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/dto/RepositoryGitToken.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/dto/RepositoryGitToken.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.scm.dal.dto; +package cd.casic.ci.log.scm.dal.dto; import cd.casic.framework.mybatis.core.dataobject.BaseDO; import com.baomidou.mybatisplus.annotation.TableName; diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/dto/RepositoryGitlabToken.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/dto/RepositoryGitlabToken.java similarity index 94% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/dto/RepositoryGitlabToken.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/dto/RepositoryGitlabToken.java index ed3ca12..125bc84 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/dto/RepositoryGitlabToken.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/dto/RepositoryGitlabToken.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.scm.dal.dto; +package cd.casic.ci.log.scm.dal.dto; import cd.casic.framework.mybatis.core.dataobject.BaseDO; import com.baomidou.mybatisplus.annotation.TableName; diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/dto/RepositoryRecord.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/dto/RepositoryRecord.java similarity index 96% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/dto/RepositoryRecord.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/dto/RepositoryRecord.java index 6260338..de86732 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/dto/RepositoryRecord.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/dto/RepositoryRecord.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.scm.dal.dto; +package cd.casic.ci.log.scm.dal.dto; import cd.casic.framework.mybatis.core.dataobject.BaseDO; import com.baomidou.mybatisplus.annotation.TableName; diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/dto/RepositoryTGitToken.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/dto/RepositoryTGitToken.java similarity index 95% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/dto/RepositoryTGitToken.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/dto/RepositoryTGitToken.java index 4c83ba0..8eccc9b 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/dto/RepositoryTGitToken.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/dto/RepositoryTGitToken.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.scm.dal.dto; +package cd.casic.ci.log.scm.dal.dto; import cd.casic.framework.mybatis.core.dataobject.BaseDO; import lombok.AllArgsConstructor; diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/CodeGitRepository.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/CodeGitRepository.java similarity index 87% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/CodeGitRepository.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/CodeGitRepository.java index 2379f7d..c75f8aa 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/CodeGitRepository.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/CodeGitRepository.java @@ -1,7 +1,7 @@ -package cd.casic.pipeline.scm.dal.pojo; +package cd.casic.ci.log.scm.dal.pojo; -import cd.casic.pipeline.scm.enums.RepoAuthType; -import cd.casic.pipeline.scm.utils.GitUtils; +import cd.casic.ci.log.scm.enums.RepoAuthType; +import cd.casic.ci.log.scm.utils.GitUtils; import lombok.Data; @Data diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/CodeGitlabRepository.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/CodeGitlabRepository.java similarity index 87% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/CodeGitlabRepository.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/CodeGitlabRepository.java index a192c6d..359dd5f 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/CodeGitlabRepository.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/CodeGitlabRepository.java @@ -1,7 +1,7 @@ -package cd.casic.pipeline.scm.dal.pojo; +package cd.casic.ci.log.scm.dal.pojo; -import cd.casic.pipeline.scm.enums.RepoAuthType; -import cd.casic.pipeline.scm.utils.GitUtils; +import cd.casic.ci.log.scm.enums.RepoAuthType; +import cd.casic.ci.log.scm.utils.GitUtils; import lombok.Data; @Data diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/CodeP4Repository.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/CodeP4Repository.java similarity index 86% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/CodeP4Repository.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/CodeP4Repository.java index 4bcaa39..eb0d44c 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/CodeP4Repository.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/CodeP4Repository.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.scm.dal.pojo; +package cd.casic.ci.log.scm.dal.pojo; public class CodeP4Repository extends Repository { diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/CodeSvnRepository.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/CodeSvnRepository.java similarity index 93% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/CodeSvnRepository.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/CodeSvnRepository.java index 6035535..044b7b7 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/CodeSvnRepository.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/CodeSvnRepository.java @@ -1,6 +1,6 @@ -package cd.casic.pipeline.scm.dal.pojo; +package cd.casic.ci.log.scm.dal.pojo; -import cd.casic.pipeline.scm.enums.CodeSvnRegion; +import cd.casic.ci.log.scm.enums.CodeSvnRegion; import lombok.Data; diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/CodeTGitRepository.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/CodeTGitRepository.java similarity index 87% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/CodeTGitRepository.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/CodeTGitRepository.java index 333106e..cbb2b4f 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/CodeTGitRepository.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/CodeTGitRepository.java @@ -1,8 +1,8 @@ -package cd.casic.pipeline.scm.dal.pojo; +package cd.casic.ci.log.scm.dal.pojo; -import cd.casic.pipeline.scm.enums.RepoAuthType; -import cd.casic.pipeline.scm.utils.GitUtils; +import cd.casic.ci.log.scm.enums.RepoAuthType; +import cd.casic.ci.log.scm.utils.GitUtils; import lombok.Data; diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/Credential.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/Credential.java similarity index 88% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/Credential.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/Credential.java index 860c6a7..932314f 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/Credential.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/Credential.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.scm.dal.pojo; +package cd.casic.ci.log.scm.dal.pojo; import lombok.AllArgsConstructor; import lombok.Data; diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/GithubRepository.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/GithubRepository.java similarity index 89% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/GithubRepository.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/GithubRepository.java index a0ebe0d..7f3b662 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/GithubRepository.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/GithubRepository.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.scm.dal.pojo; +package cd.casic.ci.log.scm.dal.pojo; /** diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/IScm.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/IScm.java similarity index 72% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/IScm.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/IScm.java index ebfe4b8..f88057e 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/IScm.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/IScm.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.scm.dal.pojo; +package cd.casic.ci.log.scm.dal.pojo; diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/Repository.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/Repository.java similarity index 97% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/Repository.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/Repository.java index d0153a8..ef445cf 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/Repository.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/Repository.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.scm.dal.pojo; +package cd.casic.ci.log.scm.dal.pojo; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/RevisionInfo.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/RevisionInfo.java similarity index 90% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/RevisionInfo.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/RevisionInfo.java index 26768bf..5dbb4bf 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/RevisionInfo.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/RevisionInfo.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.scm.dal.pojo; +package cd.casic.ci.log.scm.dal.pojo; import lombok.AllArgsConstructor; import lombok.Data; diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/ScmFactory.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/ScmFactory.java similarity index 89% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/ScmFactory.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/ScmFactory.java index 036c64f..4a68646 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/ScmFactory.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/ScmFactory.java @@ -1,14 +1,14 @@ -package cd.casic.pipeline.scm.dal.pojo; +package cd.casic.ci.log.scm.dal.pojo; +import cd.casic.ci.log.scm.dal.pojo.svn.*; import cd.casic.framework.commons.util.spring.SpringUtils; -import cd.casic.pipeline.scm.config.GitConfig; -import cd.casic.pipeline.scm.config.SVNConfig; -import cd.casic.pipeline.scm.dal.pojo.git.GitApi; -import cd.casic.pipeline.scm.dal.pojo.svn.*; -import cd.casic.pipeline.scm.enums.CodeGitWebhookEvent; -import cd.casic.pipeline.scm.enums.CodeSvnRegion; -import cd.casic.pipeline.scm.enums.ScmType; +import cd.casic.ci.log.scm.config.GitConfig; +import cd.casic.ci.log.scm.config.SVNConfig; +import cd.casic.ci.log.scm.dal.pojo.git.GitApi; +import cd.casic.ci.log.scm.enums.CodeGitWebhookEvent; +import cd.casic.ci.log.scm.enums.CodeSvnRegion; +import cd.casic.ci.log.scm.enums.ScmType; import lombok.extern.slf4j.Slf4j; @Slf4j diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/ScmOauthFactory.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/ScmOauthFactory.java similarity index 82% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/ScmOauthFactory.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/ScmOauthFactory.java index 955b0ba..9985d13 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/ScmOauthFactory.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/ScmOauthFactory.java @@ -1,16 +1,16 @@ -package cd.casic.pipeline.scm.dal.pojo; +package cd.casic.ci.log.scm.dal.pojo; +import cd.casic.ci.log.scm.config.GitConfig; +import cd.casic.ci.log.scm.config.SVNConfig; +import cd.casic.ci.log.scm.dal.pojo.git.GitOauthApi; +import cd.casic.ci.log.scm.dal.pojo.svn.CodeGitScmImpl; +import cd.casic.ci.log.scm.dal.pojo.svn.CodeGitlabScmImpl; +import cd.casic.ci.log.scm.dal.pojo.svn.CodeSvnScmImpl; +import cd.casic.ci.log.scm.dal.pojo.svn.CodeTGitScmImpl; import cd.casic.framework.commons.util.spring.SpringUtils; -import cd.casic.pipeline.scm.config.GitConfig; -import cd.casic.pipeline.scm.config.SVNConfig; -import cd.casic.pipeline.scm.dal.pojo.git.GitOauthApi; -import cd.casic.pipeline.scm.dal.pojo.svn.CodeGitScmImpl; -import cd.casic.pipeline.scm.dal.pojo.svn.CodeGitlabScmImpl; -import cd.casic.pipeline.scm.dal.pojo.svn.CodeSvnScmImpl; -import cd.casic.pipeline.scm.dal.pojo.svn.CodeTGitScmImpl; -import cd.casic.pipeline.scm.enums.CodeSvnRegion; -import cd.casic.pipeline.scm.enums.ScmType; +import cd.casic.ci.log.scm.enums.CodeSvnRegion; +import cd.casic.ci.log.scm.enums.ScmType; import lombok.extern.slf4j.Slf4j; @Slf4j diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/git/GitApi.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/git/GitApi.java similarity index 73% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/git/GitApi.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/git/GitApi.java index ac16578..83739ad 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/git/GitApi.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/git/GitApi.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.scm.dal.pojo.git; +package cd.casic.ci.log.scm.dal.pojo.git; /** * @author mianbin diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/git/GitOauthApi.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/git/GitOauthApi.java similarity index 73% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/git/GitOauthApi.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/git/GitOauthApi.java index 67fd0e6..906eac4 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/git/GitOauthApi.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/git/GitOauthApi.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.scm.dal.pojo.git; +package cd.casic.ci.log.scm.dal.pojo.git; /** * @author mianbin diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/git/GitUserInfo.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/git/GitUserInfo.java similarity index 90% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/git/GitUserInfo.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/git/GitUserInfo.java index e925acc..da9bbac 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/git/GitUserInfo.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/git/GitUserInfo.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.scm.dal.pojo.git; +package cd.casic.ci.log.scm.dal.pojo.git; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/github/GithubBranch.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/github/GithubBranch.java similarity index 85% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/github/GithubBranch.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/github/GithubBranch.java index ba47d0c..9ec0080 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/github/GithubBranch.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/github/GithubBranch.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.scm.dal.pojo.github; +package cd.casic.ci.log.scm.dal.pojo.github; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/github/GithubCommit.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/github/GithubCommit.java similarity index 88% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/github/GithubCommit.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/github/GithubCommit.java index 180819c..c76160f 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/github/GithubCommit.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/github/GithubCommit.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.scm.dal.pojo.github; +package cd.casic.ci.log.scm.dal.pojo.github; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/github/GithubCommitAuthor.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/github/GithubCommitAuthor.java similarity index 88% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/github/GithubCommitAuthor.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/github/GithubCommitAuthor.java index a9a7324..5c91630 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/github/GithubCommitAuthor.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/github/GithubCommitAuthor.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.scm.dal.pojo.github; +package cd.casic.ci.log.scm.dal.pojo.github; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/github/GithubCommitData.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/github/GithubCommitData.java similarity index 86% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/github/GithubCommitData.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/github/GithubCommitData.java index 2bdd1e2..6702b53 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/github/GithubCommitData.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/github/GithubCommitData.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.scm.dal.pojo.github; +package cd.casic.ci.log.scm.dal.pojo.github; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/github/GithubObject.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/github/GithubObject.java similarity index 87% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/github/GithubObject.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/github/GithubObject.java index 2c92a58..6caa668 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/github/GithubObject.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/github/GithubObject.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.scm.dal.pojo.github; +package cd.casic.ci.log.scm.dal.pojo.github; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/github/GithubTag.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/github/GithubTag.java similarity index 90% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/github/GithubTag.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/github/GithubTag.java index 5269aa4..f1a10ee 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/github/GithubTag.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/github/GithubTag.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.scm.dal.pojo.github; +package cd.casic.ci.log.scm.dal.pojo.github; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/github/GithubToken.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/github/GithubToken.java similarity index 90% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/github/GithubToken.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/github/GithubToken.java index c8fb99d..cbb15ef 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/github/GithubToken.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/github/GithubToken.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.scm.dal.pojo.github; +package cd.casic.ci.log.scm.dal.pojo.github; import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/oauth/GitToken.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/oauth/GitToken.java similarity index 95% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/oauth/GitToken.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/oauth/GitToken.java index 9ff8565..9a9c721 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/oauth/GitToken.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/oauth/GitToken.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.scm.dal.pojo.oauth; +package cd.casic.ci.log.scm.dal.pojo.oauth; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/svn/CodeGitScmImpl.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/svn/CodeGitScmImpl.java similarity index 71% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/svn/CodeGitScmImpl.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/svn/CodeGitScmImpl.java index f75b6bf..a7ae70c 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/svn/CodeGitScmImpl.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/svn/CodeGitScmImpl.java @@ -1,10 +1,10 @@ -package cd.casic.pipeline.scm.dal.pojo.svn; +package cd.casic.ci.log.scm.dal.pojo.svn; -import cd.casic.pipeline.scm.config.GitConfig; -import cd.casic.pipeline.scm.dal.pojo.IScm; -import cd.casic.pipeline.scm.dal.pojo.RevisionInfo; -import cd.casic.pipeline.scm.dal.pojo.git.GitApi; +import cd.casic.ci.log.scm.dal.pojo.IScm; +import cd.casic.ci.log.scm.dal.pojo.git.GitApi; +import cd.casic.ci.log.scm.config.GitConfig; +import cd.casic.ci.log.scm.dal.pojo.RevisionInfo; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/svn/CodeGitlabScmImpl.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/svn/CodeGitlabScmImpl.java similarity index 75% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/svn/CodeGitlabScmImpl.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/svn/CodeGitlabScmImpl.java index 048d711..0b6ad0d 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/svn/CodeGitlabScmImpl.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/svn/CodeGitlabScmImpl.java @@ -1,9 +1,9 @@ -package cd.casic.pipeline.scm.dal.pojo.svn; +package cd.casic.ci.log.scm.dal.pojo.svn; -import cd.casic.pipeline.scm.config.GitConfig; -import cd.casic.pipeline.scm.dal.pojo.IScm; -import cd.casic.pipeline.scm.dal.pojo.RevisionInfo; +import cd.casic.ci.log.scm.dal.pojo.IScm; +import cd.casic.ci.log.scm.config.GitConfig; +import cd.casic.ci.log.scm.dal.pojo.RevisionInfo; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/svn/CodeP4ScmImpl.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/svn/CodeP4ScmImpl.java similarity index 78% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/svn/CodeP4ScmImpl.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/svn/CodeP4ScmImpl.java index 078a3bb..eb76e63 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/svn/CodeP4ScmImpl.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/svn/CodeP4ScmImpl.java @@ -1,8 +1,8 @@ -package cd.casic.pipeline.scm.dal.pojo.svn; +package cd.casic.ci.log.scm.dal.pojo.svn; -import cd.casic.pipeline.scm.dal.pojo.IScm; -import cd.casic.pipeline.scm.dal.pojo.RevisionInfo; +import cd.casic.ci.log.scm.dal.pojo.IScm; +import cd.casic.ci.log.scm.dal.pojo.RevisionInfo; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/svn/CodeSvnScmImpl.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/svn/CodeSvnScmImpl.java similarity index 74% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/svn/CodeSvnScmImpl.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/svn/CodeSvnScmImpl.java index 3029822..fa09e22 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/svn/CodeSvnScmImpl.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/svn/CodeSvnScmImpl.java @@ -1,8 +1,8 @@ -package cd.casic.pipeline.scm.dal.pojo.svn; +package cd.casic.ci.log.scm.dal.pojo.svn; -import cd.casic.pipeline.scm.config.SVNConfig; -import cd.casic.pipeline.scm.dal.pojo.IScm; -import cd.casic.pipeline.scm.dal.pojo.RevisionInfo; +import cd.casic.ci.log.scm.dal.pojo.IScm; +import cd.casic.ci.log.scm.config.SVNConfig; +import cd.casic.ci.log.scm.dal.pojo.RevisionInfo; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/svn/CodeTGitScmImpl.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/svn/CodeTGitScmImpl.java similarity index 72% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/svn/CodeTGitScmImpl.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/svn/CodeTGitScmImpl.java index 63b1f06..dbfe3d3 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/dal/pojo/svn/CodeTGitScmImpl.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/dal/pojo/svn/CodeTGitScmImpl.java @@ -1,10 +1,10 @@ -package cd.casic.pipeline.scm.dal.pojo.svn; +package cd.casic.ci.log.scm.dal.pojo.svn; -import cd.casic.pipeline.scm.config.GitConfig; -import cd.casic.pipeline.scm.dal.pojo.IScm; -import cd.casic.pipeline.scm.dal.pojo.RevisionInfo; -import cd.casic.pipeline.scm.dal.pojo.git.GitApi; +import cd.casic.ci.log.scm.dal.pojo.IScm; +import cd.casic.ci.log.scm.dal.pojo.git.GitApi; +import cd.casic.ci.log.scm.config.GitConfig; +import cd.casic.ci.log.scm.dal.pojo.RevisionInfo; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/enums/CodeGitWebhookEvent.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/enums/CodeGitWebhookEvent.java similarity index 95% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/enums/CodeGitWebhookEvent.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/enums/CodeGitWebhookEvent.java index f652c01..d47716d 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/enums/CodeGitWebhookEvent.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/enums/CodeGitWebhookEvent.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.scm.enums; +package cd.casic.ci.log.scm.enums; /** diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/enums/CodeSvnRegion.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/enums/CodeSvnRegion.java similarity index 95% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/enums/CodeSvnRegion.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/enums/CodeSvnRegion.java index 5d383d1..4a9e579 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/enums/CodeSvnRegion.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/enums/CodeSvnRegion.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.scm.enums; +package cd.casic.ci.log.scm.enums; import java.util.Arrays; import java.util.Map; diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/enums/GitHubTokenType.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/enums/GitHubTokenType.java similarity index 88% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/enums/GitHubTokenType.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/enums/GitHubTokenType.java index 352eebf..a14eec0 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/enums/GitHubTokenType.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/enums/GitHubTokenType.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.scm.enums; +package cd.casic.ci.log.scm.enums; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/enums/RepoAuthType.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/enums/RepoAuthType.java similarity index 90% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/enums/RepoAuthType.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/enums/RepoAuthType.java index 43f49fa..74ff48a 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/enums/RepoAuthType.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/enums/RepoAuthType.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.scm.enums; +package cd.casic.ci.log.scm.enums; public enum RepoAuthType { diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/enums/RepositoryConfig.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/enums/RepositoryConfig.java similarity index 97% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/enums/RepositoryConfig.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/enums/RepositoryConfig.java index 6ab1a47..7912a86 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/enums/RepositoryConfig.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/enums/RepositoryConfig.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.scm.enums; +package cd.casic.ci.log.scm.enums; import cd.casic.framework.commons.exception.ErrorCode; import cd.casic.framework.commons.exception.ServiceException; diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/enums/RepositoryType.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/enums/RepositoryType.java similarity index 89% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/enums/RepositoryType.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/enums/RepositoryType.java index c6678f5..8749201 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/enums/RepositoryType.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/enums/RepositoryType.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.scm.enums; +package cd.casic.ci.log.scm.enums; import org.apache.commons.lang3.StringUtils; diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/enums/RepositoryTypeNew.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/enums/RepositoryTypeNew.java similarity index 88% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/enums/RepositoryTypeNew.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/enums/RepositoryTypeNew.java index 1ec07cb..b99e162 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/enums/RepositoryTypeNew.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/enums/RepositoryTypeNew.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.scm.enums; +package cd.casic.ci.log.scm.enums; import org.apache.commons.lang3.StringUtils; diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/enums/RequestChannelTypeEnum.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/enums/RequestChannelTypeEnum.java similarity index 71% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/enums/RequestChannelTypeEnum.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/enums/RequestChannelTypeEnum.java index 6411244..13c0ac4 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/enums/RequestChannelTypeEnum.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/enums/RequestChannelTypeEnum.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.scm.enums; +package cd.casic.ci.log.scm.enums; public enum RequestChannelTypeEnum { diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/enums/ScmType.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/enums/ScmType.java similarity index 93% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/enums/ScmType.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/enums/ScmType.java index e06582f..66d601e 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/enums/ScmType.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/enums/ScmType.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.scm.enums; +package cd.casic.ci.log.scm.enums; public enum ScmType { diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/enums/TokenTypeEnum.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/enums/TokenTypeEnum.java similarity index 81% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/enums/TokenTypeEnum.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/enums/TokenTypeEnum.java index f409ccf..3b8de55 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/enums/TokenTypeEnum.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/enums/TokenTypeEnum.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.scm.enums; +package cd.casic.ci.log.scm.enums; public enum TokenTypeEnum { diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/CodeRepositoryServiceRegistrar.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/CodeRepositoryServiceRegistrar.java similarity index 91% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/CodeRepositoryServiceRegistrar.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/CodeRepositoryServiceRegistrar.java index fdeea4c..d864e7e 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/CodeRepositoryServiceRegistrar.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/CodeRepositoryServiceRegistrar.java @@ -1,9 +1,9 @@ -package cd.casic.pipeline.scm.service; +package cd.casic.ci.log.scm.service; -import cd.casic.pipeline.scm.enums.ScmType; -import cd.casic.pipeline.scm.dal.pojo.*; -import cd.casic.pipeline.scm.service.code.CodeRepositoryService; +import cd.casic.ci.log.scm.dal.pojo.*; +import cd.casic.ci.log.scm.service.code.CodeRepositoryService; +import cd.casic.ci.log.scm.enums.ScmType; import java.util.concurrent.ConcurrentHashMap; diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/IGitOauthService.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/IGitOauthService.java similarity index 60% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/IGitOauthService.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/IGitOauthService.java index d8a1c9e..b27ddfb 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/IGitOauthService.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/IGitOauthService.java @@ -1,7 +1,7 @@ -package cd.casic.pipeline.scm.service; +package cd.casic.ci.log.scm.service; -import cd.casic.pipeline.scm.dal.pojo.oauth.GitToken; +import cd.casic.ci.log.scm.dal.pojo.oauth.GitToken; public interface IGitOauthService { diff --git a/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/code/CodeRepositoryService.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/code/CodeRepositoryService.java new file mode 100644 index 0000000..d1650b5 --- /dev/null +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/code/CodeRepositoryService.java @@ -0,0 +1,10 @@ +package cd.casic.ci.log.scm.service.code; + + +import cd.casic.ci.log.scm.dal.pojo.Repository; +import cd.casic.ci.log.scm.dal.dto.RepositoryRecord; + +public interface CodeRepositoryService { + + Repository compose(RepositoryRecord repository); +} diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/github/GithubService.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/github/GithubService.java similarity index 96% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/github/GithubService.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/github/GithubService.java index e0380d5..4f7d21d 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/github/GithubService.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/github/GithubService.java @@ -1,11 +1,11 @@ -package cd.casic.pipeline.scm.service.github; +package cd.casic.ci.log.scm.service.github; +import cd.casic.ci.log.scm.dal.pojo.github.GithubBranch; +import cd.casic.ci.log.scm.dal.pojo.github.GithubTag; import cd.casic.framework.commons.exception.ServiceException; import cd.casic.framework.commons.util.http.OkhttpUtils; import cd.casic.framework.commons.util.retry.RetryUtils; -import cd.casic.pipeline.commons.constant.CommonMessageCode; -import cd.casic.pipeline.scm.dal.pojo.github.GithubBranch; -import cd.casic.pipeline.scm.dal.pojo.github.GithubTag; +import cd.casic.ci.commons.constant.CommonMessageCode; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/github/GithubTokenService.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/github/GithubTokenService.java new file mode 100644 index 0000000..511308e --- /dev/null +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/github/GithubTokenService.java @@ -0,0 +1,10 @@ +package cd.casic.ci.log.scm.service.github; + + +import cd.casic.ci.log.scm.dal.pojo.github.GithubToken; +import cd.casic.ci.log.scm.enums.GitHubTokenType; + +public interface GithubTokenService { + + GithubToken getAccessToken(String userId, GitHubTokenType tokenType); +} diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/github/GithubTokenServiceImpl.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/github/GithubTokenServiceImpl.java similarity index 76% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/github/GithubTokenServiceImpl.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/github/GithubTokenServiceImpl.java index cfadf3f..7249556 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/github/GithubTokenServiceImpl.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/github/GithubTokenServiceImpl.java @@ -1,11 +1,11 @@ -package cd.casic.pipeline.scm.service.github; +package cd.casic.ci.log.scm.service.github; +import cd.casic.ci.log.scm.dal.pojo.github.GithubToken; import cd.casic.framework.commons.util.encrypt.AESUtil; -import cd.casic.pipeline.scm.dal.dao.RepositoryGitlabTokenMapper; -import cd.casic.pipeline.scm.dal.dto.RepositoryGitlabToken; -import cd.casic.pipeline.scm.dal.pojo.github.GithubToken; -import cd.casic.pipeline.scm.enums.GitHubTokenType; +import cd.casic.ci.log.scm.dal.dao.RepositoryGitlabTokenMapper; +import cd.casic.ci.log.scm.dal.dto.RepositoryGitlabToken; +import cd.casic.ci.log.scm.enums.GitHubTokenType; import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/github/IGithubService.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/github/IGithubService.java similarity index 53% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/github/IGithubService.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/github/IGithubService.java index 13b2a9f..c1a21a8 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/github/IGithubService.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/github/IGithubService.java @@ -1,8 +1,8 @@ -package cd.casic.pipeline.scm.service.github; +package cd.casic.ci.log.scm.service.github; -import cd.casic.pipeline.scm.dal.pojo.github.GithubBranch; -import cd.casic.pipeline.scm.dal.pojo.github.GithubTag; +import cd.casic.ci.log.scm.dal.pojo.github.GithubBranch; +import cd.casic.ci.log.scm.dal.pojo.github.GithubTag; public interface IGithubService { diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/impl/GitOauthServiceImpl.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/impl/GitOauthServiceImpl.java similarity index 91% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/impl/GitOauthServiceImpl.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/impl/GitOauthServiceImpl.java index f906589..bf406e6 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/impl/GitOauthServiceImpl.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/impl/GitOauthServiceImpl.java @@ -1,12 +1,12 @@ -package cd.casic.pipeline.scm.service.impl; +package cd.casic.ci.log.scm.service.impl; +import cd.casic.ci.log.scm.dal.pojo.oauth.GitToken; +import cd.casic.ci.log.scm.service.scm.IGitService; import cd.casic.framework.commons.util.encrypt.AESUtil; -import cd.casic.pipeline.scm.dal.dao.RepositoryGitTokenMapper; -import cd.casic.pipeline.scm.dal.dto.RepositoryGitToken; -import cd.casic.pipeline.scm.dal.pojo.oauth.GitToken; -import cd.casic.pipeline.scm.service.IGitOauthService; -import cd.casic.pipeline.scm.service.scm.IGitService; +import cd.casic.ci.log.scm.dal.dao.RepositoryGitTokenMapper; +import cd.casic.ci.log.scm.dal.dto.RepositoryGitToken; +import cd.casic.ci.log.scm.service.IGitOauthService; import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; import org.redisson.RedissonRedLock; diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/impl/RepositoryServiceImpl.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/impl/RepositoryServiceImpl.java similarity index 83% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/impl/RepositoryServiceImpl.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/impl/RepositoryServiceImpl.java index 63486f4..093b67c 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/impl/RepositoryServiceImpl.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/impl/RepositoryServiceImpl.java @@ -1,16 +1,16 @@ -package cd.casic.pipeline.scm.service.impl; +package cd.casic.ci.log.scm.service.impl; +import cd.casic.ci.log.scm.dal.pojo.Repository; import cd.casic.framework.commons.exception.ServiceException; import cd.casic.framework.mybatis.core.dataobject.BaseDO; -import cd.casic.pipeline.scm.dal.dao.RepositoryRecordMapper; -import cd.casic.pipeline.scm.dal.dto.RepositoryRecord; -import cd.casic.pipeline.scm.dal.pojo.Repository; -import cd.casic.pipeline.scm.enums.RepositoryConfig; -import cd.casic.pipeline.scm.enums.RepositoryType; -import cd.casic.pipeline.scm.service.CodeRepositoryServiceRegistrar; -import cd.casic.pipeline.scm.service.code.CodeRepositoryService; -import cd.casic.pipeline.scm.utils.HashUtil; +import cd.casic.ci.log.scm.dal.dao.RepositoryRecordMapper; +import cd.casic.ci.log.scm.dal.dto.RepositoryRecord; +import cd.casic.ci.log.scm.enums.RepositoryConfig; +import cd.casic.ci.log.scm.enums.RepositoryType; +import cd.casic.ci.log.scm.service.CodeRepositoryServiceRegistrar; +import cd.casic.ci.log.scm.service.code.CodeRepositoryService; +import cd.casic.ci.log.scm.utils.HashUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import jakarta.annotation.Resource; diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/scm/GitServiceImpl.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/scm/GitServiceImpl.java similarity index 92% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/scm/GitServiceImpl.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/scm/GitServiceImpl.java index b2c7061..c562a83 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/scm/GitServiceImpl.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/scm/GitServiceImpl.java @@ -1,9 +1,9 @@ -package cd.casic.pipeline.scm.service.scm; +package cd.casic.ci.log.scm.service.scm; +import cd.casic.ci.log.scm.dal.pojo.oauth.GitToken; import cd.casic.framework.commons.util.http.OkhttpUtils; -import cd.casic.pipeline.scm.config.GitConfig; -import cd.casic.pipeline.scm.dal.pojo.oauth.GitToken; +import cd.casic.ci.log.scm.config.GitConfig; import com.fasterxml.jackson.databind.ObjectMapper; import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/scm/IGitService.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/scm/IGitService.java similarity index 51% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/scm/IGitService.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/scm/IGitService.java index 293c3f5..c659c5a 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/scm/IGitService.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/scm/IGitService.java @@ -1,7 +1,7 @@ -package cd.casic.pipeline.scm.service.scm; +package cd.casic.ci.log.scm.service.scm; -import cd.casic.pipeline.scm.dal.pojo.oauth.GitToken; +import cd.casic.ci.log.scm.dal.pojo.oauth.GitToken; public interface IGitService { diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/scm/IScmOauthService.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/scm/IScmOauthService.java similarity index 70% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/scm/IScmOauthService.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/scm/IScmOauthService.java index 4d23b10..135d722 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/scm/IScmOauthService.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/scm/IScmOauthService.java @@ -1,9 +1,9 @@ -package cd.casic.pipeline.scm.service.scm; +package cd.casic.ci.log.scm.service.scm; -import cd.casic.pipeline.scm.dal.pojo.RevisionInfo; -import cd.casic.pipeline.scm.enums.CodeSvnRegion; -import cd.casic.pipeline.scm.enums.ScmType; +import cd.casic.ci.log.scm.dal.pojo.RevisionInfo; +import cd.casic.ci.log.scm.enums.CodeSvnRegion; +import cd.casic.ci.log.scm.enums.ScmType; public interface IScmOauthService { diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/scm/IScmService.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/scm/IScmService.java similarity index 71% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/scm/IScmService.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/scm/IScmService.java index 9cfa086..c9dbb44 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/scm/IScmService.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/scm/IScmService.java @@ -1,9 +1,9 @@ -package cd.casic.pipeline.scm.service.scm; +package cd.casic.ci.log.scm.service.scm; -import cd.casic.pipeline.scm.dal.pojo.RevisionInfo; -import cd.casic.pipeline.scm.enums.CodeSvnRegion; -import cd.casic.pipeline.scm.enums.ScmType; +import cd.casic.ci.log.scm.dal.pojo.RevisionInfo; +import cd.casic.ci.log.scm.enums.CodeSvnRegion; +import cd.casic.ci.log.scm.enums.ScmType; public interface IScmService { diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/scm/ScmOauthServiceImpl.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/scm/ScmOauthServiceImpl.java similarity index 86% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/scm/ScmOauthServiceImpl.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/scm/ScmOauthServiceImpl.java index 3ec698c..a1b9732 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/scm/ScmOauthServiceImpl.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/scm/ScmOauthServiceImpl.java @@ -1,12 +1,12 @@ -package cd.casic.pipeline.scm.service.scm; +package cd.casic.ci.log.scm.service.scm; -import cd.casic.pipeline.scm.config.GitConfig; -import cd.casic.pipeline.scm.config.SVNConfig; -import cd.casic.pipeline.scm.dal.pojo.RevisionInfo; -import cd.casic.pipeline.scm.dal.pojo.ScmOauthFactory; -import cd.casic.pipeline.scm.enums.CodeSvnRegion; -import cd.casic.pipeline.scm.enums.ScmType; +import cd.casic.ci.log.scm.config.GitConfig; +import cd.casic.ci.log.scm.config.SVNConfig; +import cd.casic.ci.log.scm.dal.pojo.RevisionInfo; +import cd.casic.ci.log.scm.dal.pojo.ScmOauthFactory; +import cd.casic.ci.log.scm.enums.CodeSvnRegion; +import cd.casic.ci.log.scm.enums.ScmType; import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/scm/ScmServiceImpl.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/scm/ScmServiceImpl.java similarity index 87% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/scm/ScmServiceImpl.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/scm/ScmServiceImpl.java index 827569e..ed775f2 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/scm/ScmServiceImpl.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/scm/ScmServiceImpl.java @@ -1,13 +1,13 @@ -package cd.casic.pipeline.scm.service.scm; +package cd.casic.ci.log.scm.service.scm; -import cd.casic.pipeline.scm.config.GitConfig; -import cd.casic.pipeline.scm.config.P4Config; -import cd.casic.pipeline.scm.config.SVNConfig; -import cd.casic.pipeline.scm.dal.pojo.RevisionInfo; -import cd.casic.pipeline.scm.dal.pojo.ScmFactory; -import cd.casic.pipeline.scm.enums.CodeSvnRegion; -import cd.casic.pipeline.scm.enums.ScmType; +import cd.casic.ci.log.scm.config.GitConfig; +import cd.casic.ci.log.scm.config.P4Config; +import cd.casic.ci.log.scm.config.SVNConfig; +import cd.casic.ci.log.scm.dal.pojo.RevisionInfo; +import cd.casic.ci.log.scm.dal.pojo.ScmFactory; +import cd.casic.ci.log.scm.enums.CodeSvnRegion; +import cd.casic.ci.log.scm.enums.ScmType; import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; diff --git a/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/tgit/ITGitService.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/tgit/ITGitService.java new file mode 100644 index 0000000..772eb60 --- /dev/null +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/tgit/ITGitService.java @@ -0,0 +1,13 @@ +package cd.casic.ci.log.scm.service.tgit; + + +import cd.casic.ci.log.scm.dal.pojo.git.GitUserInfo; +import cd.casic.ci.log.scm.dal.pojo.oauth.GitToken; +import cd.casic.ci.log.scm.enums.TokenTypeEnum; + +public interface ITGitService { + + GitToken refreshToken(String userId, GitToken accessToken); + + GitUserInfo getUserInfoByToken(String token, TokenTypeEnum tokenType); +} diff --git a/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/tgit/TGitOauthService.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/tgit/TGitOauthService.java new file mode 100644 index 0000000..23676cd --- /dev/null +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/tgit/TGitOauthService.java @@ -0,0 +1,9 @@ +package cd.casic.ci.log.scm.service.tgit; + + +import cd.casic.ci.log.scm.dal.pojo.oauth.GitToken; + +public interface TGitOauthService { + + GitToken getAccessToken(String userId); +} diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/tgit/TGitOauthServiceImpl.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/tgit/TGitOauthServiceImpl.java similarity index 78% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/tgit/TGitOauthServiceImpl.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/tgit/TGitOauthServiceImpl.java index 83e6fd6..b186e8f 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/tgit/TGitOauthServiceImpl.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/tgit/TGitOauthServiceImpl.java @@ -1,6 +1,6 @@ -package cd.casic.pipeline.scm.service.tgit; +package cd.casic.ci.log.scm.service.tgit; -import cd.casic.pipeline.scm.dal.pojo.oauth.GitToken; +import cd.casic.ci.log.scm.dal.pojo.oauth.GitToken; import jakarta.annotation.Resource; import org.springframework.stereotype.Service; diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/tgit/TGitServiceImpl.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/tgit/TGitServiceImpl.java similarity index 92% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/tgit/TGitServiceImpl.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/tgit/TGitServiceImpl.java index dc38781..5da06ed 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/tgit/TGitServiceImpl.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/tgit/TGitServiceImpl.java @@ -1,11 +1,11 @@ -package cd.casic.pipeline.scm.service.tgit; +package cd.casic.ci.log.scm.service.tgit; import cd.casic.framework.commons.util.http.OkhttpUtils; -import cd.casic.pipeline.scm.config.GitConfig; -import cd.casic.pipeline.scm.dal.pojo.git.GitUserInfo; -import cd.casic.pipeline.scm.dal.pojo.oauth.GitToken; -import cd.casic.pipeline.scm.enums.TokenTypeEnum; +import cd.casic.ci.log.scm.config.GitConfig; +import cd.casic.ci.log.scm.dal.pojo.git.GitUserInfo; +import cd.casic.ci.log.scm.dal.pojo.oauth.GitToken; +import cd.casic.ci.log.scm.enums.TokenTypeEnum; import com.fasterxml.jackson.databind.ObjectMapper; import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/tgit/TGitTokenService.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/tgit/TGitTokenService.java similarity index 63% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/tgit/TGitTokenService.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/tgit/TGitTokenService.java index b4d7f5b..7d740b8 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/tgit/TGitTokenService.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/tgit/TGitTokenService.java @@ -1,7 +1,7 @@ -package cd.casic.pipeline.scm.service.tgit; +package cd.casic.ci.log.scm.service.tgit; -import cd.casic.pipeline.scm.dal.pojo.oauth.GitToken; +import cd.casic.ci.log.scm.dal.pojo.oauth.GitToken; public interface TGitTokenService { diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/tgit/TGitTokenServiceImpl.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/tgit/TGitTokenServiceImpl.java similarity index 93% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/tgit/TGitTokenServiceImpl.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/tgit/TGitTokenServiceImpl.java index 490d638..bbb731a 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/tgit/TGitTokenServiceImpl.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/service/tgit/TGitTokenServiceImpl.java @@ -1,10 +1,10 @@ -package cd.casic.pipeline.scm.service.tgit; +package cd.casic.ci.log.scm.service.tgit; import cd.casic.framework.commons.util.encrypt.AESUtil; -import cd.casic.pipeline.scm.dal.dao.RepositoryTGitTokenMapper; -import cd.casic.pipeline.scm.dal.dto.RepositoryTGitToken; -import cd.casic.pipeline.scm.dal.pojo.oauth.GitToken; -import cd.casic.pipeline.scm.enums.TokenTypeEnum; +import cd.casic.ci.log.scm.dal.dao.RepositoryTGitTokenMapper; +import cd.casic.ci.log.scm.dal.dto.RepositoryTGitToken; +import cd.casic.ci.log.scm.dal.pojo.oauth.GitToken; +import cd.casic.ci.log.scm.enums.TokenTypeEnum; import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; import org.redisson.RedissonRedLock; diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/utils/GitUtils.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/utils/GitUtils.java similarity index 91% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/utils/GitUtils.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/utils/GitUtils.java index fad94e2..c646abc 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/utils/GitUtils.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/utils/GitUtils.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.scm.utils; +package cd.casic.ci.log.scm.utils; import java.util.regex.Pattern; diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/utils/HashUtil.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/utils/HashUtil.java similarity index 97% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/utils/HashUtil.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/utils/HashUtil.java index 4d61dfb..5acc8a9 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/utils/HashUtil.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/utils/HashUtil.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.scm.utils; +package cd.casic.ci.log.scm.utils; import org.hashids.Hashids; diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/utils/RepositoryConfigUtils.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/utils/RepositoryConfigUtils.java similarity index 74% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/utils/RepositoryConfigUtils.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/utils/RepositoryConfigUtils.java index b2ba8d8..37c8f2c 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/utils/RepositoryConfigUtils.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/utils/RepositoryConfigUtils.java @@ -1,8 +1,8 @@ -package cd.casic.pipeline.scm.utils; +package cd.casic.ci.log.scm.utils; -import cd.casic.pipeline.scm.enums.RepositoryConfig; -import cd.casic.pipeline.scm.enums.RepositoryType; +import cd.casic.ci.log.scm.enums.RepositoryConfig; +import cd.casic.ci.log.scm.enums.RepositoryType; public class RepositoryConfigUtils { diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/utils/WebhookUtils.java b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/utils/WebhookUtils.java similarity index 93% rename from modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/utils/WebhookUtils.java rename to modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/utils/WebhookUtils.java index 39ebbda..b0d8afc 100644 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/utils/WebhookUtils.java +++ b/modules/ci-scm-repository/src/main/java/cd/casic/ci/log/scm/utils/WebhookUtils.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.scm.utils; +package cd.casic.ci.log.scm.utils; /** * @author by mianbin diff --git a/modules/pipeline-ci-ticket/pom.xml b/modules/ci-ticket/pom.xml similarity index 68% rename from modules/pipeline-ci-ticket/pom.xml rename to modules/ci-ticket/pom.xml index 0eb21e6..aa09741 100644 --- a/modules/pipeline-ci-ticket/pom.xml +++ b/modules/ci-ticket/pom.xml @@ -7,20 +7,23 @@ cd.casic.boot modules ${revision} + ../pom.xml - cd.casic.pipeline - pipeline-ci-ticket + cd.casic.ci + ci-ticket + jar + ${revision} - cd.casic.pipeline - pipeline-ci-commons + cd.casic.ci + ci-commons - cd.casic.pipeline - pipeline-ci-market + cd.casic.ci + ci-market 2.0.0-jdk17 diff --git a/modules/ci-ticket/src/main/java/cd/casic/ci/ticket/UserCredentialResource.java b/modules/ci-ticket/src/main/java/cd/casic/ci/ticket/UserCredentialResource.java new file mode 100644 index 0000000..ac86f69 --- /dev/null +++ b/modules/ci-ticket/src/main/java/cd/casic/ci/ticket/UserCredentialResource.java @@ -0,0 +1,160 @@ +package cd.casic.ci.ticket; + +import cd.casic.framework.commons.pojo.CommonResult; +import cd.casic.framework.commons.pojo.PageResult; +import cd.casic.ci.ticket.dal.pojo.*; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.web.bind.annotation.*; + +import java.security.Permission; +import java.util.List; + +import static cd.casic.ci.commons.constant.OpsHeader.AUTH_HEADER_USER_ID; +import static cd.casic.ci.commons.constant.OpsHeader.AUTH_HEADER_USER_ID_DEFAULT_VALUE; + +/** + * @Author:mianbin + * @Package:cd.casic.pipeline + * @Project:ops-pro + * @name:UserCredentialResource + * @Date:2025/03/24 10:08 + * @Filename:UserCredentialResource + * @description:Todo + */ +@RestController +@Tag(name = "服务-凭据资源") +@RequestMapping("/service/credentials") +public interface UserCredentialResource { + @Operation(summary = "是否拥有创建凭据权限") + @GetMapping("/{projectId}/hasCreatePermission") + CommonResult hasCreatePermission( + @Parameter(description = "用户ID", required = true, example = AUTH_HEADER_USER_ID_DEFAULT_VALUE) + @RequestHeader(AUTH_HEADER_USER_ID) String userId, + @Parameter(description = "项目ID", required = true) + @PathVariable("projectId") String projectId + ); + + @Operation(summary = "新增凭据") + @PostMapping("/{projectId}/") + CommonResult create( + @Parameter(description = "用户ID", required = true, example = AUTH_HEADER_USER_ID_DEFAULT_VALUE) + @RequestHeader(AUTH_HEADER_USER_ID) String userId, + @Parameter(description = "项目ID", required = true) + @PathVariable("projectId") String projectId, + @Parameter(description = "凭据", required = true) + @RequestBody CredentialCreate credential + ); + + @Operation(summary = "删除凭据") + @DeleteMapping("/{projectId}/{credentialId}") + CommonResult delete( + @Parameter(description = "用户ID", required = true, example = AUTH_HEADER_USER_ID_DEFAULT_VALUE) + @RequestHeader(AUTH_HEADER_USER_ID) String userId, + @Parameter(description = "项目ID", required = true) + @PathVariable("projectId") String projectId, + @Parameter(description = "凭据ID", required = true) + @PathVariable("credentialId") String credentialId + ); + + @Operation(summary = "获取凭据列表") + @GetMapping("/{projectId}/") + PageResult list( + @Parameter(description = "用户ID", required = true, example = AUTH_HEADER_USER_ID_DEFAULT_VALUE) + @RequestHeader(AUTH_HEADER_USER_ID) String userId, + @Parameter(description = "项目ID", required = true) + @PathVariable("projectId") String projectId, + @Parameter(description = "凭证类型列表,用逗号分隔", required = false) + @RequestParam(value = "credentialTypes", required = false) String credentialTypesString, + @Parameter(description = "第几页", required = false, example = "1") + @RequestParam(value = "page", required = false) Integer page, + @Parameter(description = "每页多少条", required = false, example = "20") + @RequestParam(value = "pageSize", required = false) Integer pageSize, + @Parameter(description = "关键字", required = false) + @RequestParam(value = "keyword", required = false) String keyword + ); + + @Operation(summary = "获取拥有对应权限凭据列表") + @GetMapping("/{projectId}/hasPermissionList") + PageResult hasPermissionList( + @Parameter(description = "用户ID", required = true, example = AUTH_HEADER_USER_ID_DEFAULT_VALUE) + @RequestHeader(AUTH_HEADER_USER_ID) String userId, + @Parameter(description = "项目ID", required = true) + @PathVariable("projectId") String projectId, + @Parameter(description = "凭证类型列表,用逗号分隔", required = false, example = "") + @RequestParam(value = "credentialTypes", required = false) String credentialTypesString, + @Parameter(description = "对应权限", required = true, example = "") + @RequestParam("permission") Permission permission, + @Parameter(description = "第几页", required = false, example = "1") + @RequestParam(value = "page", required = false) Integer page, + @Parameter(description = "每页多少条", required = false, example = "20") + @RequestParam(value = "pageSize", required = false) Integer pageSize, + @Parameter(description = "关键字", required = false) + @RequestParam(value = "keyword", required = false) String keyword + ); + + @Operation(summary = "获取拥有对应权限凭据列表-不分页-插件UI调用") + @GetMapping("/{projectId}/getHasPermissionList") + CommonResult> getHasPermissionList( + @Parameter(description = "用户ID", required = true, example = AUTH_HEADER_USER_ID_DEFAULT_VALUE) + @RequestHeader(AUTH_HEADER_USER_ID) String userId, + @Parameter(description = "项目ID", required = true) + @PathVariable("projectId") String projectId, + @Parameter(description = "凭证类型列表,用逗号分隔", required = false, example = "") + @RequestParam(value = "credentialTypes", required = false) String credentialTypesString, + @Parameter(description = "对应权限", required = true, example = "") + @RequestParam("permission") Permission permission, + @Parameter(description = "关键字", required = false) + @RequestParam(value = "keyword", required = false) String keyword + ); + + @Operation(summary = "显示真实凭据") + @GetMapping("/{projectId}/{credentialId}/show") + CommonResult show( + @Parameter(description = "用户ID", required = true, example = AUTH_HEADER_USER_ID_DEFAULT_VALUE) + @RequestHeader(AUTH_HEADER_USER_ID) String userId, + @Parameter(description = "项目ID", required = true) + @PathVariable("projectId") String projectId, + @Parameter(description = "凭据ID", required = true) + @PathVariable("credentialId") String credentialId + ); + + + @Operation(summary = "获取凭据以编辑") + @GetMapping("/{projectId}/{credentialId}/") + CommonResult get( + @Parameter(description = "用户ID", required = true, example = AUTH_HEADER_USER_ID_DEFAULT_VALUE) + @RequestHeader(AUTH_HEADER_USER_ID) String userId, + @Parameter(description = "项目ID", required = true) + @PathVariable("projectId") String projectId, + @Parameter(description = "凭据ID", required = true) + @PathVariable("credentialId") String credentialId + ); + + @Operation(summary = "编辑凭据") + @PutMapping("/{projectId}/{credentialId}/") + CommonResult edit( + @Parameter(description = "用户ID", required = true, example = AUTH_HEADER_USER_ID_DEFAULT_VALUE) + @RequestHeader(AUTH_HEADER_USER_ID) String userId, + @Parameter(description = "项目ID", required = true) + @PathVariable("projectId") String projectId, + @Parameter(description = "凭据ID", required = true) + @PathVariable("credentialId") String credentialId, + @Parameter(description = "凭据", required = true) + @RequestBody CredentialUpdate credential + ); + + @Operation(summary = "编辑凭据设置凭据") + @PutMapping("/{projectId}/{credentialId}/setting") + CommonResult editSetting( + @Parameter(description = "用户ID", required = true, example = AUTH_HEADER_USER_ID_DEFAULT_VALUE) + @RequestHeader(AUTH_HEADER_USER_ID) String userId, + @Parameter(description = "项目ID", required = true) + @PathVariable("projectId") String projectId, + @Parameter(description = "凭据ID", required = true) + @PathVariable("credentialId") String credentialId, + @Parameter(description = "凭据设置", required = true) + @RequestBody CredentialSettingUpdate credentialSetting + ); +} diff --git a/modules/ci-ticket/src/main/java/cd/casic/ci/ticket/api/BuildAgentCredentialApi.java b/modules/ci-ticket/src/main/java/cd/casic/ci/ticket/api/BuildAgentCredentialApi.java new file mode 100644 index 0000000..619bc6c --- /dev/null +++ b/modules/ci-ticket/src/main/java/cd/casic/ci/ticket/api/BuildAgentCredentialApi.java @@ -0,0 +1,123 @@ +package cd.casic.ci.ticket.api; + +import cd.casic.framework.commons.pojo.CommonResult; +import cd.casic.ci.ticket.dal.pojo.CredentialCreate; +import cd.casic.ci.ticket.dal.pojo.CredentialInfo; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Nullable; +import org.springframework.web.bind.annotation.*; + +import java.util.Map; + +import static cd.casic.ci.commons.constant.OpsHeader.*; + +/** + * @Author:mianbin + * @Package:cd.casic.pipeline.api + * @Project:ops-pro + * @name:BuildAgentCredentialApi + * @Date:2025/03/24 9:34 + * @Filename:BuildAgentCredentialApi + * @description:Todo + */ +@RestController +@Tag(name = "BUILD_AGENT_CREDENTIAL", description = "构建-凭据资源") +@RequestMapping("/buildAgent/builds/credentials") +public interface BuildAgentCredentialApi { + @Operation(summary = "构建机获取凭据") + @GetMapping("/{credentialId}/") + CommonResult get( + @Parameter(description = "项目ID", required = true) + @RequestHeader(AUTH_HEADER_DEVOPS_PROJECT_ID) + String projectId, + @Parameter(description = "构建ID", required = true) + @RequestHeader(AUTH_HEADER_DEVOPS_BUILD_ID) + String buildId, + @Parameter(description = "构建环境ID", required = true) + @RequestHeader(AUTH_HEADER_DEVOPS_VM_SEQ_ID) + String vmSeqId, + @Parameter(description = "构建机名称", required = true) + @RequestHeader(AUTH_HEADER_DEVOPS_VM_NAME) + String vmName, + @Parameter(description = "凭据ID", required = true) + @PathVariable("credentialId") + String credentialId, + @Parameter(description = "Base64编码的加密公钥", required = true) + @RequestParam("publicKey") + String publicKey, + @Parameter(description = "插件ID", required = true) + @RequestHeader(AUTH_HEADER_DEVOPS_CI_TASK_ID) + @Nullable String taskId, + @Parameter(description = "插件ID", required = true) + @RequestParam("X-DEVOPS-TASK-ID") + @Nullable String oldTaskId + ); + + @Operation(summary = "构建机获取跨项目凭据") + @GetMapping("/{credentialId}/across/") + CommonResult getAcrossProject( + @Parameter(description = "项目ID", required = true) + @RequestHeader(AUTH_HEADER_DEVOPS_PROJECT_ID) + String projectId, + @Parameter(description = "构建ID", required = true) + @RequestHeader(AUTH_HEADER_DEVOPS_BUILD_ID) + String buildId, + @Parameter(description = "构建环境ID", required = true) + @RequestHeader(AUTH_HEADER_DEVOPS_VM_SEQ_ID) + String vmSeqId, + @Parameter(description = "构建机名称", required = true) + @RequestHeader(AUTH_HEADER_DEVOPS_VM_NAME) + String vmName, + @Parameter(description = "凭据ID", required = true) + @PathVariable("credentialId") + String credentialId, + @Parameter(description = "项目ID", required = true) + @RequestParam("targetProjectId") + String targetProjectId, + @Parameter(description = "Base64编码的加密公钥", required = true) + @RequestParam("publicKey") + String publicKey + ); + + @Operation(summary = "插件获取凭据") + @GetMapping("/{credentialId}/detail") + CommonResult> getDetail( + @Parameter(description = "项目ID", required = true) + @RequestHeader(AUTH_HEADER_DEVOPS_PROJECT_ID) + String projectId, + @Parameter(description = "构建ID", required = true) + @RequestHeader(AUTH_HEADER_DEVOPS_BUILD_ID) + String buildId, + @Parameter(description = "构建环境ID", required = true) + @RequestHeader(AUTH_HEADER_DEVOPS_VM_SEQ_ID) + String vmSeqId, + @Parameter(description = "构建机名称", required = true) + @RequestHeader(AUTH_HEADER_DEVOPS_VM_NAME) + String vmName, + @Parameter(description = "插件ID", required = true) + @RequestHeader(AUTH_HEADER_DEVOPS_CI_TASK_ID) + @Nullable String taskId, + @Parameter(description = "插件ID(旧版本的,为了兼容旧版本插件不用更新sdk来使用)", required = true) + @RequestHeader("X-DEVOPS-TASK-ID") + @Nullable String oldTaskId, + @Parameter(description = "凭据ID", required = true) + @PathVariable("credentialId") + String credentialId + ); + + @Operation(summary = "新增凭据") + @PostMapping("/{projectId}/") + CommonResult create( + @Parameter(description = "用户ID", required = true, example = AUTH_HEADER_USER_ID_DEFAULT_VALUE) + @RequestHeader(AUTH_HEADER_USER_ID) + String userId, + @Parameter(description = "项目ID", required = true) + @PathVariable("projectId") + String projectId, + @Parameter(description = "凭据", required = true) + CredentialCreate credential + ); + +} diff --git a/modules/pipeline-ci-ticket/src/main/java/cd/casic/pipeline/api/BuildCredentialApi.java b/modules/ci-ticket/src/main/java/cd/casic/ci/ticket/api/BuildCredentialApi.java similarity index 96% rename from modules/pipeline-ci-ticket/src/main/java/cd/casic/pipeline/api/BuildCredentialApi.java rename to modules/ci-ticket/src/main/java/cd/casic/ci/ticket/api/BuildCredentialApi.java index 0b8abd0..b5060d1 100644 --- a/modules/pipeline-ci-ticket/src/main/java/cd/casic/pipeline/api/BuildCredentialApi.java +++ b/modules/ci-ticket/src/main/java/cd/casic/ci/ticket/api/BuildCredentialApi.java @@ -1,8 +1,8 @@ -package cd.casic.pipeline.api; +package cd.casic.ci.ticket.api; import cd.casic.framework.commons.pojo.CommonResult; -import cd.casic.pipeline.dal.pojo.CredentialCreate; -import cd.casic.pipeline.dal.pojo.CredentialInfo; +import cd.casic.ci.ticket.dal.pojo.CredentialCreate; +import cd.casic.ci.ticket.dal.pojo.CredentialInfo; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; @@ -10,7 +10,7 @@ import org.springframework.web.bind.annotation.*; import java.util.Map; -import static cd.casic.pipeline.commons.constant.OpsHeader.*; +import static cd.casic.ci.commons.constant.OpsHeader.*; /** * @Author:mianbin diff --git a/modules/pipeline-ci-ticket/src/main/java/cd/casic/pipeline/api/OpCredentialApi.java b/modules/ci-ticket/src/main/java/cd/casic/ci/ticket/api/OpCredentialApi.java similarity index 90% rename from modules/pipeline-ci-ticket/src/main/java/cd/casic/pipeline/api/OpCredentialApi.java rename to modules/ci-ticket/src/main/java/cd/casic/ci/ticket/api/OpCredentialApi.java index 3a7eb73..4d7a937 100644 --- a/modules/pipeline-ci-ticket/src/main/java/cd/casic/pipeline/api/OpCredentialApi.java +++ b/modules/ci-ticket/src/main/java/cd/casic/ci/ticket/api/OpCredentialApi.java @@ -1,14 +1,14 @@ -package cd.casic.pipeline.api; +package cd.casic.ci.ticket.api; import cd.casic.framework.commons.pojo.CommonResult; import cd.casic.framework.commons.pojo.PageResult; -import cd.casic.pipeline.dal.pojo.CredentialWithPermission; +import cd.casic.ci.ticket.dal.pojo.CredentialWithPermission; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.web.bind.annotation.*; -import static cd.casic.pipeline.commons.constant.OpsHeader.AUTH_HEADER_USER_ID; +import static cd.casic.ci.commons.constant.OpsHeader.AUTH_HEADER_USER_ID; /** * @Author:mianbin diff --git a/modules/ci-ticket/src/main/java/cd/casic/ci/ticket/api/ServiceCredentialApi.java b/modules/ci-ticket/src/main/java/cd/casic/ci/ticket/api/ServiceCredentialApi.java new file mode 100644 index 0000000..c940be2 --- /dev/null +++ b/modules/ci-ticket/src/main/java/cd/casic/ci/ticket/api/ServiceCredentialApi.java @@ -0,0 +1,119 @@ +package cd.casic.ci.ticket.api; + + +import cd.casic.framework.commons.pojo.CommonResult; +import cd.casic.framework.commons.pojo.PageResult; +import cd.casic.ci.ticket.dal.pojo.Credential; +import cd.casic.ci.ticket.dal.pojo.CredentialCreate; +import cd.casic.ci.ticket.dal.pojo.CredentialInfo; +import cd.casic.ci.ticket.dal.pojo.CredentialUpdate; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.web.bind.annotation.*; + +import java.security.Permission; + +import static cd.casic.ci.commons.constant.OpsHeader.AUTH_HEADER_USER_ID; +import static cd.casic.ci.commons.constant.OpsHeader.AUTH_HEADER_USER_ID_DEFAULT_VALUE; + + +@RestController +@Tag(name = "服务-凭据资源") +@RequestMapping("/service/credentials") +public interface ServiceCredentialApi { + + @Operation(summary = "新增凭据") + @PostMapping("/{projectId}/") + CommonResult create( + @Parameter(description = "User ID", required = true, example = AUTH_HEADER_USER_ID_DEFAULT_VALUE) + @RequestHeader(AUTH_HEADER_USER_ID) + String userId, + @Parameter(description = "Project ID", required = true) + @PathVariable("projectId") + String projectId, + @Parameter(description = "Credential", required = true) + CredentialCreate credential + ); + + @Operation(summary = "其他服务获取凭据") + @GetMapping("/{projectId}/{credentialId}/") + CommonResult get( + @Parameter(description = "Project ID", required = true) + @PathVariable("projectId") + String projectId, + @Parameter(description = "Credential ID", required = true) + @PathVariable("credentialId") + String credentialId, + @Parameter(description = "Base64-encoded public key for encryption", required = true) + @RequestParam("publicKey") + String publicKey + ); + + @Operation(summary = "检查凭据是否存在") + @GetMapping("/{projectId}/{credentialId}/") + CommonResult check( + @Parameter(description = "Project ID", required = true) + @RequestParam("projectId") + String projectId, + @Parameter(description = "Credential ID", required = true) + @RequestParam("credentialId") + String credentialId + ); + + @Operation(summary = "其他服务获取凭据列表") + @GetMapping("/{projectId}/") + CommonResult> list( + @Parameter(description = "Project ID", required = true) + @PathVariable("projectId") + String projectId, + @Parameter(description = "Page number", required = false, example = "1") + @RequestParam("page") + Integer page, + @Parameter(description = "Number of items per page", required = false, example = "20") + @RequestParam("pageSize") + Integer pageSize + ); + + @Operation(summary = "获取拥有对应权限凭据列表") + @GetMapping("/{projectId}/hasPermissionList") + CommonResult> hasPermissionList( + @Parameter(description = "User ID", required = true, example = AUTH_HEADER_USER_ID_DEFAULT_VALUE) + @RequestHeader(AUTH_HEADER_USER_ID) + String userId, + @Parameter(description = "Project ID", required = true) + @PathVariable("projectId") + String projectId, + @Parameter(description = "List of credential types, separated by commas", required = false, example = "") + @RequestParam("credentialTypes") + String credentialTypesString, + @Parameter(description = "Corresponding permission", required = true, example = "") + @RequestParam("permission") + Permission permission, + @Parameter(description = "Page number", required = false, example = "1") + @RequestParam("page") + Integer page, + @Parameter(description = "Number of items per page", required = false, example = "20") + @RequestParam("pageSize") + Integer pageSize, + @Parameter(description = "Keyword", required = false) + @RequestParam("keyword") + String keyword + ); + + @Operation(summary = "编辑凭据") + @PutMapping("/projects/{projectId}/credentials/{credentialId}/") + CommonResult edit( + @Parameter(description = "User ID", required = true, example = AUTH_HEADER_USER_ID_DEFAULT_VALUE) + @RequestHeader(AUTH_HEADER_USER_ID) + String userId, + @Parameter(description = "Project ID", required = true) + @PathVariable("projectId") + String projectId, + @Parameter(description = "Credential ID", required = true) + @PathVariable("credentialId") + String credentialId, + @Parameter(description = "Credential", required = true) + CredentialUpdate credential + ); +} diff --git a/modules/ci-ticket/src/main/java/cd/casic/ci/ticket/api/UserCredentialApi.java b/modules/ci-ticket/src/main/java/cd/casic/ci/ticket/api/UserCredentialApi.java new file mode 100644 index 0000000..abfc857 --- /dev/null +++ b/modules/ci-ticket/src/main/java/cd/casic/ci/ticket/api/UserCredentialApi.java @@ -0,0 +1,16 @@ +package cd.casic.ci.ticket.api; + +/** + * @Author:mianbin + * @Package:cd.casic.pipeline.api + * @Project:ops-pro + * @name:UserCredentialApi + * @Date:2025/03/24 9:59 + * @Filename:UserCredentialApi + * @description:Todo + */ +public interface UserCredentialApi { + + + +} diff --git a/modules/ci-ticket/src/main/java/cd/casic/ci/ticket/api/impl/ServiceCredentialApiImpl.java b/modules/ci-ticket/src/main/java/cd/casic/ci/ticket/api/impl/ServiceCredentialApiImpl.java new file mode 100644 index 0000000..3d08c9a --- /dev/null +++ b/modules/ci-ticket/src/main/java/cd/casic/ci/ticket/api/impl/ServiceCredentialApiImpl.java @@ -0,0 +1,52 @@ +package cd.casic.ci.ticket.api.impl; + + +import cd.casic.framework.commons.exception.ServiceException; +import cd.casic.framework.commons.pojo.CommonResult; +import cd.casic.framework.commons.pojo.PageResult; +import cd.casic.ci.ticket.api.ServiceCredentialApi; +import cd.casic.ci.ticket.dal.pojo.Credential; +import cd.casic.ci.ticket.dal.pojo.CredentialCreate; +import cd.casic.ci.ticket.dal.pojo.CredentialInfo; +import cd.casic.ci.ticket.dal.pojo.CredentialUpdate; +import cd.casic.ci.ticket.service.CredentialService; +import jakarta.annotation.Resource; +import org.apache.commons.lang3.StringUtils; +import org.springframework.web.bind.annotation.RestController; + +import java.security.Permission; + + +@RestController +public class ServiceCredentialApiImpl implements ServiceCredentialApi { + + @Override + public CommonResult create(String userId, String projectId, CredentialCreate credential) { + return null; + } + + @Override + public CommonResult get(String projectId, String credentialId, String publicKey) { + return null; + } + + @Override + public CommonResult check(String projectId, String credentialId) { + return null; + } + + @Override + public CommonResult> list(String projectId, Integer page, Integer pageSize) { + return null; + } + + @Override + public CommonResult> hasPermissionList(String userId, String projectId, String credentialTypesString, Permission permission, Integer page, Integer pageSize, String keyword) { + return null; + } + + @Override + public CommonResult edit(String userId, String projectId, String credentialId, CredentialUpdate credential) { + return null; + } +} diff --git a/modules/pipeline-ci-ticket/src/main/java/cd/casic/pipeline/constant/TicketMessageCode.java b/modules/ci-ticket/src/main/java/cd/casic/ci/ticket/constant/TicketMessageCode.java similarity index 95% rename from modules/pipeline-ci-ticket/src/main/java/cd/casic/pipeline/constant/TicketMessageCode.java rename to modules/ci-ticket/src/main/java/cd/casic/ci/ticket/constant/TicketMessageCode.java index f84dcdb..0c4459f 100644 --- a/modules/pipeline-ci-ticket/src/main/java/cd/casic/pipeline/constant/TicketMessageCode.java +++ b/modules/ci-ticket/src/main/java/cd/casic/ci/ticket/constant/TicketMessageCode.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.constant; +package cd.casic.ci.ticket.constant; import lombok.NoArgsConstructor; diff --git a/modules/pipeline-ci-ticket/src/main/java/cd/casic/pipeline/dal/dao/CredentialRecordMapper.java b/modules/ci-ticket/src/main/java/cd/casic/ci/ticket/dal/dao/CredentialRecordMapper.java similarity index 73% rename from modules/pipeline-ci-ticket/src/main/java/cd/casic/pipeline/dal/dao/CredentialRecordMapper.java rename to modules/ci-ticket/src/main/java/cd/casic/ci/ticket/dal/dao/CredentialRecordMapper.java index be560f8..e41133a 100644 --- a/modules/pipeline-ci-ticket/src/main/java/cd/casic/pipeline/dal/dao/CredentialRecordMapper.java +++ b/modules/ci-ticket/src/main/java/cd/casic/ci/ticket/dal/dao/CredentialRecordMapper.java @@ -1,7 +1,7 @@ -package cd.casic.pipeline.dal.dao; +package cd.casic.ci.ticket.dal.dao; import cd.casic.framework.mybatis.core.mapper.BaseMapperX; -import cd.casic.pipeline.dal.dataobject.CredentialRecord; +import cd.casic.ci.ticket.dal.dataobject.CredentialRecord; /** * @author by mianbin diff --git a/modules/pipeline-ci-ticket/src/main/java/cd/casic/pipeline/dal/dataobject/CredentialRecord.java b/modules/ci-ticket/src/main/java/cd/casic/ci/ticket/dal/dataobject/CredentialRecord.java similarity index 95% rename from modules/pipeline-ci-ticket/src/main/java/cd/casic/pipeline/dal/dataobject/CredentialRecord.java rename to modules/ci-ticket/src/main/java/cd/casic/ci/ticket/dal/dataobject/CredentialRecord.java index abeb7dc..fa7aae2 100644 --- a/modules/pipeline-ci-ticket/src/main/java/cd/casic/pipeline/dal/dataobject/CredentialRecord.java +++ b/modules/ci-ticket/src/main/java/cd/casic/ci/ticket/dal/dataobject/CredentialRecord.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.dal.dataobject; +package cd.casic.ci.ticket.dal.dataobject; import cd.casic.framework.mybatis.core.dataobject.BaseDO; import com.baomidou.mybatisplus.annotation.TableName; diff --git a/modules/pipeline-ci-ticket/src/main/java/cd/casic/pipeline/dal/enums/CredentialType.java b/modules/ci-ticket/src/main/java/cd/casic/ci/ticket/dal/enums/CredentialType.java similarity index 98% rename from modules/pipeline-ci-ticket/src/main/java/cd/casic/pipeline/dal/enums/CredentialType.java rename to modules/ci-ticket/src/main/java/cd/casic/ci/ticket/dal/enums/CredentialType.java index 94410f0..3c04f19 100644 --- a/modules/pipeline-ci-ticket/src/main/java/cd/casic/pipeline/dal/enums/CredentialType.java +++ b/modules/ci-ticket/src/main/java/cd/casic/ci/ticket/dal/enums/CredentialType.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.dal.enums; +package cd.casic.ci.ticket.dal.enums; import java.util.HashMap; import java.util.Map; diff --git a/modules/pipeline-ci-ticket/src/main/java/cd/casic/pipeline/dal/pojo/Cert.java b/modules/ci-ticket/src/main/java/cd/casic/ci/ticket/dal/pojo/Cert.java similarity index 96% rename from modules/pipeline-ci-ticket/src/main/java/cd/casic/pipeline/dal/pojo/Cert.java rename to modules/ci-ticket/src/main/java/cd/casic/ci/ticket/dal/pojo/Cert.java index fa8c46e..ec0a923 100644 --- a/modules/pipeline-ci-ticket/src/main/java/cd/casic/pipeline/dal/pojo/Cert.java +++ b/modules/ci-ticket/src/main/java/cd/casic/ci/ticket/dal/pojo/Cert.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.dal.pojo; +package cd.casic.ci.ticket.dal.pojo; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotNull; diff --git a/modules/pipeline-ci-ticket/src/main/java/cd/casic/pipeline/dal/pojo/Credential.java b/modules/ci-ticket/src/main/java/cd/casic/ci/ticket/dal/pojo/Credential.java similarity index 94% rename from modules/pipeline-ci-ticket/src/main/java/cd/casic/pipeline/dal/pojo/Credential.java rename to modules/ci-ticket/src/main/java/cd/casic/ci/ticket/dal/pojo/Credential.java index b173fd7..2d48369 100644 --- a/modules/pipeline-ci-ticket/src/main/java/cd/casic/pipeline/dal/pojo/Credential.java +++ b/modules/ci-ticket/src/main/java/cd/casic/ci/ticket/dal/pojo/Credential.java @@ -1,6 +1,6 @@ -package cd.casic.pipeline.dal.pojo; +package cd.casic.ci.ticket.dal.pojo; -import cd.casic.pipeline.dal.enums.CredentialType; +import cd.casic.ci.ticket.dal.enums.CredentialType; import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Builder; diff --git a/modules/pipeline-ci-ticket/src/main/java/cd/casic/pipeline/dal/pojo/CredentialCreate.java b/modules/ci-ticket/src/main/java/cd/casic/ci/ticket/dal/pojo/CredentialCreate.java similarity index 92% rename from modules/pipeline-ci-ticket/src/main/java/cd/casic/pipeline/dal/pojo/CredentialCreate.java rename to modules/ci-ticket/src/main/java/cd/casic/ci/ticket/dal/pojo/CredentialCreate.java index 73fb54c..b93cad3 100644 --- a/modules/pipeline-ci-ticket/src/main/java/cd/casic/pipeline/dal/pojo/CredentialCreate.java +++ b/modules/ci-ticket/src/main/java/cd/casic/ci/ticket/dal/pojo/CredentialCreate.java @@ -1,6 +1,6 @@ -package cd.casic.pipeline.dal.pojo; +package cd.casic.ci.ticket.dal.pojo; -import cd.casic.pipeline.dal.enums.CredentialType; +import cd.casic.ci.ticket.dal.enums.CredentialType; import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Data; diff --git a/modules/pipeline-ci-ticket/src/main/java/cd/casic/pipeline/dal/pojo/CredentialInfo.java b/modules/ci-ticket/src/main/java/cd/casic/ci/ticket/dal/pojo/CredentialInfo.java similarity index 93% rename from modules/pipeline-ci-ticket/src/main/java/cd/casic/pipeline/dal/pojo/CredentialInfo.java rename to modules/ci-ticket/src/main/java/cd/casic/ci/ticket/dal/pojo/CredentialInfo.java index fb61c24..2a5ea86 100644 --- a/modules/pipeline-ci-ticket/src/main/java/cd/casic/pipeline/dal/pojo/CredentialInfo.java +++ b/modules/ci-ticket/src/main/java/cd/casic/ci/ticket/dal/pojo/CredentialInfo.java @@ -1,6 +1,6 @@ -package cd.casic.pipeline.dal.pojo; +package cd.casic.ci.ticket.dal.pojo; -import cd.casic.pipeline.dal.enums.CredentialType; +import cd.casic.ci.ticket.dal.enums.CredentialType; import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Data; diff --git a/modules/pipeline-ci-ticket/src/main/java/cd/casic/pipeline/dal/pojo/CredentialPermissions.java b/modules/ci-ticket/src/main/java/cd/casic/ci/ticket/dal/pojo/CredentialPermissions.java similarity index 95% rename from modules/pipeline-ci-ticket/src/main/java/cd/casic/pipeline/dal/pojo/CredentialPermissions.java rename to modules/ci-ticket/src/main/java/cd/casic/ci/ticket/dal/pojo/CredentialPermissions.java index 3c3cc09..8bf9eb8 100644 --- a/modules/pipeline-ci-ticket/src/main/java/cd/casic/pipeline/dal/pojo/CredentialPermissions.java +++ b/modules/ci-ticket/src/main/java/cd/casic/ci/ticket/dal/pojo/CredentialPermissions.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.dal.pojo; +package cd.casic.ci.ticket.dal.pojo; import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; diff --git a/modules/ci-ticket/src/main/java/cd/casic/ci/ticket/dal/pojo/CredentialSettingUpdate.java b/modules/ci-ticket/src/main/java/cd/casic/ci/ticket/dal/pojo/CredentialSettingUpdate.java new file mode 100644 index 0000000..8bfb2c0 --- /dev/null +++ b/modules/ci-ticket/src/main/java/cd/casic/ci/ticket/dal/pojo/CredentialSettingUpdate.java @@ -0,0 +1,25 @@ +package cd.casic.ci.ticket.dal.pojo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @Author:mianbin + * @Package:cd.casic.pipeline.dal.pojo + * @Project:ops-pro + * @name:CredentialSettingUpdate + * @Date:2025/03/24 9:33 + * @Filename:CredentialSettingUpdate + * @description:Todo + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +public class CredentialSettingUpdate { + + @Schema(description = "凭据是否允许跨项目访问", required = true) + private boolean allowAcrossProject; + +} diff --git a/modules/pipeline-ci-ticket/src/main/java/cd/casic/pipeline/dal/pojo/CredentialUpdate.java b/modules/ci-ticket/src/main/java/cd/casic/ci/ticket/dal/pojo/CredentialUpdate.java similarity index 92% rename from modules/pipeline-ci-ticket/src/main/java/cd/casic/pipeline/dal/pojo/CredentialUpdate.java rename to modules/ci-ticket/src/main/java/cd/casic/ci/ticket/dal/pojo/CredentialUpdate.java index 43ec12d..2213223 100644 --- a/modules/pipeline-ci-ticket/src/main/java/cd/casic/pipeline/dal/pojo/CredentialUpdate.java +++ b/modules/ci-ticket/src/main/java/cd/casic/ci/ticket/dal/pojo/CredentialUpdate.java @@ -1,6 +1,6 @@ -package cd.casic.pipeline.dal.pojo; +package cd.casic.ci.ticket.dal.pojo; -import cd.casic.pipeline.dal.enums.CredentialType; +import cd.casic.ci.ticket.dal.enums.CredentialType; import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Data; diff --git a/modules/pipeline-ci-ticket/src/main/java/cd/casic/pipeline/dal/pojo/CredentialWithPermission.java b/modules/ci-ticket/src/main/java/cd/casic/ci/ticket/dal/pojo/CredentialWithPermission.java similarity index 95% rename from modules/pipeline-ci-ticket/src/main/java/cd/casic/pipeline/dal/pojo/CredentialWithPermission.java rename to modules/ci-ticket/src/main/java/cd/casic/ci/ticket/dal/pojo/CredentialWithPermission.java index 3a275c4..34f6d48 100644 --- a/modules/pipeline-ci-ticket/src/main/java/cd/casic/pipeline/dal/pojo/CredentialWithPermission.java +++ b/modules/ci-ticket/src/main/java/cd/casic/ci/ticket/dal/pojo/CredentialWithPermission.java @@ -1,6 +1,6 @@ -package cd.casic.pipeline.dal.pojo; +package cd.casic.ci.ticket.dal.pojo; -import cd.casic.pipeline.dal.enums.CredentialType; +import cd.casic.ci.ticket.dal.enums.CredentialType; import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Data; diff --git a/modules/pipeline-ci-ticket/src/main/java/cd/casic/pipeline/service/CredentialHelper.java b/modules/ci-ticket/src/main/java/cd/casic/ci/ticket/service/CredentialHelper.java similarity index 97% rename from modules/pipeline-ci-ticket/src/main/java/cd/casic/pipeline/service/CredentialHelper.java rename to modules/ci-ticket/src/main/java/cd/casic/ci/ticket/service/CredentialHelper.java index 41739ba..a5a5f5a 100644 --- a/modules/pipeline-ci-ticket/src/main/java/cd/casic/pipeline/service/CredentialHelper.java +++ b/modules/ci-ticket/src/main/java/cd/casic/ci/ticket/service/CredentialHelper.java @@ -1,4 +1,4 @@ -package cd.casic.pipeline.service; +package cd.casic.ci.ticket.service; import cd.casic.framework.commons.util.encrypt.AESUtil; diff --git a/modules/pipeline-ci-ticket/src/main/java/cd/casic/pipeline/service/CredentialService.java b/modules/ci-ticket/src/main/java/cd/casic/ci/ticket/service/CredentialService.java similarity index 59% rename from modules/pipeline-ci-ticket/src/main/java/cd/casic/pipeline/service/CredentialService.java rename to modules/ci-ticket/src/main/java/cd/casic/ci/ticket/service/CredentialService.java index 100c121..41cb201 100644 --- a/modules/pipeline-ci-ticket/src/main/java/cd/casic/pipeline/service/CredentialService.java +++ b/modules/ci-ticket/src/main/java/cd/casic/ci/ticket/service/CredentialService.java @@ -1,8 +1,8 @@ -package cd.casic.pipeline.service; +package cd.casic.ci.ticket.service; -import cd.casic.pipeline.dal.pojo.Credential; -import cd.casic.pipeline.dal.pojo.CredentialInfo; +import cd.casic.ci.ticket.dal.pojo.Credential; +import cd.casic.ci.ticket.dal.pojo.CredentialInfo; public interface CredentialService { diff --git a/modules/pipeline-ci-ticket/src/main/java/cd/casic/pipeline/service/CredentialServiceImpl.java b/modules/ci-ticket/src/main/java/cd/casic/ci/ticket/service/CredentialServiceImpl.java similarity index 92% rename from modules/pipeline-ci-ticket/src/main/java/cd/casic/pipeline/service/CredentialServiceImpl.java rename to modules/ci-ticket/src/main/java/cd/casic/ci/ticket/service/CredentialServiceImpl.java index e808424..a9a70fe 100644 --- a/modules/pipeline-ci-ticket/src/main/java/cd/casic/pipeline/service/CredentialServiceImpl.java +++ b/modules/ci-ticket/src/main/java/cd/casic/ci/ticket/service/CredentialServiceImpl.java @@ -1,14 +1,14 @@ -package cd.casic.pipeline.service; +package cd.casic.ci.ticket.service; import cd.casic.framework.commons.exception.ServiceException; import cd.casic.framework.commons.util.encrypt.DHKeyPair; import cd.casic.framework.commons.util.encrypt.DHUtil; -import cd.casic.pipeline.dal.dao.CredentialRecordMapper; -import cd.casic.pipeline.dal.dataobject.CredentialRecord; -import cd.casic.pipeline.dal.pojo.Credential; -import cd.casic.pipeline.dal.pojo.CredentialInfo; -import cd.casic.pipeline.dal.enums.CredentialType; +import cd.casic.ci.ticket.dal.dao.CredentialRecordMapper; +import cd.casic.ci.ticket.dal.dataobject.CredentialRecord; +import cd.casic.ci.ticket.dal.pojo.Credential; +import cd.casic.ci.ticket.dal.pojo.CredentialInfo; +import cd.casic.ci.ticket.dal.enums.CredentialType; import jakarta.annotation.Resource; import org.springframework.stereotype.Service; diff --git a/modules/pipeline-ci-event/src/main/java/cd/casic/pipeline/Main.java b/modules/pipeline-ci-event/src/main/java/cd/casic/pipeline/Main.java deleted file mode 100644 index f17bd0b..0000000 --- a/modules/pipeline-ci-event/src/main/java/cd/casic/pipeline/Main.java +++ /dev/null @@ -1,13 +0,0 @@ -package cd.casic.pipeline; - -/** - * @author by mianbin - * @Classname ${NAME} - * @Description TODO - * @Date 2025/3/20 10:34 - */ -public class Main { - public static void main(String[] args) { - System.out.println("Hello world!"); - } -} \ No newline at end of file diff --git a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/config/BuildLogPrinter.java b/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/config/BuildLogPrinter.java deleted file mode 100644 index 93d47ef..0000000 --- a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/config/BuildLogPrinter.java +++ /dev/null @@ -1,22 +0,0 @@ -package cd.casic.pipeline.config; - -import lombok.extern.slf4j.Slf4j; -import org.springframework.context.annotation.Configuration; - -/** - * @author by mianbin - * @Classname BuildLogPrinter - * @Description 输出构建日志 - * @Date 2025/3/19 14:40 - */ -@Slf4j -@Configuration -public class BuildLogPrinter { - private static String LOG_DEBUG_FLAG = "##[debug]"; - - private static String LOG_ERROR_FLAG = "##[error]"; - - private static String LOG_WARN_FLAG = "##[warning]"; - - -} diff --git a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/dal/pojo/message/LogMessageWithLineNo.java b/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/dal/pojo/message/LogMessageWithLineNo.java deleted file mode 100644 index eb4dc5d..0000000 --- a/modules/pipeline-ci-log/src/main/java/cd/casic/pipeline/dal/pojo/message/LogMessageWithLineNo.java +++ /dev/null @@ -1,25 +0,0 @@ -package cd.casic.pipeline.dal.pojo.message; - -import cd.casic.pipeline.enums.LogType; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.AllArgsConstructor; -import lombok.Data; - -/** - * @author by mianbin - * @Classname LogMessageWithLineNo - * @Date 2025/3/19 17:14 - */ -@Data -@Schema(title = "带行号的日志消息") -@AllArgsConstructor -public class LogMessageWithLineNo { - private String tag; - private String jobId = ""; - private String subTag = null; - private String message; - private long timestamp = 0; - private LogType logType = LogType.LOG; - private long lineNo = 0; - private int executeCount = 1; -} diff --git a/modules/pipeline-ci-process/src/main/java/cd/casic/pipeline/process/dal/package-info.java b/modules/pipeline-ci-process/src/main/java/cd/casic/pipeline/process/dal/package-info.java deleted file mode 100644 index 8a3cddb..0000000 --- a/modules/pipeline-ci-process/src/main/java/cd/casic/pipeline/process/dal/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -/** - * @Classname package-info - * @Description TODO - * @Date 2025/3/21 18:58 - * @author by mianbin - */ -package cd.casic.pipeline.process.dal; \ No newline at end of file diff --git a/modules/pipeline-ci-process/src/main/java/cd/casic/pipeline/process/utils/AESUtil.java b/modules/pipeline-ci-process/src/main/java/cd/casic/pipeline/process/utils/AESUtil.java deleted file mode 100644 index 7ca26e5..0000000 --- a/modules/pipeline-ci-process/src/main/java/cd/casic/pipeline/process/utils/AESUtil.java +++ /dev/null @@ -1,86 +0,0 @@ -package cd.casic.pipeline.process.utils; - -import org.bouncycastle.crypto.InvalidCipherTextException; -import org.bouncycastle.crypto.engines.AESEngine; -import org.bouncycastle.crypto.modes.CBCBlockCipher; -import org.bouncycastle.crypto.paddings.PKCS7Padding; -import org.bouncycastle.crypto.paddings.PaddedBufferedBlockCipher; -import org.bouncycastle.crypto.params.KeyParameter; -import org.bouncycastle.jce.provider.BouncyCastleProvider; - -import javax.crypto.KeyGenerator; -import javax.crypto.SecretKey; -import java.nio.charset.StandardCharsets; -import java.security.SecureRandom; -import java.security.Security; -import java.util.Arrays; -import java.util.Base64; - - -public class AESUtil { - - private static final String AES = "AES"; - private static final Integer SEED = 256; - - static { - Security.addProvider(new BouncyCastleProvider()); - } - - public static String decrypt(String key, String content) { - byte[] bytes = Base64.getDecoder().decode(content); - KeyParameter keyParameter = generateKeyParameter(key); - byte[] output = processData(false, keyParameter, bytes); - return Base64.getEncoder().encodeToString(output); - } - - public static byte[] decrypt(String key, byte[] content) { - KeyParameter keyParameter = generateKeyParameter(key); - return processData(false, keyParameter, content); - } - - public static String encrypt(String key, String content) { - byte[] bytes = content.getBytes(StandardCharsets.UTF_8); - KeyParameter keyParameter = generateKeyParameter(key); - byte[] output = processData(true, keyParameter, bytes); - return Base64.getEncoder().encodeToString(output); - } - - public static byte[] encrypt(String key, byte[] content) { - KeyParameter keyParameter = generateKeyParameter(key); - return processData(true, keyParameter, content); - } - - private static byte[] processData(boolean encrypt, KeyParameter keyParameter, byte[] bytes) { - PKCS7Padding blockCipherPadding = new PKCS7Padding(); - CBCBlockCipher blockCipher = new CBCBlockCipher(new AESEngine()); - PaddedBufferedBlockCipher paddedBufferedBlockCipher = new PaddedBufferedBlockCipher(blockCipher, blockCipherPadding); - paddedBufferedBlockCipher.init(encrypt, keyParameter); - - byte[] output = new byte[paddedBufferedBlockCipher.getOutputSize(bytes.length)]; - int offset = paddedBufferedBlockCipher.processBytes(bytes, 0, bytes.length, output, 0); - int outputLength = 0; - try { - outputLength = paddedBufferedBlockCipher.doFinal(output, offset); - } catch (InvalidCipherTextException e) { - e.printStackTrace(); - } - return Arrays.copyOf(output, offset + outputLength); - } - - private static KeyParameter generateKeyParameter(String key) { - KeyGenerator keyGenerator = null; - SecureRandom secureRandom = null; - try { - keyGenerator = KeyGenerator.getInstance(AES); - secureRandom = SecureRandom.getInstance("SHA1PRNG"); - secureRandom.setSeed(key.getBytes(StandardCharsets.UTF_8)); - } catch (Exception e) { - e.printStackTrace(); - } - - keyGenerator.init(SEED, secureRandom); - SecretKey secretKey = keyGenerator.generateKey(); - byte[] encoded = secretKey.getEncoded(); - return new KeyParameter(encoded); - } -} diff --git a/modules/pipeline-ci-process/src/main/java/cd/casic/pipeline/process/utils/CommonUtils.java b/modules/pipeline-ci-process/src/main/java/cd/casic/pipeline/process/utils/CommonUtils.java deleted file mode 100644 index d9f6aeb..0000000 --- a/modules/pipeline-ci-process/src/main/java/cd/casic/pipeline/process/utils/CommonUtils.java +++ /dev/null @@ -1,16 +0,0 @@ -package cd.casic.pipeline.process.utils; - - -public class CommonUtils { - - /** - * 获取字符串的头部指定长度 - */ - public static String interceptStringInLength(String string, Integer length) { - if (string != null && string.length() > length) { - return string.substring(0, length - 1); - } else { - return string; - } - } -} diff --git a/modules/pipeline-ci-process/src/main/java/cd/casic/pipeline/process/utils/LogUtils.java b/modules/pipeline-ci-process/src/main/java/cd/casic/pipeline/process/utils/LogUtils.java deleted file mode 100644 index 67d5a0b..0000000 --- a/modules/pipeline-ci-process/src/main/java/cd/casic/pipeline/process/utils/LogUtils.java +++ /dev/null @@ -1,42 +0,0 @@ -package cd.casic.pipeline.process.utils; - - -import cd.casic.framework.commons.util.watcher.Watcher; -import lombok.extern.slf4j.Slf4j; - -@Slf4j -public class LogUtils { - - /** - * 计算[watcher].createTime与当前时间的毫秒数的耗时在[warnThreshold]与[errorThreshold]之间, - * 会将[watcher]序列化为字符串并打印到WARN日志,当超出[errorThreshold]会打印ERROR日志。否则什么都不会打印 - */ - public static void printCostTimeWE(Watcher watcher, Long warnThreshold, Long errorThreshold){ - watcher.stop(); - long cost = System.currentTimeMillis() - watcher.getCreateTime(); - if (cost >= warnThreshold){ - if (cost > errorThreshold){ - log.error(watcher + " cost " + cost + " ms"); - } else { - log.warn(watcher + " cost " + cost + " ms"); - } - } - } - - public static void costTime(String message, Long startTime, Long warnThreshold, Long errorThreshold){ - long cost = System.currentTimeMillis() - startTime; - if (cost < warnThreshold) { - log.info(message + " cost " + cost + " ms"); - } - else if (cost >= warnThreshold && cost < errorThreshold) { - log.warn(message + " cost " + cost + " ms"); - } - else { - log.error(message + " cost " + cost + " ms"); - } - } - - public static void printCostTimeWE(Watcher watcher) { - printCostTimeWE(watcher, 1000L, 5000L); - } -} diff --git a/modules/pipeline-ci-process/src/main/java/cd/casic/pipeline/process/utils/RetryUtils.java b/modules/pipeline-ci-process/src/main/java/cd/casic/pipeline/process/utils/RetryUtils.java deleted file mode 100644 index a4f66c3..0000000 --- a/modules/pipeline-ci-process/src/main/java/cd/casic/pipeline/process/utils/RetryUtils.java +++ /dev/null @@ -1,30 +0,0 @@ -package cd.casic.pipeline.process.utils; - -import lombok.SneakyThrows; -import lombok.extern.slf4j.Slf4j; - -@Slf4j -public class RetryUtils { - - @SneakyThrows - public static T execute(Action action, Integer retryTime, Long retryPeriodMills) { - try { - return action.execute(); - } catch (Throwable ignored) { - if (retryTime - 1 <= 0) { - return action.fail(ignored); - } - Thread.sleep(retryPeriodMills); - return execute(action, retryTime - 1, 500L); - } - } - - public interface Action { - - T execute(); - - default T fail(Throwable e) throws Throwable { - throw e; - } - } -} diff --git a/modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/service/ProjectPermissionService.java b/modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/service/ProjectPermissionService.java deleted file mode 100644 index f105831..0000000 --- a/modules/pipeline-ci-project/src/main/java/cd/casic/pipeline/project/service/ProjectPermissionService.java +++ /dev/null @@ -1,8 +0,0 @@ -package cd.casic.pipeline.project.service; - -import cd.casic.pipeline.project.dal.pojo.AuthProjectCreateInfo; -import cd.casic.pipeline.project.dal.pojo.ResourceRegisterInfo; - -public interface ProjectPermissionService { - String createResources(ResourceRegisterInfo resourceRegisterInfo, AuthProjectCreateInfo authProjectCreateInfo); -} diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/Main.java b/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/Main.java deleted file mode 100644 index 19d4be1..0000000 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/Main.java +++ /dev/null @@ -1,13 +0,0 @@ -package cd.casic.pipeline; - -/** - * @author by mianbin - * @Classname ${NAME} - * @Description TODO - * @Date 2025/3/20 20:10 - */ -public class Main { - public static void main(String[] args) { - System.out.println("Hello world!"); - } -} \ No newline at end of file diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/code/CodeRepositoryService.java b/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/code/CodeRepositoryService.java deleted file mode 100644 index a4fb06e..0000000 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/code/CodeRepositoryService.java +++ /dev/null @@ -1,10 +0,0 @@ -package cd.casic.pipeline.scm.service.code; - - -import cd.casic.pipeline.scm.dal.dto.RepositoryRecord; -import cd.casic.pipeline.scm.dal.pojo.Repository; - -public interface CodeRepositoryService { - - Repository compose(RepositoryRecord repository); -} diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/github/GithubTokenService.java b/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/github/GithubTokenService.java deleted file mode 100644 index 8cbf727..0000000 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/github/GithubTokenService.java +++ /dev/null @@ -1,10 +0,0 @@ -package cd.casic.pipeline.scm.service.github; - - -import cd.casic.pipeline.scm.dal.pojo.github.GithubToken; -import cd.casic.pipeline.scm.enums.GitHubTokenType; - -public interface GithubTokenService { - - GithubToken getAccessToken(String userId, GitHubTokenType tokenType); -} diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/tgit/ITGitService.java b/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/tgit/ITGitService.java deleted file mode 100644 index 11d6ea5..0000000 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/tgit/ITGitService.java +++ /dev/null @@ -1,13 +0,0 @@ -package cd.casic.pipeline.scm.service.tgit; - - -import cd.casic.pipeline.scm.dal.pojo.git.GitUserInfo; -import cd.casic.pipeline.scm.dal.pojo.oauth.GitToken; -import cd.casic.pipeline.scm.enums.TokenTypeEnum; - -public interface ITGitService { - - GitToken refreshToken(String userId, GitToken accessToken); - - GitUserInfo getUserInfoByToken(String token, TokenTypeEnum tokenType); -} diff --git a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/tgit/TGitOauthService.java b/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/tgit/TGitOauthService.java deleted file mode 100644 index 6328bce..0000000 --- a/modules/pipeline-ci-scm-repository/src/main/java/cd/casic/pipeline/scm/service/tgit/TGitOauthService.java +++ /dev/null @@ -1,9 +0,0 @@ -package cd.casic.pipeline.scm.service.tgit; - - -import cd.casic.pipeline.scm.dal.pojo.oauth.GitToken; - -public interface TGitOauthService { - - GitToken getAccessToken(String userId); -} diff --git a/modules/pipeline-ci-ticket/src/main/java/cd/casic/pipeline/api/ServiceCredentialApi.java b/modules/pipeline-ci-ticket/src/main/java/cd/casic/pipeline/api/ServiceCredentialApi.java deleted file mode 100644 index ef0945f..0000000 --- a/modules/pipeline-ci-ticket/src/main/java/cd/casic/pipeline/api/ServiceCredentialApi.java +++ /dev/null @@ -1,32 +0,0 @@ -package cd.casic.pipeline.api; - - -import cd.casic.framework.commons.pojo.CommonResult; -import cd.casic.pipeline.dal.pojo.CredentialInfo; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.Parameter; -import io.swagger.v3.oas.annotations.Parameters; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.springframework.web.bind.annotation.*; - - -@RestController -@Tag(name = "服务-凭据资源") -@RequestMapping("/service/credentials") -public interface ServiceCredentialApi { - - @Operation(summary = "其他服务获取凭据") - @GetMapping("/{projectId}/{credentialId}") - @Parameters({ - @Parameter(name = "projectId", description = "项目ID", required = true), - @Parameter(name = "credentialId", description = "凭据ID", required = true), - @Parameter(name = "publicKey", description = "Base64编码的加密公钥", required = true) - }) - CommonResult get( - @PathVariable - String projectId, - @PathVariable - String credentialId, - @RequestParam - String publicKey); -} diff --git a/modules/pipeline-ci-ticket/src/main/java/cd/casic/pipeline/api/impl/ServiceCredentialApiImpl.java b/modules/pipeline-ci-ticket/src/main/java/cd/casic/pipeline/api/impl/ServiceCredentialApiImpl.java deleted file mode 100644 index 1e8d3a0..0000000 --- a/modules/pipeline-ci-ticket/src/main/java/cd/casic/pipeline/api/impl/ServiceCredentialApiImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -package cd.casic.pipeline.api.impl; - - -import cd.casic.framework.commons.exception.ServiceException; -import cd.casic.framework.commons.pojo.CommonResult; -import cd.casic.pipeline.api.ServiceCredentialApi; -import cd.casic.pipeline.dal.pojo.CredentialInfo; -import cd.casic.pipeline.service.CredentialService; -import jakarta.annotation.Resource; -import org.apache.commons.lang3.StringUtils; -import org.springframework.web.bind.annotation.RestController; - - -@RestController -public class ServiceCredentialApiImpl implements ServiceCredentialApi { - - @Resource - private CredentialService credentialService; - - @Override - public CommonResult get(String projectId, String credentialId, String publicKey) { - if (StringUtils.isBlank(projectId)) { - throw new ServiceException(-1000, "Invalid projectId"); - } - if (StringUtils.isBlank(credentialId)) { - throw new ServiceException(-1000, "Invalid credentialId"); - } - return CommonResult.success(credentialService.serviceGet(projectId, credentialId, publicKey)); - } -} diff --git a/modules/pom.xml b/modules/pom.xml index ae32019..39c06da 100644 --- a/modules/pom.xml +++ b/modules/pom.xml @@ -14,6 +14,15 @@ module-infra-biz module-system-api module-system-biz + ci-commons + ci-event + ci-log + ci-market + ci-process + ci-quality + ci-project + ci-scm-repository + ci-ticket modules diff --git a/pom.xml b/pom.xml index ef54a00..133c2eb 100644 --- a/pom.xml +++ b/pom.xml @@ -17,15 +17,15 @@ system-framework app-plugins ops-server - modules/pipeline-ci-commons - modules/pipeline-ci-log - modules/pipeline-ci-event - modules/pipeline-ci-ticket - modules/pipeline-ci-quality - modules/pipeline-ci-scm-repository - modules/pipeline-ci-project - modules/pipeline-ci-process - modules/pipeline-ci-market + modules/ci-commons + modules/ci-log + modules/ci-event + modules/ci-ticket + modules/ci-quality + modules/ci-scm-repository + modules/ci-project + modules/ci-process + modules/ci-market