Commit e198a5cb authored by zhouzihao's avatar zhouzihao

sql

parent a59d0a48
-- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- 主机: 10.100.9.45:3306
-- 生成日期: 2020-04-09 05:56:23
-- 服务器版本: 5.6.47
-- PHP 版本: 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- 数据库: `devlop`
--
-- --------------------------------------------------------
--
-- 表的结构 `build_log`
--
CREATE TABLE `build_log` (
`log_id` int(11) NOT NULL COMMENT '日志id',
`p_id` int(11) NOT NULL COMMENT '项目id',
`env_id` int(11) NOT NULL COMMENT '环境id',
`project_name` varchar(200) NOT NULL COMMENT '项目名称,冗余字段',
`branch` varchar(20) NOT NULL COMMENT '构建的分支名称',
`version` varchar(20) NOT NULL COMMENT '当前构建版本号',
`success` tinyint(4) NOT NULL COMMENT '是否执行成功 1成功 2失败 3执行中',
`image_name` varchar(500) NOT NULL COMMENT '生成镜像名称',
`fail_url` varchar(300) DEFAULT NULL COMMENT '错误详情url',
`create_time` datetime NOT NULL COMMENT '日志创建时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='构建日志';
-- --------------------------------------------------------
--
-- 表的结构 `env`
--
CREATE TABLE `env` (
`env_id` int(11) NOT NULL COMMENT '环境主键',
`name` varchar(50) NOT NULL COMMENT '环境名称',
`target_git_url` varchar(80) NOT NULL COMMENT '目标git地址',
`target_git_token` varchar(20) NOT NULL COMMENT '目标git的token',
`target_git_name` varchar(20) NOT NULL COMMENT '目标git用户名',
`registry_url` varchar(50) NOT NULL COMMENT '镜像仓库地址',
`registry_group` varchar(20) NOT NULL COMMENT '镜像仓库内分组',
`registry_username` varchar(20) DEFAULT NULL COMMENT '镜像仓库账号',
`registry_password` varchar(20) DEFAULT NULL COMMENT '镜像仓库密码'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='环境配置表';
--
-- 转存表中的数据 `env`
--
INSERT INTO `env` (`env_id`, `name`, `target_git_url`, `target_git_token`, `target_git_name`, `registry_url`, `registry_group`, `registry_username`, `registry_password`) VALUES
(7, 'test', '10.100.1.2', 'Wbny8Y4KfxVjVLtVvtzh', 'root', '10.100.9.22:2080', 'testlibrary', 'yzy', '123qweQWE@'),
(8, 'prod', '10.100.1.2', 'Wbny8Y4KfxVjVLtVvtzh', 'root', '10.100.9.22:2080', 'library', 'yzy', '123qweQWE@'),
(9, 'gateway2', '10.100.1.2', 'Wbny8Y4KfxVjVLtVvtzh', 'root', '10.100.9.22:2080', 'gateway2', 'yzy', '123qweQWE@');
-- --------------------------------------------------------
--
-- 表的结构 `meta_data`
--
CREATE TABLE `meta_data` (
`type_id` int(11) NOT NULL COMMENT '类型id',
`name` varchar(20) NOT NULL COMMENT '类型名称',
`docker_file` text COMMENT 'docker file',
`gitlab_ci` text COMMENT 'gitlab_ci.yml',
`docker_compose` text COMMENT 'docker_compose文件'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='项目类型源数据';
--
-- 转存表中的数据 `meta_data`
--
INSERT INTO `meta_data` (`type_id`, `name`, `docker_file`, `gitlab_ci`, `docker_compose`) VALUES
(1, 'Java', 'FROM 10.100.9.22:2080/public/openjdk8-jdk-alpine:latest\nARG RUNPRO\nVOLUME /tmp\nVOLUME /opt/logs\nWORKDIR /opt/\nCOPY {service}/target/{service-exec}.jar {service}.jar\nENTRYPOINT [\"java\",\"-jar\",\"{service}.jar\",\"--spring.profiles.active=${RUNPRO}\"]', 'stages:\n - buildjava\n - javacheck\n - builddocker\n - dockercheck\n - dockerdeploy\n - deploycheck\n - cus\n\nvariables:\n DOCKER_TLS_CERTDIR: \"\"\n IMAGE_HOST: \"${registry_url}\"\n{variables_str}\n\nbuildjava:\n image: maven:3.6.0-jdk-8-alpine\n stage: buildjava\n script:\n{build_str_java}\n cache:\n paths:\n{cache}\n tags:\n - share\n only:\n - /^v-([0-9]+).([0-9]+).([0-9]+)-([0-9])+/\n\njavacheck:\n image: curlimages/curl\n stage: javacheck\n script:\n{fail_str}\n when: on_failure\n tags:\n - share\n only:\n - /^v-([0-9]+).([0-9]+).([0-9]+)-([0-9])+/\n\ndockercheck:\n image: curlimages/curl\n stage: dockercheck\n script:\n{fail_str}\n when: on_failure\n tags:\n - share\n only:\n - /^v-([0-9]+).([0-9]+).([0-9]+)-([0-9])+/\n\nbuilddocker:\n stage: builddocker\n script:\n{docker_build_str}\n{docker_tag_str}\n{docker_push_str}\n cache:\n paths:\n{cache}\n tags:\n - share\n only:\n - /^v-([0-9]+).([0-9]+).([0-9]+)-([0-9])+/\n\ndockerdeploy:\n stage: dockerdeploy\n script:\n - echo \"deploy!\"\n{deploy_str}\n tags:\n - {tag}\n only:\n - /^v-([0-9]+).([0-9]+).([0-9]+)-([0-9])+/\n\ndeploycheck:\n image: curlimages/curl\n stage: deploycheck\n script:\n{fail_str}\n when: on_failure\n tags:\n - share\n only:\n - /^v-([0-9]+).([0-9]+).([0-9]+)-([0-9])+/\n\nsucback:\n stage: cus\n image: curlimages/curl\n script:\n{success_str}\n tags:\n - share\n only:\n - /^v-([0-9]+).([0-9]+).([0-9]+)-([0-9])+/', 'version: \'3\'\nservices:\n{services}\nnetworks:\n devnetest:\n external:\n name: chaos_net\n');
-- --------------------------------------------------------
--
-- 表的结构 `project`
--
CREATE TABLE `project` (
`p_id` int(11) NOT NULL COMMENT '项目id',
`source_git_url` varchar(200) NOT NULL COMMENT '项目git地址',
`name` varchar(80) NOT NULL COMMENT '项目名称',
`description` varchar(200) DEFAULT NULL COMMENT '项目描述',
`version` varchar(10) NOT NULL COMMENT '项目版本号',
`type` smallint(6) NOT NULL COMMENT '项目类型',
`meta_data` text NOT NULL COMMENT '原始数据'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='项目';
--
-- 转存表中的数据 `project`
--
INSERT INTO `project` (`p_id`, `source_git_url`, `name`, `description`, `version`, `type`, `meta_data`) VALUES
(2, 'http://10.100.11.5/appserver/appserver-api.git', 'appserver-api', '', '', 1, '{\n\"module_list\":[{\"name\":\"appserver-car\",\"exec-file\":\"appserver-car-*-execute\"},\"appserver-carDynamic\",\"appserver-open\",\"appserver-user\",\"gateway\"]\n}'),
(12, 'http://10.100.11.5/appserver/appmanage-api.git', 'appmanage-api', '', '', 1, '{\"module_list\":[\"server-sys\",\"server-main\",\"gateway\",\"server-dataquery\",\"server-sso\"]}'),
(13, 'http://10.100.11.5/appserver/basic-data-process.git', 'basic-data-process', NULL, '', 1, '{\"module_list\":[\"data-process\"]}'),
(14, 'http://10.100.11.5/appserver/push-server.git', 'push-server', NULL, '', 1, '{\"module_list\":[\"push-send\",\"push-task\",\"push-msg\",\"push-task-put\"]}'),
(15, 'http://10.100.11.5/base/web/bds-api.git', 'bds-api', NULL, '', 1, '{\"module_list\":[\"gateway\",\"server-sys\"]}'),
(16, 'http://10.100.11.5/appserver/activity-api.git', 'activity-api', NULL, '', 1, '{\"module_list\":[\"activity-applycard\",\"gateway\"]}'),
(17, 'http://10.100.11.5/appserver/msg-base-handle.git', 'msg-base-handle', NULL, '', 1, '{\"module_list\":[\"msg-handle\"]}'),
(18, 'http://10.100.11.5/base/web/bds.git', 'bds', NULL, '', 1, '{\"module_list\":[\"gateway\",\"sys\"]}'),
(19, 'http://10.100.11.5/sso/sso-api,git', 'sso-api', NULL, '', 1, '{\"module_list\":[\"sso-api\"]}'),
(20, 'http://10.100.11.5/vue-ui/data-query-plat-ui.git', 'data-query-plat-ui', NULL, '', 1, '{\"module_list\":[\"data-query-plat-ui\"]}'),
(21, 'http://10.100.11.5/appserver/appserver-api.git', 'appserver-api-1.0.1', 'appServer并行分支', '', 1, '{\"module_list\":[{\"name\":\"appserver-car\",\"exec-file\":\"appserver-car-*-execute\"},\"appserver-carDynamic\",\"appserver-open\",\"appserver-user\",\"gateway\"]}'),
(22, 'http://10.100.11.5/appserver/push-server.git ', 'push-server-v.1.0.1', NULL, '', 1, '{\"module_list\":[\"push-send\",\"push-task\",\"push-msg\",\"push-task-put\"]}'),
(23, 'http://10.100.11.5/appserver/appmanage-api.git', 'appmanage-api-v1.0.1', '', '', 1, '{\"module_list\":[\"server-sys\",\"server-main\",\"gateway\",\"server-dataquery\",\"server-sso\"]}'),
(24, 'http://10.100.11.5/server-api/crm-api.git', 'crm-api', NULL, '', 1, '{\"module_list\":[{\"name\":\"server-crmlease\",\"deploy\":{\"test\":\"crmapi_service-crm-api-server-crmlease\"}},{\"name\":\"server-crmmain\",\"deploy\":{\"test\":\"crmapi_service-crm-api-server-crmmain\"}},{\"name\":\"server-crmsys\",\"deploy\":{\"test\":\"crmapi_service-crm-api-server-crmsys\"}},{\"name\":\"gateway\",\"deploy\":{\"test\":\"crmapi_service-crm-api-gateway\"}}]}');
-- --------------------------------------------------------
--
-- 表的结构 `project_config`
--
CREATE TABLE `project_config` (
`config_id` int(11) NOT NULL COMMENT '配置id',
`env_id` int(11) NOT NULL COMMENT '环境id',
`p_id` int(11) NOT NULL COMMENT '项目id',
`path` varchar(400) NOT NULL COMMENT '配置文件地址(相对)',
`content` text NOT NULL COMMENT '配置值可能是json或者值',
`type` smallint(6) NOT NULL DEFAULT '1' COMMENT '配置类型(1 替换 2 覆盖)'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='配置表';
--
-- 转存表中的数据 `project_config`
--
INSERT INTO `project_config` (`config_id`, `env_id`, `p_id`, `path`, `content`, `type`) VALUES
(4, 7, 13, 'data-process\\/src\\/main\\/resources\\/application-test.yml', '{\"bootstrap-servers: 10.100.12.62:9092,10.100.12.63:9092,10.100.12.64:9092\":\"bootstrap-servers: 10.100.12.45:9092,10.100.12.46:9092,10.100.12.47:9092\"}', 1),
(5, 9, 13, 'data-process\\/src\\/main\\/resources\\/application-pro.yml', '{\"username: root\":\"username: appserver_vandyo_oper\",\"password: root\":\"password: gIH7dNhVvktiSLej\"}', 1),
(6, 9, 2, 'appserver-car/src/main/resources/application-pro.yml', '{\"username: root\":\"username: appserver_vandyo_oper\",\"password: root\":\"password: gIH7dNhVvktiSLej\"}', 1),
(7, 9, 2, 'appserver-carDynamic/src/main/resources/application-pro.yml', '{\"username: root\":\"username: appserver_vandyo_oper\",\"password: root\":\"password: gIH7dNhVvktiSLej\"}', 1),
(8, 9, 2, 'appserver-open/src/main/resources/application-pro.yml', '{\"username: root\":\"username: appserver_vandyo_oper\",\"password: root\":\"password: gIH7dNhVvktiSLej\"}', 1),
(9, 9, 2, 'appserver-user/src/main/resources/application-pro.yml', '{\"username: root\":\"username: appserver_vandyo_oper\",\"password: root\":\"password: gIH7dNhVvktiSLej\"}', 1),
(10, 9, 14, 'push-msg\\/src\\/main\\/resources\\/application-pro.yml', '{\"username: root\":\"username: appsmsg_vandyo_oper\",\"password: root\":\"password: unot2F4MUmS8FLdh\"}', 1),
(11, 9, 14, 'push-task\\/src\\/main\\/resources\\/application-pro.yml', '{\"username: root\":\"username: appserver_vandyo_oper\",\"password: root\":\"password: gIH7dNhVvktiSLej\"}', 1),
(12, 9, 14, 'push-task-put\\/src\\/main\\/resources\\/application-pro.yml', '{\"username: root\":\"username: appserver_vandyo_oper\",\"password: root\":\"password: gIH7dNhVvktiSLej\"}', 1),
(13, 9, 15, 'server-sys/src/main/resources/application-pro.yml', '{\"username: root\":\"username: bds_vandyo_oper\",\"password: root\":\"password: XBdjc0rFg\"}', 1),
(14, 8, 16, 'activity-applycard\\/src\\/main\\/resources\\/application-pro.yml', '{\"username: root\":\"username: activity_oper\",\"password: root\":\"password: jdEciiYB5l24eY5n\"}', 1),
(15, 8, 12, 'server-main\\/src\\/main\\/resources\\/application-pro.yml', '{\"username: root\":\"username: appserver_vandyo_oper\",\"password: root\":\"password: gIH7dNhVvktiSLej\"}', 1),
(16, 8, 12, 'server-sys\\/src\\/main\\/resources\\/application-pro.yml', '{\"username: root\":\"username: boss_vandyo_oper\",\"password: root\":\"password: ouaY0p8xOuUizpXE\"}', 1),
(17, 8, 12, 'server-dataquery\\/src\\/main\\/resources\\/application-pro.yml', '{\"username: root\":\"username: appserver_vandyo_oper\",\"password: root\":\"password: gIH7dNhVvktiSLej\"}', 1),
(18, 8, 12, 'supply-chain\\/src\\/main\\/resources\\/application-pro.yml', '{\"username: root\":\"username: appserver_vandyo_oper\",\"password: root\":\"password: gIH7dNhVvktiSLej\"}', 1),
(19, 8, 12, 'server-sso\\/src\\/main\\/resources\\/application-pro.yml', '{\"username: root\":\"username: boss_vandyo_oper\",\"password: root\":\"password: ouaY0p8xOuUizpXE\"}', 1),
(20, 8, 12, 'server-sys\\/src\\/main\\/resources\\/application-pro.yml', '{\"username: 123456\":\"username: appserver_vandyo_oper\",\"password: 123456\":\"password: gIH7dNhVvktiSLej\"}', 1),
(21, 8, 2, 'appserver-car\\/src\\/main\\/resources\\/application-pro.yml', '{\"username: root\":\"username: appserver_vandyo_oper\",\"password: root\":\"password: gIH7dNhVvktiSLej\"}', 1),
(22, 8, 2, 'appserver-carDynamic\\/src\\/main\\/resources\\/application-pro.yml', '{\"username: root\":\"username: appserver_vandyo_oper\",\"password: root\":\"password: gIH7dNhVvktiSLej\"}', 1),
(23, 8, 2, 'appserver-user\\/src\\/main\\/resources\\/application-pro.yml', '{\"username: root\":\"username: appserver_vandyo_oper\",\"password: root\":\"password: gIH7dNhVvktiSLej\"}', 1),
(24, 8, 2, 'appserver-open\\/src\\/main\\/resources\\/application-pro.yml', '{\"username: root\":\"username: appserver_vandyo_oper\",\"password: root\":\"password: gIH7dNhVvktiSLej\",\"context-path: /car\":\"context-path: /open\"}', 1),
(25, 8, 17, 'msg-handle\\/src\\/main\\/resources\\/application-pro.yml', '{\"username: root\":\"username: appserver_vandyo_oper\",\"password: root\":\"password: gIH7dNhVvktiSLej\"}', 1),
(26, 8, 14, 'push-msg/src/main/resources/application-pro.yml', '{\"username: root\":\"username: appsmsg_vandyo_oper\",\"password: root\":\"password: unot2F4MUmS8FLdh\"}', 1),
(27, 8, 14, 'push-task/src/main/resources/application-pro.yml', '{\"username: root\":\"username: appserver_vandyo_oper\",\"password: root\":\"password: gIH7dNhVvktiSLej\"}', 1),
(28, 8, 14, 'push-task-put/src/main/resources/application-pro.yml ', '{\"username: root\":\"username: appserver_vandyo_oper\",\"password: root\":\"password: gIH7dNhVvktiSLej\"}', 1),
(29, 8, 19, 'sso-api\\/src\\/main\\/resources\\/application-pro.yml', '{\"username: root\":\"username: boss_vandyo_oper\",\"password: root\":\"password: ouaY0p8xOuUizpXE\"}', 1);
--
-- 转储表的索引
--
--
-- 表的索引 `build_log`
--
ALTER TABLE `build_log`
ADD PRIMARY KEY (`log_id`);
--
-- 表的索引 `env`
--
ALTER TABLE `env`
ADD PRIMARY KEY (`env_id`);
--
-- 表的索引 `meta_data`
--
ALTER TABLE `meta_data`
ADD PRIMARY KEY (`type_id`);
--
-- 表的索引 `project`
--
ALTER TABLE `project`
ADD PRIMARY KEY (`p_id`);
--
-- 表的索引 `project_config`
--
ALTER TABLE `project_config`
ADD PRIMARY KEY (`config_id`);
--
-- 在导出的表使用AUTO_INCREMENT
--
--
-- 使用表AUTO_INCREMENT `build_log`
--
ALTER TABLE `build_log`
MODIFY `log_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '日志id';
--
-- 使用表AUTO_INCREMENT `env`
--
ALTER TABLE `env`
MODIFY `env_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '环境主键', AUTO_INCREMENT=10;
--
-- 使用表AUTO_INCREMENT `meta_data`
--
ALTER TABLE `meta_data`
MODIFY `type_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '类型id', AUTO_INCREMENT=3;
--
-- 使用表AUTO_INCREMENT `project`
--
ALTER TABLE `project`
MODIFY `p_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '项目id', AUTO_INCREMENT=25;
--
-- 使用表AUTO_INCREMENT `project_config`
--
ALTER TABLE `project_config`
MODIFY `config_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '配置id', AUTO_INCREMENT=30;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment