|
|
@@ -1,57 +0,0 @@
|
|
|
-package cn.reghao.autodop.dmaster.app.service;
|
|
|
-
|
|
|
-import cn.reghao.autodop.common.utils.serializer.JsonConverter;
|
|
|
-import cn.reghao.autodop.dmaster.app.entity.config.build.BuildDir;
|
|
|
-import cn.reghao.autodop.dmaster.app.entity.config.build.CompilerConfig;
|
|
|
-import cn.reghao.autodop.dmaster.app.entity.config.build.PackerConfig;
|
|
|
-import cn.reghao.autodop.dmaster.app.entity.config.build.RepoAuthConfig;
|
|
|
-import cn.reghao.autodop.dmaster.app.repository.config.AppOrchestrationRepository;
|
|
|
-import cn.reghao.autodop.dmaster.app.repository.config.ProjOrchestrationRepository;
|
|
|
-import cn.reghao.autodop.dmaster.app.repository.config.build.BuildDirRepository;
|
|
|
-import cn.reghao.autodop.dmaster.app.repository.config.build.CompilerConfigRepository;
|
|
|
-import cn.reghao.autodop.dmaster.app.repository.config.build.PackerConfigRepository;
|
|
|
-import cn.reghao.autodop.dmaster.app.repository.config.build.RepoAuthConfigRepository;
|
|
|
-import cn.reghao.autodop.dmaster.app.vo.BuildConfig;
|
|
|
-import org.springframework.stereotype.Service;
|
|
|
-
|
|
|
-import java.util.List;
|
|
|
-
|
|
|
-/**
|
|
|
- * @author reghao
|
|
|
- * @date 2021-06-04 10:01:41
|
|
|
- */
|
|
|
-@Service
|
|
|
-public class AppBakService {
|
|
|
- private BuildDirRepository buildDirRepository;
|
|
|
- private RepoAuthConfigRepository repoAuthRepository;
|
|
|
- private CompilerConfigRepository compilerRepository;
|
|
|
- private PackerConfigRepository packerRepository;
|
|
|
- private AppOrchestrationRepository appRepository;
|
|
|
- private ProjOrchestrationRepository projRepository;
|
|
|
-
|
|
|
- public AppBakService(BuildDirRepository buildDirRepository,
|
|
|
- RepoAuthConfigRepository repoAuthRepository,
|
|
|
- CompilerConfigRepository compilerRepository,
|
|
|
- PackerConfigRepository packerRepository,
|
|
|
- AppOrchestrationRepository appRepository,
|
|
|
- ProjOrchestrationRepository projRepository) {
|
|
|
- this.buildDirRepository = buildDirRepository;
|
|
|
- this.repoAuthRepository = repoAuthRepository;
|
|
|
- this.compilerRepository = compilerRepository;
|
|
|
- this.packerRepository = packerRepository;
|
|
|
- this.appRepository = appRepository;
|
|
|
- this.projRepository = projRepository;
|
|
|
- }
|
|
|
-
|
|
|
- public String bakBuildConfig() {
|
|
|
- List<BuildDir> buildDirs = buildDirRepository.findAll();
|
|
|
- List<RepoAuthConfig> repoAuths = repoAuthRepository.findAll();
|
|
|
- List<CompilerConfig> compilers = compilerRepository.findAll();
|
|
|
- List<PackerConfig> packers = packerRepository.findAll();
|
|
|
- BuildConfig buildConfig = new BuildConfig(buildDirs, repoAuths, compilers, packers);
|
|
|
- return JsonConverter.objectToJson(buildConfig);
|
|
|
- }
|
|
|
-
|
|
|
- public void bakAppConfig() {
|
|
|
- }
|
|
|
-}
|