完善了dispatch 、 store 模块的api
This commit is contained in:
parent
b8e6b45a65
commit
e4dc4f6181
6
.idea/CopilotChatHistory.xml
generated
6
.idea/CopilotChatHistory.xml
generated
@ -3,6 +3,12 @@
|
|||||||
<component name="CopilotChatHistory">
|
<component name="CopilotChatHistory">
|
||||||
<option name="conversations">
|
<option name="conversations">
|
||||||
<list>
|
<list>
|
||||||
|
<Conversation>
|
||||||
|
<option name="createTime" value="1744715342263" />
|
||||||
|
<option name="id" value="0196392361b6725fa3a6b4154cc8a906" />
|
||||||
|
<option name="title" value="新对话 2025年4月15日 19:09:02" />
|
||||||
|
<option name="updateTime" value="1744715342263" />
|
||||||
|
</Conversation>
|
||||||
<Conversation>
|
<Conversation>
|
||||||
<option name="createTime" value="1744162064114" />
|
<option name="createTime" value="1744162064114" />
|
||||||
<option name="id" value="0196182906f277a7871e2e0971ccfe8a" />
|
<option name="id" value="0196182906f277a7871e2e0971ccfe8a" />
|
||||||
|
2
.idea/compiler.xml
generated
2
.idea/compiler.xml
generated
@ -32,6 +32,7 @@
|
|||||||
<module name="commons" />
|
<module name="commons" />
|
||||||
<module name="module-ci-common-pipeline" />
|
<module name="module-ci-common-pipeline" />
|
||||||
<module name="spring-boot-starter-plugin" />
|
<module name="spring-boot-starter-plugin" />
|
||||||
|
<module name="module-ci-store-api" />
|
||||||
<module name="ops-server" />
|
<module name="ops-server" />
|
||||||
<module name="spring-boot-starter-biz-data-permission" />
|
<module name="spring-boot-starter-biz-data-permission" />
|
||||||
<module name="spring-boot-starter-mybatis" />
|
<module name="spring-boot-starter-mybatis" />
|
||||||
@ -93,6 +94,7 @@
|
|||||||
<module name="module-ci-project" options="-parameters" />
|
<module name="module-ci-project" options="-parameters" />
|
||||||
<module name="module-ci-quality" options="-parameters" />
|
<module name="module-ci-quality" options="-parameters" />
|
||||||
<module name="module-ci-repository" options="-parameters" />
|
<module name="module-ci-repository" options="-parameters" />
|
||||||
|
<module name="module-ci-store-api" options="-parameters" />
|
||||||
<module name="module-ci-ticket" options="-parameters" />
|
<module name="module-ci-ticket" options="-parameters" />
|
||||||
<module name="module-ci-worker" options="-parameters" />
|
<module name="module-ci-worker" options="-parameters" />
|
||||||
<module name="module-infra-api" options="-parameters" />
|
<module name="module-infra-api" options="-parameters" />
|
||||||
|
2
.idea/encodings.xml
generated
2
.idea/encodings.xml
generated
@ -77,6 +77,8 @@
|
|||||||
<file url="file://$PROJECT_DIR$/modules/module-ci-quality/src/main/resources" charset="UTF-8" />
|
<file url="file://$PROJECT_DIR$/modules/module-ci-quality/src/main/resources" charset="UTF-8" />
|
||||||
<file url="file://$PROJECT_DIR$/modules/module-ci-repository/src/main/java" charset="UTF-8" />
|
<file url="file://$PROJECT_DIR$/modules/module-ci-repository/src/main/java" charset="UTF-8" />
|
||||||
<file url="file://$PROJECT_DIR$/modules/module-ci-repository/src/main/resources" charset="UTF-8" />
|
<file url="file://$PROJECT_DIR$/modules/module-ci-repository/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/modules/module-ci-store-api/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/modules/module-ci-store-api/src/main/resources" charset="UTF-8" />
|
||||||
<file url="file://$PROJECT_DIR$/modules/module-ci-ticket/src/main/java" charset="UTF-8" />
|
<file url="file://$PROJECT_DIR$/modules/module-ci-ticket/src/main/java" charset="UTF-8" />
|
||||||
<file url="file://$PROJECT_DIR$/modules/module-ci-ticket/src/main/resources" charset="UTF-8" />
|
<file url="file://$PROJECT_DIR$/modules/module-ci-ticket/src/main/resources" charset="UTF-8" />
|
||||||
<file url="file://$PROJECT_DIR$/modules/module-ci-worker/src/main/java" charset="UTF-8" />
|
<file url="file://$PROJECT_DIR$/modules/module-ci-worker/src/main/java" charset="UTF-8" />
|
||||||
|
5
.idea/jarRepositories.xml
generated
5
.idea/jarRepositories.xml
generated
@ -61,6 +61,11 @@
|
|||||||
<option name="name" value="huawei" />
|
<option name="name" value="huawei" />
|
||||||
<option name="url" value="https://repo.maven.apache.org/maven2/" />
|
<option name="url" value="https://repo.maven.apache.org/maven2/" />
|
||||||
</remote-repository>
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="central" />
|
||||||
|
<option name="name" value="Central Repository" />
|
||||||
|
<option name="url" value="http://maven.aliyun.com/nexus/content/groups/public" />
|
||||||
|
</remote-repository>
|
||||||
<remote-repository>
|
<remote-repository>
|
||||||
<option name="id" value="jboss.community" />
|
<option name="id" value="jboss.community" />
|
||||||
<option name="name" value="JBoss Community repository" />
|
<option name="name" value="JBoss Community repository" />
|
||||||
|
1
.idea/misc.xml
generated
1
.idea/misc.xml
generated
@ -49,6 +49,7 @@
|
|||||||
<option value="$PROJECT_DIR$/modules/module-ci-commons/pom.xml" />
|
<option value="$PROJECT_DIR$/modules/module-ci-commons/pom.xml" />
|
||||||
<option value="$PROJECT_DIR$/modules/module-ci-commons/ci-common-public/pom.xml" />
|
<option value="$PROJECT_DIR$/modules/module-ci-commons/ci-common-public/pom.xml" />
|
||||||
<option value="$PROJECT_DIR$/modules/module-ci-commons/ci-common-pipeline/pom.xml" />
|
<option value="$PROJECT_DIR$/modules/module-ci-commons/ci-common-pipeline/pom.xml" />
|
||||||
|
<option value="$PROJECT_DIR$/modules/module-ci-store-api/pom.xml" />
|
||||||
</list>
|
</list>
|
||||||
</option>
|
</option>
|
||||||
<option name="ignoredFiles">
|
<option name="ignoredFiles">
|
||||||
|
655
dependencies/.flattened-pom.xml
vendored
655
dependencies/.flattened-pom.xml
vendored
@ -1,655 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<groupId>cd.casic.boot</groupId>
|
|
||||||
<artifactId>dependencies</artifactId>
|
|
||||||
<version>2.0.0-jdk17</version>
|
|
||||||
<packaging>pom</packaging>
|
|
||||||
<name>dependencies</name>
|
|
||||||
<description>管理整个项目的依赖版本</description>
|
|
||||||
<properties>
|
|
||||||
<tika-core.version>2.9.2</tika-core.version>
|
|
||||||
<podam.version>8.0.0.RELEASE</podam.version>
|
|
||||||
<flatten-maven-plugin.version>1.6.0</flatten-maven-plugin.version>
|
|
||||||
<opengauss.jdbc.version>5.1.0</opengauss.jdbc.version>
|
|
||||||
<mapstruct.version>1.6.2</mapstruct.version>
|
|
||||||
<fastjson.version>1.2.83</fastjson.version>
|
|
||||||
<sqlite.version>3.47.1.0</sqlite.version>
|
|
||||||
<mybatis.version>3.5.16</mybatis.version>
|
|
||||||
<opentracing.version>0.33.0</opentracing.version>
|
|
||||||
<caffeine.version>2.9.3</caffeine.version>
|
|
||||||
<json.version>20250107</json.version>
|
|
||||||
<kingbase.jdbc.version>8.6.0</kingbase.jdbc.version>
|
|
||||||
<commons-compress.version>1.27.1</commons-compress.version>
|
|
||||||
<rocketmq-spring.version>2.3.1</rocketmq-spring.version>
|
|
||||||
<ip2region.version>2.7.0</ip2region.version>
|
|
||||||
<dynamic-datasource.version>4.3.1</dynamic-datasource.version>
|
|
||||||
<redisson.version>3.36.0</redisson.version>
|
|
||||||
<pf4j-spring.version>0.9.0</pf4j-spring.version>
|
|
||||||
<transmittable-thread-local.version>2.14.5</transmittable-thread-local.version>
|
|
||||||
<dd-plist.version>1.28</dd-plist.version>
|
|
||||||
<spring.boot.version>3.3.4</spring.boot.version>
|
|
||||||
<bcprov-jdk18on.version>1.80</bcprov-jdk18on.version>
|
|
||||||
<springdoc.version>2.3.0</springdoc.version>
|
|
||||||
<version-number.version>1.12</version-number.version>
|
|
||||||
<lock4j.version>2.2.7</lock4j.version>
|
|
||||||
<commons-io.version>2.17.0</commons-io.version>
|
|
||||||
<logback-core.version>1.2.11</logback-core.version>
|
|
||||||
<apk-parser.version>2.6.10</apk-parser.version>
|
|
||||||
<hutool-6.version>6.0.0-M16</hutool-6.version>
|
|
||||||
<resilience4j-circuitbreaker.version>2.3.0</resilience4j-circuitbreaker.version>
|
|
||||||
<jsoup.version>1.18.1</jsoup.version>
|
|
||||||
<mybatis-plus.version>3.5.8</mybatis-plus.version>
|
|
||||||
<knife4j.version>4.5.0</knife4j.version>
|
|
||||||
<lombok.version>1.18.34</lombok.version>
|
|
||||||
<skywalking.version>9.0.0</skywalking.version>
|
|
||||||
<mockito-inline.version>5.2.0</mockito-inline.version>
|
|
||||||
<logback-classic.version>1.2.11</logback-classic.version>
|
|
||||||
<commons-exec.version>1.4.0</commons-exec.version>
|
|
||||||
<velocity.version>2.4</velocity.version>
|
|
||||||
<reflections.version>0.10.2</reflections.version>
|
|
||||||
<bizlog-sdk.version>3.0.6</bizlog-sdk.version>
|
|
||||||
<anwena.version>2.0.8.3</anwena.version>
|
|
||||||
<pf4j.version>3.12.1</pf4j.version>
|
|
||||||
<logback.version>1.2.13</logback.version>
|
|
||||||
<mybatis-plus-join.version>1.4.13</mybatis-plus-join.version>
|
|
||||||
<hutool-5.version>5.8.32</hutool-5.version>
|
|
||||||
<revision>2.0.0-jdk17</revision>
|
|
||||||
<jsch.version>0.1.55</jsch.version>
|
|
||||||
<winp.version>1.28</winp.version>
|
|
||||||
<postgresql.version>42.7.4</postgresql.version>
|
|
||||||
<spring-boot-admin.version>3.3.3</spring-boot-admin.version>
|
|
||||||
<oracle.version>23.5.0.24.07</oracle.version>
|
|
||||||
<netty.version>4.1.113.Final</netty.version>
|
|
||||||
<oshi-version>6.6.5</oshi-version>
|
|
||||||
<jedis-mock.version>1.1.4</jedis-mock.version>
|
|
||||||
<guava.version>33.3.1-jre</guava.version>
|
|
||||||
<aws-java-sdk-s3.version>1.12.777</aws-java-sdk-s3.version>
|
|
||||||
<commons-net.version>3.11.1</commons-net.version>
|
|
||||||
<jimureport.version>1.7.8</jimureport.version>
|
|
||||||
<easyexcel.verion>4.0.3</easyexcel.verion>
|
|
||||||
<json.schema.validator.veresion>1.5.6</json.schema.validator.veresion>
|
|
||||||
<druid.version>1.2.23</druid.version>
|
|
||||||
<easy-trans.version>3.0.6</easy-trans.version>
|
|
||||||
<dm8.jdbc.version>8.1.3.140</dm8.jdbc.version>
|
|
||||||
</properties>
|
|
||||||
<dependencyManagement>
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>io.netty</groupId>
|
|
||||||
<artifactId>netty-bom</artifactId>
|
|
||||||
<version>${netty.version}</version>
|
|
||||||
<type>pom</type>
|
|
||||||
<scope>import</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-dependencies</artifactId>
|
|
||||||
<version>${spring.boot.version}</version>
|
|
||||||
<type>pom</type>
|
|
||||||
<scope>import</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>cd.casic.boot</groupId>
|
|
||||||
<artifactId>commons</artifactId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>cd.casic.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-biz-data-permission</artifactId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>cd.casic.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-biz-ip</artifactId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>cd.casic.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-biz-tenant</artifactId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>cd.casic.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-excel</artifactId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>cd.casic.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-job</artifactId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>cd.casic.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-mongo</artifactId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>cd.casic.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-monitor</artifactId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>cd.casic.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-mq</artifactId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.rocketmq</groupId>
|
|
||||||
<artifactId>rocketmq-spring-boot-starter</artifactId>
|
|
||||||
<version>${rocketmq-spring.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>cd.casic.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-mybatis</artifactId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>cd.casic.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-protection</artifactId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>cd.casic.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-redis</artifactId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>cd.casic.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-security</artifactId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>cd.casic.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-test</artifactId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>cd.casic.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-web</artifactId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>cd.casic.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-websocket</artifactId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>cd.casic.boot</groupId>
|
|
||||||
<artifactId>module-infra-api</artifactId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>cd.casic.boot</groupId>
|
|
||||||
<artifactId>module-infra-biz</artifactId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>cd.casic.boot</groupId>
|
|
||||||
<artifactId>module-system-api</artifactId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>cd.casic.boot</groupId>
|
|
||||||
<artifactId>module-system-biz</artifactId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>cd.casic.boot</groupId>
|
|
||||||
<artifactId>module-ci-common-pipeline</artifactId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>cd.casic.boot</groupId>
|
|
||||||
<artifactId>module-ci-process-api</artifactId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>cd.casic.boot</groupId>
|
|
||||||
<artifactId>module-ci-environment</artifactId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>cd.casic.boot</groupId>
|
|
||||||
<artifactId>module-ci-event</artifactId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>cd.casic.boot</groupId>
|
|
||||||
<artifactId>module-ci-log</artifactId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>cd.casic.boot</groupId>
|
|
||||||
<artifactId>module-ci-market</artifactId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>cd.casic.boot</groupId>
|
|
||||||
<artifactId>module-ci-process-api</artifactId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>cd.casic.boot</groupId>
|
|
||||||
<artifactId>module-ci-project</artifactId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>cd.casic.boot</groupId>
|
|
||||||
<artifactId>module-ci-quality</artifactId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>cd.casic.boot</groupId>
|
|
||||||
<artifactId>module-ci-ticket</artifactId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>cd.casic.boot</groupId>
|
|
||||||
<artifactId>module-ci-repository</artifactId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>cd.casic.boot</groupId>
|
|
||||||
<artifactId>module-ci-worker</artifactId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>cd.casic.pipeline</groupId>
|
|
||||||
<artifactId>module-ci-dispatch-api</artifactId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>io.github.mouzt</groupId>
|
|
||||||
<artifactId>bizlog-sdk</artifactId>
|
|
||||||
<version>${bizlog-sdk.version}</version>
|
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-configuration-processor</artifactId>
|
|
||||||
<version>${spring.boot.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.github.xiaoymin</groupId>
|
|
||||||
<artifactId>knife4j-openapi3-jakarta-spring-boot-starter</artifactId>
|
|
||||||
<version>${knife4j.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springdoc</groupId>
|
|
||||||
<artifactId>springdoc-openapi-starter-webmvc-api</artifactId>
|
|
||||||
<version>${springdoc.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba</groupId>
|
|
||||||
<artifactId>druid-spring-boot-3-starter</artifactId>
|
|
||||||
<version>${druid.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.mybatis</groupId>
|
|
||||||
<artifactId>mybatis</artifactId>
|
|
||||||
<version>${mybatis.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.baomidou</groupId>
|
|
||||||
<artifactId>mybatis-plus-spring-boot3-starter</artifactId>
|
|
||||||
<version>${mybatis-plus.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.baomidou</groupId>
|
|
||||||
<artifactId>mybatis-plus-generator</artifactId>
|
|
||||||
<version>${mybatis-plus.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.baomidou</groupId>
|
|
||||||
<artifactId>dynamic-datasource-spring-boot3-starter</artifactId>
|
|
||||||
<version>${dynamic-datasource.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.github.yulichang</groupId>
|
|
||||||
<artifactId>mybatis-plus-join-boot-starter</artifactId>
|
|
||||||
<version>${mybatis-plus-join.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.fhs-opensource</groupId>
|
|
||||||
<artifactId>easy-trans-spring-boot-starter</artifactId>
|
|
||||||
<version>${easy-trans.version}</version>
|
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.springframework</groupId>
|
|
||||||
<artifactId>spring-context</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.springframework.cloud</groupId>
|
|
||||||
<artifactId>spring-cloud-commons</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.fhs-opensource</groupId>
|
|
||||||
<artifactId>easy-trans-mybatis-plus-extend</artifactId>
|
|
||||||
<version>${easy-trans.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.fhs-opensource</groupId>
|
|
||||||
<artifactId>easy-trans-anno</artifactId>
|
|
||||||
<version>${easy-trans.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.redisson</groupId>
|
|
||||||
<artifactId>redisson-spring-boot-starter</artifactId>
|
|
||||||
<version>${redisson.version}</version>
|
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.baomidou</groupId>
|
|
||||||
<artifactId>lock4j-redisson-spring-boot-starter</artifactId>
|
|
||||||
<version>${lock4j.version}</version>
|
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.redisson</groupId>
|
|
||||||
<artifactId>redisson-spring-boot-starter</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.skywalking</groupId>
|
|
||||||
<artifactId>apm-toolkit-trace</artifactId>
|
|
||||||
<version>${skywalking.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.skywalking</groupId>
|
|
||||||
<artifactId>apm-toolkit-logback-1.x</artifactId>
|
|
||||||
<version>${skywalking.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.skywalking</groupId>
|
|
||||||
<artifactId>apm-toolkit-opentracing</artifactId>
|
|
||||||
<version>${skywalking.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>io.opentracing</groupId>
|
|
||||||
<artifactId>opentracing-api</artifactId>
|
|
||||||
<version>${opentracing.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>io.opentracing</groupId>
|
|
||||||
<artifactId>opentracing-util</artifactId>
|
|
||||||
<version>${opentracing.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>io.opentracing</groupId>
|
|
||||||
<artifactId>opentracing-noop</artifactId>
|
|
||||||
<version>${opentracing.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>de.codecentric</groupId>
|
|
||||||
<artifactId>spring-boot-admin-starter-server</artifactId>
|
|
||||||
<version>${spring-boot-admin.version}</version>
|
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>de.codecentric</groupId>
|
|
||||||
<artifactId>spring-boot-admin-server-cloud</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>de.codecentric</groupId>
|
|
||||||
<artifactId>spring-boot-admin-starter-client</artifactId>
|
|
||||||
<version>${spring-boot-admin.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.mockito</groupId>
|
|
||||||
<artifactId>mockito-inline</artifactId>
|
|
||||||
<version>${mockito-inline.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-test</artifactId>
|
|
||||||
<version>${spring.boot.version}</version>
|
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.ow2.asm</groupId>
|
|
||||||
<artifactId>asm</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.mockito</groupId>
|
|
||||||
<artifactId>mockito-core</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.github.fppt</groupId>
|
|
||||||
<artifactId>jedis-mock</artifactId>
|
|
||||||
<version>${jedis-mock.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>uk.co.jemos.podam</groupId>
|
|
||||||
<artifactId>podam</artifactId>
|
|
||||||
<version>${podam.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.projectlombok</groupId>
|
|
||||||
<artifactId>lombok</artifactId>
|
|
||||||
<version>${lombok.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.mapstruct</groupId>
|
|
||||||
<artifactId>mapstruct</artifactId>
|
|
||||||
<version>${mapstruct.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.mapstruct</groupId>
|
|
||||||
<artifactId>mapstruct-jdk8</artifactId>
|
|
||||||
<version>${mapstruct.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.mapstruct</groupId>
|
|
||||||
<artifactId>mapstruct-processor</artifactId>
|
|
||||||
<version>${mapstruct.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>cn.hutool</groupId>
|
|
||||||
<artifactId>hutool-all</artifactId>
|
|
||||||
<version>${hutool-5.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.dromara.hutool</groupId>
|
|
||||||
<artifactId>hutool-extra</artifactId>
|
|
||||||
<version>${hutool-6.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba</groupId>
|
|
||||||
<artifactId>easyexcel</artifactId>
|
|
||||||
<version>${easyexcel.verion}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>commons-io</groupId>
|
|
||||||
<artifactId>commons-io</artifactId>
|
|
||||||
<version>${commons-io.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.commons</groupId>
|
|
||||||
<artifactId>commons-compress</artifactId>
|
|
||||||
<version>${commons-compress.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.tika</groupId>
|
|
||||||
<artifactId>tika-core</artifactId>
|
|
||||||
<version>${tika-core.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.velocity</groupId>
|
|
||||||
<artifactId>velocity-engine-core</artifactId>
|
|
||||||
<version>${velocity.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba</groupId>
|
|
||||||
<artifactId>fastjson</artifactId>
|
|
||||||
<version>${fastjson.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.networknt</groupId>
|
|
||||||
<artifactId>json-schema-validator</artifactId>
|
|
||||||
<version>${json.schema.validator.veresion}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.json</groupId>
|
|
||||||
<artifactId>json</artifactId>
|
|
||||||
<version>${json.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.google.guava</groupId>
|
|
||||||
<artifactId>guava</artifactId>
|
|
||||||
<version>${guava.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba</groupId>
|
|
||||||
<artifactId>transmittable-thread-local</artifactId>
|
|
||||||
<version>${transmittable-thread-local.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>commons-net</groupId>
|
|
||||||
<artifactId>commons-net</artifactId>
|
|
||||||
<version>${commons-net.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.jcraft</groupId>
|
|
||||||
<artifactId>jsch</artifactId>
|
|
||||||
<version>${jsch.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.amazonaws</groupId>
|
|
||||||
<artifactId>aws-java-sdk-s3</artifactId>
|
|
||||||
<version>${aws-java-sdk-s3.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.lionsoul</groupId>
|
|
||||||
<artifactId>ip2region</artifactId>
|
|
||||||
<version>${ip2region.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jsoup</groupId>
|
|
||||||
<artifactId>jsoup</artifactId>
|
|
||||||
<version>${jsoup.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.github.oshi</groupId>
|
|
||||||
<artifactId>oshi-core</artifactId>
|
|
||||||
<version>${oshi-version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.pf4j</groupId>
|
|
||||||
<artifactId>pf4j</artifactId>
|
|
||||||
<version>${pf4j.version}</version>
|
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.slf4j</groupId>
|
|
||||||
<artifactId>slf4j-log4j12</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.pf4j</groupId>
|
|
||||||
<artifactId>pf4j-spring</artifactId>
|
|
||||||
<version>${pf4j-spring.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.dameng</groupId>
|
|
||||||
<artifactId>DmJdbcDriver18</artifactId>
|
|
||||||
<version>${dm8.jdbc.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.oracle.database.jdbc</groupId>
|
|
||||||
<artifactId>ojdbc8</artifactId>
|
|
||||||
<version>${oracle.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.postgresql</groupId>
|
|
||||||
<artifactId>postgresql</artifactId>
|
|
||||||
<version>${postgresql.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.opengauss</groupId>
|
|
||||||
<artifactId>opengauss-jdbc</artifactId>
|
|
||||||
<version>${opengauss.jdbc.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>cn.com.kingbase</groupId>
|
|
||||||
<artifactId>kingbase8</artifactId>
|
|
||||||
<version>${kingbase.jdbc.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.xerial</groupId>
|
|
||||||
<artifactId>sqlite-jdbc</artifactId>
|
|
||||||
<version>${sqlite.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.gitee.anwena</groupId>
|
|
||||||
<artifactId>mongo-plus-boot-starter</artifactId>
|
|
||||||
<version>${anwena.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.bouncycastle</groupId>
|
|
||||||
<artifactId>bcprov-jdk18on</artifactId>
|
|
||||||
<version>${bcprov-jdk18on.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jvnet.winp</groupId>
|
|
||||||
<artifactId>winp</artifactId>
|
|
||||||
<version>${winp.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.reflections</groupId>
|
|
||||||
<artifactId>reflections</artifactId>
|
|
||||||
<version>${reflections.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.commons</groupId>
|
|
||||||
<artifactId>commons-exec</artifactId>
|
|
||||||
<version>${commons-exec.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.googlecode.plist</groupId>
|
|
||||||
<artifactId>dd-plist</artifactId>
|
|
||||||
<version>${dd-plist.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>net.dongliu</groupId>
|
|
||||||
<artifactId>apk-parser</artifactId>
|
|
||||||
<version>${apk-parser.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>ch.qos.logback</groupId>
|
|
||||||
<artifactId>logback-core</artifactId>
|
|
||||||
<version>${logback-core.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>ch.qos.logback</groupId>
|
|
||||||
<artifactId>logback-classic</artifactId>
|
|
||||||
<version>${logback-classic.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.github.ben-manes.caffeine</groupId>
|
|
||||||
<artifactId>caffeine</artifactId>
|
|
||||||
<version>${caffeine.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>io.github.resilience4j</groupId>
|
|
||||||
<artifactId>resilience4j-circuitbreaker</artifactId>
|
|
||||||
<version>${resilience4j-circuitbreaker.version}</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
</dependencyManagement>
|
|
||||||
</project>
|
|
8
dependencies/pom.xml
vendored
8
dependencies/pom.xml
vendored
@ -293,11 +293,17 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>cd.casic.pipeline</groupId>
|
<groupId>cd.casic.boot</groupId>
|
||||||
<artifactId>module-ci-dispatch-api</artifactId>
|
<artifactId>module-ci-dispatch-api</artifactId>
|
||||||
<version>${revision}</version>
|
<version>${revision}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>cd.casic.boot</groupId>
|
||||||
|
<artifactId>module-ci-store-api</artifactId>
|
||||||
|
<version>${revision}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!---->
|
<!---->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.github.mouzt</groupId>
|
<groupId>io.github.mouzt</groupId>
|
||||||
|
@ -63,6 +63,9 @@ public final class OpsHeader {
|
|||||||
public static final String AUTH_HEADER_GIT_TYPE = "X-DEVOPS-STREAM-GIT-TYPE";
|
public static final String AUTH_HEADER_GIT_TYPE = "X-DEVOPS-STREAM-GIT-TYPE";
|
||||||
public static final String AUTH_HEADER_OPS_CI_LOGIN_TOKEN = "X-DEVOPS-CI-LOGIN-TOKEN";
|
public static final String AUTH_HEADER_OPS_CI_LOGIN_TOKEN = "X-DEVOPS-CI-LOGIN-TOKEN";
|
||||||
public static final String AUTH_HEADER_DEVOPS_SERVICE_NAME = "X-DEVOPS-SERVICE-NAME";
|
public static final String AUTH_HEADER_DEVOPS_SERVICE_NAME = "X-DEVOPS-SERVICE-NAME";
|
||||||
|
|
||||||
|
public static final String AUTH_HEADER_DEVOPS_BK_TOKEN = "X-DEVOPS-BK-TOKEN";
|
||||||
|
|
||||||
public static final String AUTH_HEADER_CODECC_OPENAPI_TOKEN = "X-CODECC-OPENAPI-TOKEN";
|
public static final String AUTH_HEADER_CODECC_OPENAPI_TOKEN = "X-CODECC-OPENAPI-TOKEN";
|
||||||
|
|
||||||
public static final String AUTH_HEADER_OAUTH2_CLIENT_ID = "X-DEVOPS-OAUTH2-CLIENT-ID";
|
public static final String AUTH_HEADER_OAUTH2_CLIENT_ID = "X-DEVOPS-OAUTH2-CLIENT-ID";
|
||||||
|
@ -1,11 +1,16 @@
|
|||||||
package cd.casic.ci.common.pipeline.type.docker;
|
package cd.casic.ci.common.pipeline.type.docker;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author by mianbin
|
* @author by mianbin
|
||||||
* @Classname ImageType
|
* @Classname ImageType
|
||||||
* @Description TODO
|
* @Description TODO
|
||||||
* @Date 2025/3/31 9:42
|
* @Date 2025/3/31 9:42
|
||||||
*/
|
*/
|
||||||
|
@Getter
|
||||||
|
@AllArgsConstructor
|
||||||
public enum ImageType {
|
public enum ImageType {
|
||||||
BKDEVOPS("devops"), // ops镜像
|
BKDEVOPS("devops"), // ops镜像
|
||||||
BKSTORE("ops_store"), // ops镜像市场镜像,存储于artifactory的项目{projectCode}路径下
|
BKSTORE("ops_store"), // ops镜像市场镜像,存储于artifactory的项目{projectCode}路径下
|
||||||
@ -13,14 +18,6 @@ public enum ImageType {
|
|||||||
|
|
||||||
private final String type;
|
private final String type;
|
||||||
|
|
||||||
ImageType(String type) {
|
|
||||||
this.type = type;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getType() {
|
|
||||||
return type;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static ImageType getType(String type) {
|
public static ImageType getType(String type) {
|
||||||
if (type == null) {
|
if (type == null) {
|
||||||
return BKDEVOPS;
|
return BKDEVOPS;
|
||||||
|
@ -9,8 +9,6 @@
|
|||||||
<version>${revision}</version>
|
<version>${revision}</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<groupId>cd.casic.pipeline</groupId>
|
|
||||||
|
|
||||||
<artifactId>module-ci-dispatch-api</artifactId>
|
<artifactId>module-ci-dispatch-api</artifactId>
|
||||||
|
|
||||||
<version>${revision}</version>
|
<version>${revision}</version>
|
||||||
|
@ -1,69 +1,128 @@
|
|||||||
package cd.casic.pipeline.dispatch.api;
|
package cd.casic.pipeline.dispatch.api;
|
||||||
|
|
||||||
|
|
||||||
|
import cd.casic.ci.common.pipeline.pojo.agent.ThirdPartyAgentUpgradeByVersionInfo;
|
||||||
|
import cd.casic.ci.common.pipeline.pojo.agent.UpgradeItem;
|
||||||
import cd.casic.framework.commons.pojo.CommonResult;
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
import cd.casic.pipeline.dispatch.pojo.thirdpartyagent.ThirdPartyBuildInfo;
|
import cd.casic.pipeline.dispatch.pojo.thirdpartyagent.*;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.Parameter;
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import org.springframework.http.MediaType;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import static cd.casic.ci.common.pipeline.constant.OpsHeader.*;
|
import static cd.casic.ci.common.pipeline.constant.OpsHeader.*;
|
||||||
|
|
||||||
/**
|
|
||||||
* @author by mianbin
|
|
||||||
* @Classname BuildAgentBuildResource
|
|
||||||
* @Description TODO
|
|
||||||
* @Date 2025/4/8 16:48
|
|
||||||
*/
|
|
||||||
@Tag(name = "BUILD_AGENT_BUILD", description = "第三方接入agent资源")
|
@Tag(name = "BUILD_AGENT_BUILD", description = "第三方接入agent资源")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping(value = "/buildAgent/agent/thirdPartyAgent", produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
|
@RequestMapping("/buildAgent/agent/thirdPartyAgent")
|
||||||
public interface BuildAgentBuildResource {
|
public interface BuildAgentBuildResource {
|
||||||
|
|
||||||
@Operation(summary = "尝试启动构建")
|
@Operation(summary = "尝试启动构建")
|
||||||
@GetMapping("/startup")
|
@GetMapping("/startup")
|
||||||
CommonResult<ThirdPartyBuildInfo> startBuild(
|
CommonResult<ThirdPartyBuildInfo> startBuild(
|
||||||
@Parameter(description = "项目ID", required = true)
|
@Parameter(description = "项目ID", required = true)
|
||||||
@RequestHeader(AUTH_HEADER_DEVOPS_PROJECT_ID)
|
@RequestHeader(AUTH_HEADER_DEVOPS_PROJECT_ID) String projectId,
|
||||||
String projectId,
|
|
||||||
@Parameter(description = "Agent ID", required = true)
|
@Parameter(description = "Agent ID", required = true)
|
||||||
@RequestHeader(AUTH_HEADER_DEVOPS_AGENT_ID)
|
@RequestHeader(AUTH_HEADER_DEVOPS_AGENT_ID) String agentId,
|
||||||
String agentId,
|
|
||||||
@Parameter(description = "秘钥", required = true)
|
@Parameter(description = "秘钥", required = true)
|
||||||
@RequestHeader(AUTH_HEADER_DEVOPS_AGENT_SECRET_KEY)
|
@RequestHeader(AUTH_HEADER_DEVOPS_AGENT_SECRET_KEY) String secretKey,
|
||||||
String secretKey,
|
|
||||||
@Parameter(description = "尝试启动构建的类型", required = false)
|
@Parameter(description = "尝试启动构建的类型", required = false)
|
||||||
@RequestParam("buildType")
|
@RequestParam("buildType") String buildType);
|
||||||
String buildType
|
|
||||||
);
|
|
||||||
|
|
||||||
@Operation(summary = "是否更新")
|
@Operation(summary = "是否更新")
|
||||||
@GetMapping("/upgrade")
|
@GetMapping("/upgrade")
|
||||||
CommonResult<Boolean> upgrade(
|
CommonResult<Boolean> upgrade(
|
||||||
@Parameter(description = "项目ID", required = true)
|
@Parameter(description = "项目ID", required = true)
|
||||||
@RequestHeader(AUTH_HEADER_DEVOPS_PROJECT_ID)
|
@RequestHeader(AUTH_HEADER_DEVOPS_PROJECT_ID) String projectId,
|
||||||
String projectId,
|
|
||||||
@Parameter(description = "Agent ID", required = true)
|
@Parameter(description = "Agent ID", required = true)
|
||||||
@RequestHeader(AUTH_HEADER_DEVOPS_AGENT_ID)
|
@RequestHeader(AUTH_HEADER_DEVOPS_AGENT_ID) String agentId,
|
||||||
String agentId,
|
|
||||||
@Parameter(description = "秘钥", required = true)
|
@Parameter(description = "秘钥", required = true)
|
||||||
@RequestHeader(AUTH_HEADER_DEVOPS_AGENT_SECRET_KEY)
|
@RequestHeader(AUTH_HEADER_DEVOPS_AGENT_SECRET_KEY) String secretKey,
|
||||||
String secretKey,
|
|
||||||
@Parameter(description = "Agent 版本号", required = false)
|
@Parameter(description = "Agent 版本号", required = false)
|
||||||
@RequestParam("version")
|
@RequestParam("version") String version,
|
||||||
String version,
|
|
||||||
@Parameter(description = "masterAgent 版本号", required = false)
|
@Parameter(description = "masterAgent 版本号", required = false)
|
||||||
@RequestParam("masterVersion")
|
@RequestParam("masterVersion") String masterVersion);
|
||||||
String masterVersion
|
|
||||||
);
|
|
||||||
|
|
||||||
// 由于原 Kotlin 代码中 upgradeNew 方法未完成,这里保留未完成状态
|
|
||||||
@Operation(summary = "是否更新NEW")
|
@Operation(summary = "是否更新NEW")
|
||||||
@PostMapping("/upgradeNew")
|
@PostMapping("/upgradeNew")
|
||||||
CommonResult<?> upgradeNew(
|
CommonResult<UpgradeItem> upgradeNew(
|
||||||
@Parameter(description = "项目ID", required = true)
|
@Parameter(description = "项目ID", required = true)
|
||||||
@RequestHeader(AUTH_HEADER_DEVOPS_PROJECT_ID)
|
@RequestHeader(AUTH_HEADER_DEVOPS_PROJECT_ID) String projectId,
|
||||||
String projectId
|
@Parameter(description = "Agent ID", required = true)
|
||||||
);
|
@RequestHeader(AUTH_HEADER_DEVOPS_AGENT_ID) String agentId,
|
||||||
|
@Parameter(description = "秘钥", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_DEVOPS_AGENT_SECRET_KEY) String secretKey,
|
||||||
|
@Parameter(description = "检查版本升级上报的信息", required = false)
|
||||||
|
ThirdPartyAgentUpgradeByVersionInfo info);
|
||||||
|
|
||||||
|
@Operation(summary = "更新完成")
|
||||||
|
@DeleteMapping("/upgrade")
|
||||||
|
CommonResult<Boolean> finishUpgrade(
|
||||||
|
@Parameter(description = "项目ID", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_DEVOPS_PROJECT_ID) String projectId,
|
||||||
|
@Parameter(description = "Agent ID", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_DEVOPS_AGENT_ID) String agentId,
|
||||||
|
@Parameter(description = "秘钥", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_DEVOPS_AGENT_SECRET_KEY) String secretKey,
|
||||||
|
@Parameter(description = "升级是否成功", required = true)
|
||||||
|
@RequestParam("success") boolean success);
|
||||||
|
|
||||||
|
@Operation(summary = "worker构建结束")
|
||||||
|
@PostMapping("/workerBuildFinish")
|
||||||
|
CommonResult<Boolean> workerBuildFinish(
|
||||||
|
@Parameter(description = "项目ID", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_DEVOPS_PROJECT_ID) String projectId,
|
||||||
|
@Parameter(description = "Agent ID", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_DEVOPS_AGENT_ID) String agentId,
|
||||||
|
@Parameter(description = "秘钥", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_DEVOPS_AGENT_SECRET_KEY) String secretKey,
|
||||||
|
@Parameter(description = "构建信息", required = true)
|
||||||
|
ThirdPartyBuildWithStatus buildInfo);
|
||||||
|
|
||||||
|
@Operation(summary = "尝试启动Docker登录调试")
|
||||||
|
@GetMapping("/docker/startupDebug")
|
||||||
|
CommonResult<ThirdPartyDockerDebugInfo> dockerStartDebug(
|
||||||
|
@Parameter(description = "项目ID", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_DEVOPS_PROJECT_ID) String projectId,
|
||||||
|
@Parameter(description = "Agent ID", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_DEVOPS_AGENT_ID) String agentId,
|
||||||
|
@Parameter(description = "秘钥", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_DEVOPS_AGENT_SECRET_KEY) String secretKey);
|
||||||
|
|
||||||
|
@Operation(summary = "启动Docker登录完成")
|
||||||
|
@PostMapping("/docker/startupDebug")
|
||||||
|
CommonResult<Boolean> dockerStartDebugDone(
|
||||||
|
@Parameter(description = "项目ID", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_DEVOPS_PROJECT_ID) String projectId,
|
||||||
|
@Parameter(description = "Agent ID", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_DEVOPS_AGENT_ID) String agentId,
|
||||||
|
@Parameter(description = "秘钥", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_DEVOPS_AGENT_SECRET_KEY) String secretKey,
|
||||||
|
@Parameter(description = "构建信息", required = true)
|
||||||
|
ThirdPartyDockerDebugDoneInfo debugInfo);
|
||||||
|
|
||||||
|
@Operation(summary = "获取登录调试任务状态")
|
||||||
|
@GetMapping("/docker/debug/status")
|
||||||
|
CommonResult<String> dockerDebugStatus(
|
||||||
|
@Parameter(description = "项目ID", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_DEVOPS_PROJECT_ID) String projectId,
|
||||||
|
@Parameter(description = "Agent ID", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_DEVOPS_AGENT_ID) String agentId,
|
||||||
|
@Parameter(description = "秘钥", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_DEVOPS_AGENT_SECRET_KEY) String secretKey,
|
||||||
|
@Parameter(description = "debugId", required = true)
|
||||||
|
@RequestParam("debugId") long debugId);
|
||||||
|
|
||||||
|
@Operation(summary = "第三方构建机请求")
|
||||||
|
@PostMapping("/ask")
|
||||||
|
CommonResult<ThirdPartyAskResp> thirdPartyAgentAsk(
|
||||||
|
@Parameter(description = "项目ID", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_DEVOPS_PROJECT_ID) String projectId,
|
||||||
|
@Parameter(description = "Agent ID", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_DEVOPS_AGENT_ID) String agentId,
|
||||||
|
@Parameter(description = "秘钥", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_DEVOPS_AGENT_SECRET_KEY) String secretKey,
|
||||||
|
@Parameter(description = "ask信息", required = true)
|
||||||
|
ThirdPartyAskInfo data);
|
||||||
}
|
}
|
@ -4,17 +4,10 @@ import cd.casic.framework.commons.pojo.CommonResult;
|
|||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.Parameter;
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import kotlin.Result;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import static cd.casic.ci.common.pipeline.constant.OpsHeader.*;
|
import static cd.casic.ci.common.pipeline.constant.OpsHeader.*;
|
||||||
|
|
||||||
/**
|
|
||||||
* @author by mianbin
|
|
||||||
* @Classname BuildJobQuotaBusinessResource
|
|
||||||
* @Description TODO
|
|
||||||
* @Date 2025/4/8 16:58
|
|
||||||
*/
|
|
||||||
@Tag(name = "BUILD_JOBS_PROJECT_QUOTA", description = "Job配额管理")
|
@Tag(name = "BUILD_JOBS_PROJECT_QUOTA", description = "Job配额管理")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/build/quotas/running")
|
@RequestMapping("/build/quotas/running")
|
||||||
@ -37,10 +30,9 @@ public interface BuildJobQuotaBusinessResource {
|
|||||||
|
|
||||||
@Operation(summary = "上报一个Agent结束")
|
@Operation(summary = "上报一个Agent结束")
|
||||||
@DeleteMapping("/agent/shutdown")
|
@DeleteMapping("/agent/shutdown")
|
||||||
Result<Boolean> removeRunningAgent(
|
CommonResult<Boolean> removeRunningAgent(
|
||||||
@Parameter(description = "项目ID", required = true)
|
@Parameter(description = "项目ID", required = true)
|
||||||
@RequestHeader(AUTH_HEADER_DEVOPS_PROJECT_ID)
|
@RequestHeader(AUTH_HEADER_DEVOPS_PROJECT_ID) String projectId,
|
||||||
String projectId,
|
|
||||||
@Parameter(description = "流水线ID", required = true)
|
@Parameter(description = "流水线ID", required = true)
|
||||||
@RequestHeader(AUTH_HEADER_DEVOPS_PIPELINE_ID)
|
@RequestHeader(AUTH_HEADER_DEVOPS_PIPELINE_ID)
|
||||||
String pipelineId,
|
String pipelineId,
|
||||||
@ -52,5 +44,6 @@ public interface BuildJobQuotaBusinessResource {
|
|||||||
String vmSeqId,
|
String vmSeqId,
|
||||||
@Parameter(description = "executeCount", required = true)
|
@Parameter(description = "executeCount", required = true)
|
||||||
@RequestParam("executeCount")
|
@RequestParam("executeCount")
|
||||||
int executeCount);
|
Integer executeCount
|
||||||
|
);
|
||||||
}
|
}
|
@ -11,11 +11,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
/**
|
|
||||||
* @author by mianbin
|
|
||||||
* @Classname BuildScriptResource
|
|
||||||
* @Date 2025/4/8 17:19
|
|
||||||
*/
|
|
||||||
@Tag(name = "BUILD_CUSTOM_SCRIPT", description = "构建-自定义脚本资源")
|
@Tag(name = "BUILD_CUSTOM_SCRIPT", description = "构建-自定义脚本资源")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/build/scripts")
|
@RequestMapping("/build/scripts")
|
||||||
@ -23,9 +18,7 @@ public interface BuildScriptResource {
|
|||||||
|
|
||||||
@Operation(summary = "下载插件")
|
@Operation(summary = "下载插件")
|
||||||
@GetMapping("/")
|
@GetMapping("/")
|
||||||
@ApiResponses({
|
@ApiResponses({@ApiResponse(responseCode = "304", description = "本地插件已是最新,无需下载")})
|
||||||
@ApiResponse(responseCode = "304", description = "本地插件已是最新,无需下载")
|
|
||||||
})
|
|
||||||
CommonResult download(
|
CommonResult download(
|
||||||
@Parameter(description = "插件标识符", required = true)
|
@Parameter(description = "插件标识符", required = true)
|
||||||
@RequestParam("scriptName") String scriptName,
|
@RequestParam("scriptName") String scriptName,
|
||||||
|
@ -11,12 +11,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
/**
|
|
||||||
* @author by mianbin
|
|
||||||
* @Classname BuildWorkerResource
|
|
||||||
* @Description TODO
|
|
||||||
* @Date 2025/4/8 17:21
|
|
||||||
*/
|
|
||||||
@Tag(name = "BUILD_WORKER", description = "构建-构建执行器资源")
|
@Tag(name = "BUILD_WORKER", description = "构建-构建执行器资源")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/build/workers")
|
@RequestMapping("/build/workers")
|
||||||
@ -24,9 +18,7 @@ public interface BuildWorkerResource {
|
|||||||
|
|
||||||
@Operation(summary = "下载构建执行器")
|
@Operation(summary = "下载构建执行器")
|
||||||
@GetMapping("/")
|
@GetMapping("/")
|
||||||
@ApiResponses({
|
@ApiResponses({@ApiResponse(responseCode = "304", description = "本地的构建执行器已是最新,无需下载")})
|
||||||
@ApiResponse(responseCode = "304", description = "本地的构建执行器已是最新,无需下载")
|
|
||||||
})
|
|
||||||
CommonResult download(
|
CommonResult download(
|
||||||
@Parameter(description = "本地eTag标签", required = false)
|
@Parameter(description = "本地eTag标签", required = false)
|
||||||
@RequestParam("eTag") String eTag
|
@RequestParam("eTag") String eTag
|
||||||
|
@ -9,12 +9,6 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
|
||||||
* @author by mianbin
|
|
||||||
* @Classname OpAgentResource
|
|
||||||
* @Description TODO
|
|
||||||
* @Date 2025/4/8 17:22
|
|
||||||
*/
|
|
||||||
@Tag(name = "OP_AGENT", description = "agent相关")
|
@Tag(name = "OP_AGENT", description = "agent相关")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/op/agent")
|
@RequestMapping("/op/agent")
|
||||||
|
@ -6,15 +6,11 @@ import cd.casic.pipeline.dispatch.pojo.enums.JobQuotaVmType;
|
|||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.Parameter;
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import jakarta.websocket.server.PathParam;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
/**
|
import java.util.List;
|
||||||
* @author by mianbin
|
|
||||||
* @Classname OpJobQuotaProjectResource
|
|
||||||
* @Description TODO
|
|
||||||
* @Date 2025/4/8 17:23
|
|
||||||
*/
|
|
||||||
@Tag(name = "OP_JOBS_PROJECT_QUOTA", description = "Job配额管理")
|
@Tag(name = "OP_JOBS_PROJECT_QUOTA", description = "Job配额管理")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/op/jobs/quota")
|
@RequestMapping("/op/jobs/quota")
|
||||||
@ -22,7 +18,7 @@ public interface OpJobQuotaProjectResource {
|
|||||||
|
|
||||||
@Operation(summary = "获取全部的JOB配额信息")
|
@Operation(summary = "获取全部的JOB配额信息")
|
||||||
@GetMapping("/list/project/quota")
|
@GetMapping("/list/project/quota")
|
||||||
CommonResult<java.util.List<JobQuotaProject>> list(
|
CommonResult<List<JobQuotaProject>> list(
|
||||||
@Parameter(description = "项目ID", required = false)
|
@Parameter(description = "项目ID", required = false)
|
||||||
@RequestParam("projectId") String projectId
|
@RequestParam("projectId") String projectId
|
||||||
);
|
);
|
||||||
@ -42,7 +38,7 @@ public interface OpJobQuotaProjectResource {
|
|||||||
@PutMapping("/{projectId}")
|
@PutMapping("/{projectId}")
|
||||||
CommonResult<Boolean> add(
|
CommonResult<Boolean> add(
|
||||||
@Parameter(description = "项目ID", required = true)
|
@Parameter(description = "项目ID", required = true)
|
||||||
@PathParam("projectId") String projectId,
|
@PathVariable("projectId") String projectId,
|
||||||
@Parameter(description = "Job配额信息", required = true)
|
@Parameter(description = "Job配额信息", required = true)
|
||||||
JobQuotaProject jobQuota
|
JobQuotaProject jobQuota
|
||||||
);
|
);
|
||||||
|
@ -6,15 +6,10 @@ import cd.casic.pipeline.dispatch.pojo.enums.JobQuotaVmType;
|
|||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.Parameter;
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import jakarta.websocket.server.PathParam;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
/**
|
import java.util.Map;
|
||||||
* @author by mianbin
|
|
||||||
* @Classname OpJobQuotaSystemResource
|
|
||||||
* @Description TODO
|
|
||||||
* @Date 2025/4/8 17:26
|
|
||||||
*/
|
|
||||||
@Tag(name = "OP_JOBS_SYSTEM_QUOTA", description = "Job默认配额管理")
|
@Tag(name = "OP_JOBS_SYSTEM_QUOTA", description = "Job默认配额管理")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/op/jobs/system/quota")
|
@RequestMapping("/op/jobs/system/quota")
|
||||||
@ -22,11 +17,11 @@ public interface OpJobQuotaSystemResource {
|
|||||||
|
|
||||||
@Operation(summary = "统计已运行的配额信息")
|
@Operation(summary = "统计已运行的配额信息")
|
||||||
@GetMapping("/all/statistics")
|
@GetMapping("/all/statistics")
|
||||||
CommonResult<java.util.Map<String, Object>> statistics(
|
CommonResult<Map<String, Object>> statistics(
|
||||||
@Parameter(description = "分页大小", required = false)
|
@Parameter(description = "分页大小", required = false)
|
||||||
@RequestParam("limit") Integer limit,
|
@RequestParam("limit") Integer limit,
|
||||||
@Parameter(description = "偏移", required = false)
|
@Parameter(description = "偏移", required = false)
|
||||||
@RequestParam("offset") Integer offset
|
@RequestParam("offset") Integer offset
|
||||||
);
|
);
|
||||||
|
|
||||||
@Operation(summary = "获取全部的JOB配额信息")
|
@Operation(summary = "获取全部的JOB配额信息")
|
||||||
@ -36,41 +31,41 @@ public interface OpJobQuotaSystemResource {
|
|||||||
@Operation(summary = "获取系统默认JOB配额信息")
|
@Operation(summary = "获取系统默认JOB配额信息")
|
||||||
@GetMapping("/{jobQuotaVmType}")
|
@GetMapping("/{jobQuotaVmType}")
|
||||||
CommonResult<java.util.List<JobQuotaSystem>> get(
|
CommonResult<java.util.List<JobQuotaSystem>> get(
|
||||||
@Parameter(description = "构建机类型", required = false)
|
@Parameter(description = "构建机类型", required = false)
|
||||||
@PathParam("jobQuotaVmType") JobQuotaVmType jobQuotaVmType,
|
@PathVariable("jobQuotaVmType") JobQuotaVmType jobQuotaVmType,
|
||||||
@Parameter(description = "构建来源", required = false)
|
@Parameter(description = "构建来源", required = false)
|
||||||
@RequestParam("channelCode") String channelCode
|
@RequestParam("channelCode") String channelCode
|
||||||
);
|
);
|
||||||
|
|
||||||
@Operation(summary = "添加系统默认JOB配额信息")
|
@Operation(summary = "添加系统默认JOB配额信息")
|
||||||
@PutMapping("/")
|
@PutMapping("/")
|
||||||
CommonResult<Boolean> add(
|
CommonResult<Boolean> add(
|
||||||
@Parameter(description = "Job配额信息", required = true)
|
@Parameter(description = "Job配额信息", required = true)
|
||||||
JobQuotaSystem jobQuota
|
JobQuotaSystem jobQuota
|
||||||
);
|
);
|
||||||
|
|
||||||
@Operation(summary = "删除系统默认JOB配额信息")
|
@Operation(summary = "删除系统默认JOB配额信息")
|
||||||
@DeleteMapping("/{jobQuotaVmType}")
|
@DeleteMapping("/{jobQuotaVmType}")
|
||||||
CommonResult<Boolean> delete(
|
CommonResult<Boolean> delete(
|
||||||
@Parameter(description = "构建机类型", required = true)
|
@Parameter(description = "构建机类型", required = true)
|
||||||
@PathParam("jobQuotaVmType") JobQuotaVmType jobQuotaVmType,
|
@PathVariable("jobQuotaVmType") JobQuotaVmType jobQuotaVmType,
|
||||||
@Parameter(description = "构建来源", required = false)
|
@Parameter(description = "构建来源", required = false)
|
||||||
@RequestParam("channelCode") String channelCode
|
@RequestParam("channelCode") String channelCode
|
||||||
);
|
);
|
||||||
|
|
||||||
@Operation(summary = "更新系统的JOB配额信息")
|
@Operation(summary = "更新系统的JOB配额信息")
|
||||||
@PostMapping("/{jobQuotaVmType}")
|
@PostMapping("/{jobQuotaVmType}")
|
||||||
CommonResult<Boolean> update(
|
CommonResult<Boolean> update(
|
||||||
@Parameter(description = "构建机类型", required = true)
|
@Parameter(description = "构建机类型", required = true)
|
||||||
@PathParam("jobQuotaVmType") JobQuotaVmType jobQuotaVmType,
|
@PathVariable("jobQuotaVmType") JobQuotaVmType jobQuotaVmType,
|
||||||
@Parameter(description = "Job配额信息", required = true)
|
@Parameter(description = "Job配额信息", required = true)
|
||||||
JobQuotaSystem jobQuota
|
JobQuotaSystem jobQuota
|
||||||
);
|
);
|
||||||
|
|
||||||
@Operation(summary = "清零当月已运行时间")
|
@Operation(summary = "清零当月已运行时间")
|
||||||
@PostMapping("/clear/vm/{vmType}")
|
@PostMapping("/clear/vm/{vmType}")
|
||||||
CommonResult<Boolean> restore(
|
CommonResult<Boolean> restore(
|
||||||
@Parameter(description = "构建机类型", required = true)
|
@Parameter(description = "构建机类型", required = true)
|
||||||
@PathParam("vmType") JobQuotaVmType vmType
|
@PathVariable("vmType") JobQuotaVmType vmType
|
||||||
);
|
);
|
||||||
}
|
}
|
@ -1,25 +1,16 @@
|
|||||||
package cd.casic.pipeline.dispatch.api;
|
package cd.casic.pipeline.dispatch.api;
|
||||||
|
|
||||||
|
|
||||||
import cd.casic.framework.commons.pojo.CommonResult;
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
import cd.casic.framework.commons.pojo.PageResult;
|
import cd.casic.framework.commons.pojo.PageResult;
|
||||||
import cd.casic.pipeline.dispatch.pojo.thirdpartyagent.AgentBuildInfo;
|
import cd.casic.pipeline.dispatch.pojo.thirdpartyagent.AgentBuildInfo;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.Parameter;
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import jakarta.websocket.server.PathParam;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
|
||||||
* @author by mianbin
|
|
||||||
* @Classname ServiceAgentResource
|
|
||||||
* @Description TODO
|
|
||||||
* @Date 2025/4/8 17:30
|
|
||||||
*/
|
|
||||||
@Tag(name = "SERVICE_AGENT", description = "服务-Agent")
|
@Tag(name = "SERVICE_AGENT", description = "服务-Agent")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/service/agents")
|
@RequestMapping("/service/agents")
|
||||||
@ -29,7 +20,7 @@ public interface ServiceAgentResource {
|
|||||||
@GetMapping("/{agentId}/listBuilds")
|
@GetMapping("/{agentId}/listBuilds")
|
||||||
PageResult<AgentBuildInfo> listAgentBuild(
|
PageResult<AgentBuildInfo> listAgentBuild(
|
||||||
@Parameter(description = "agent Hash ID", required = true)
|
@Parameter(description = "agent Hash ID", required = true)
|
||||||
@PathParam("agentId") String agentId,
|
@PathVariable("agentId") String agentId,
|
||||||
@Parameter(description = "筛选此状态,支持4种输入(QUEUE,RUNNING,DONE,FAILURE)", required = false)
|
@Parameter(description = "筛选此状态,支持4种输入(QUEUE,RUNNING,DONE,FAILURE)", required = false)
|
||||||
@RequestParam("status") String status,
|
@RequestParam("status") String status,
|
||||||
@Parameter(description = "筛选此pipelineId", required = false)
|
@Parameter(description = "筛选此pipelineId", required = false)
|
||||||
|
@ -8,12 +8,6 @@ import org.springframework.web.bind.annotation.PostMapping;
|
|||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
/**
|
|
||||||
* @author by mianbin
|
|
||||||
* @Classname ServiceDispatchJobResource
|
|
||||||
* @Description TODO
|
|
||||||
* @Date 2025/4/8 17:36
|
|
||||||
*/
|
|
||||||
@Tag(name = "SERVICE_AGENT", description = "服务-Agent")
|
@Tag(name = "SERVICE_AGENT", description = "服务-Agent")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/service/dispatch/jobs")
|
@RequestMapping("/service/dispatch/jobs")
|
||||||
@ -26,4 +20,3 @@ public interface ServiceDispatchJobResource {
|
|||||||
AgentStartMonitor agentStartMonitor
|
AgentStartMonitor agentStartMonitor
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,19 +1,13 @@
|
|||||||
package cd.casic.pipeline.dispatch.api;
|
package cd.casic.pipeline.dispatch.api;
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
import cd.casic.pipeline.dispatch.pojo.enums.JobQuotaVmType;
|
import cd.casic.pipeline.dispatch.pojo.enums.JobQuotaVmType;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.Parameter;
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import jakarta.websocket.server.PathParam;
|
|
||||||
import kotlin.Result;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
/**
|
|
||||||
* @author by mianbin
|
|
||||||
* @Classname ServiceJobQuotaBusinessResource
|
|
||||||
* @Description TODO
|
|
||||||
* @Date 2025/4/8 17:37
|
|
||||||
*/
|
|
||||||
@Tag(name = "BUILD_JOBS_PROJECT_QUOTA", description = "Job配额管理")
|
@Tag(name = "BUILD_JOBS_PROJECT_QUOTA", description = "Job配额管理")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/service/quotas/running")
|
@RequestMapping("/service/quotas/running")
|
||||||
@ -21,7 +15,7 @@ public interface ServiceJobQuotaBusinessResource {
|
|||||||
|
|
||||||
@Operation(summary = "上报一个JOB启动")
|
@Operation(summary = "上报一个JOB启动")
|
||||||
@PostMapping("/job/projects/{projectId}/vmTypes/{vmType}/builds/{buildId}/vmSeqs/{vmSeqId}")
|
@PostMapping("/job/projects/{projectId}/vmTypes/{vmType}/builds/{buildId}/vmSeqs/{vmSeqId}")
|
||||||
Result<Boolean> checkAndAddRunningJob(
|
CommonResult<Boolean> checkAndAddRunningJob(
|
||||||
@Parameter(description = "projectId", required = true)
|
@Parameter(description = "projectId", required = true)
|
||||||
@PathVariable("projectId") String projectId,
|
@PathVariable("projectId") String projectId,
|
||||||
@Parameter(description = "vmType", required = true)
|
@Parameter(description = "vmType", required = true)
|
||||||
@ -42,13 +36,13 @@ public interface ServiceJobQuotaBusinessResource {
|
|||||||
|
|
||||||
@Operation(summary = "上报一个JOB结束")
|
@Operation(summary = "上报一个JOB结束")
|
||||||
@DeleteMapping("/job/projects/{projectId}/pipelines/{pipelineId}/builds/{buildId}/vmSeqs/{vmSeqId}")
|
@DeleteMapping("/job/projects/{projectId}/pipelines/{pipelineId}/builds/{buildId}/vmSeqs/{vmSeqId}")
|
||||||
Result<Boolean> removeRunningJob(
|
CommonResult<Boolean> removeRunningJob(
|
||||||
@Parameter(description = "projectId", required = true)
|
@Parameter(description = "projectId", required = true)
|
||||||
@PathVariable("projectId") String projectId,
|
@PathVariable("projectId") String projectId,
|
||||||
@Parameter(description = "pipelineId", required = true)
|
@Parameter(description = "pipelineId", required = true)
|
||||||
@PathVariable("pipelineId") String pipelineId,
|
@PathVariable("pipelineId") String pipelineId,
|
||||||
@Parameter(description = "buildId", required = true)
|
@Parameter(description = "buildId", required = true)
|
||||||
@PathParam("buildId") String buildId,
|
@PathVariable("buildId") String buildId,
|
||||||
@Parameter(description = "vmSeqId", required = false)
|
@Parameter(description = "vmSeqId", required = false)
|
||||||
@PathVariable("vmSeqId") String vmSeqId,
|
@PathVariable("vmSeqId") String vmSeqId,
|
||||||
@Parameter(description = "executeCount", required = true)
|
@Parameter(description = "executeCount", required = true)
|
||||||
|
@ -1,60 +0,0 @@
|
|||||||
package cd.casic.pipeline.dispatch.constants;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author by mianbin
|
|
||||||
* @Classname Constants
|
|
||||||
* @Description TODO
|
|
||||||
* @Date 2025/4/8 16:46
|
|
||||||
*/
|
|
||||||
public class Constants {
|
|
||||||
|
|
||||||
public static final String QUEUE_BUILD = "queue_build";
|
|
||||||
public static final String QUEUE_BUILD_NEED_END = "queue_build_need_end";
|
|
||||||
public static final String EXCHANGE_BUILD = "exchange_build";
|
|
||||||
public static final String ROUTE_BUILD = "build";
|
|
||||||
public static final String ROUTE_BUILD_NEED_END = "build_need_end";
|
|
||||||
public static final String EXCHANGE_BUILD_ABORT = "exchange_build_abort";
|
|
||||||
public static final String ROUTE_BUILD_ABORT = "route_build_abort";
|
|
||||||
public static final String QUEUE_BUILD_ABORT = "queue_build_abort";
|
|
||||||
public static final String QUEUE_TASK_BEGIN = "queue_dispatch_vm_task_begin";
|
|
||||||
public static final String QUEUE_TASK_END = "queue_dispatch_vm_task_end";
|
|
||||||
public static final String QUEUE_TASK_NEDD_END = "queue_dispatch_vm_task_need_end";
|
|
||||||
public static final String EXCHANGE_TASK = "exchange_vm_task";
|
|
||||||
public static final String ROUTE_TASK_BEGIN = "dispatch_vm_task_begin";
|
|
||||||
public static final String ROUTE_TASK_END = "dispatch_vm_task_end";
|
|
||||||
public static final String ROUTE_TASK_NEDD_END = "dispatch_vm_task_need_end";
|
|
||||||
public static final String ENV_PUBLIC_HOST_MAX_ATOM_FILE_CACHE_SIZE = "PUBLIC_HOST_MAX_ATOM_FILE_CACHE_SIZE";
|
|
||||||
public static final String ENV_THIRD_HOST_MAX_ATOM_FILE_CACHE_SIZE = "THIRD_HOST_MAX_ATOM_FILE_CACHE_SIZE";
|
|
||||||
// |Docker构建|最大并行构建量(maximum parallelism)/当前正在运行构建数量(Running):
|
|
||||||
public static final String OPS_DOCKER_BUILD_VOLUME = "OpsDockerBuildVolume";
|
|
||||||
// |最大并行构建量(maximum parallelism)/当前正在运行构建数量(Running):
|
|
||||||
public static final String OPS_MAXIMUM_PARALLELISM = "OpsMaximumParallelism";
|
|
||||||
public static final String OPS_UNLIMITED = "OpsUnlimited"; // 无限制(unlimited), 注意负载(Attention)
|
|
||||||
public static final String OPS_HEARTBEAT_TIME = "opsHeartbeatTime"; // 构建机最近心跳时间(heartbeat Time)
|
|
||||||
public static final String OPS_DOCKER_WAS_RECENTLY_BUILT = "opsDockerWasRecentlyBuilt"; // |Docker构建|最近{0}次运行中的构建:
|
|
||||||
public static final String OPS_WAS_RECENTLY_BUILT = "opsWasRecentlyBuilt"; // |最近{0}次运行中的构建:
|
|
||||||
public static final String OPS_TASK_FETCHING_TIMEOUT = "opsTaskFetchingTimeout"; // 任务领取超过{0} 分钟没有启动, 可能存在异常,开始重置
|
|
||||||
public static final String OPS_SCHEDULING_SELECTED_AGENT = "opsSchedulingSelectedAgent"; // 调度构建机(Scheduling selected Agent): {0}/{1}
|
|
||||||
public static final String OPS_SEARCHING_AGENT = "opsSearchingAgent"; // 开始查找最近使用过并且当前没有任何任务的空闲构建机...
|
|
||||||
public static final String OPS_MAX_BUILD_SEARCHING_AGENT = "opsMaxBuildSearchingAgent"; // 查找最近使用过并且未达到最大构建数的构建机...
|
|
||||||
public static final String OPS_SEARCHING_AGENT_MOST_IDLE = "opsSearchingAgentMostIdle"; // 开始查找没有任何任务的空闲构建机...
|
|
||||||
public static final String OPS_SEARCHING_AGENT_PARALLEL_AVAILABLE = "opsSearchingAgentParallelAvailable"; // 开始查找当前构建任务还没到达最大并行数构建机...
|
|
||||||
public static final String OPS_NO_AGENT_AVAILABLE = "opsNoAgentAvailable"; // 没有可用Agent,等待Agent释放...
|
|
||||||
public static final String OPS_ENV_BUSY = "opsEnvBusy"; // 构建环境并发保护,稍后重试...
|
|
||||||
public static final String OPS_QUEUE_TIMEOUT_MINUTES = "opsQueueTimeoutMinutes"; // 构建环境无可分配构建机,等待超时(queue-timeout-minutes={0})
|
|
||||||
public static final String OPS_AGENT_IS_BUSY = "opsAgentIsBusy"; // 构建机繁忙,继续重试(Agent is busy)
|
|
||||||
public static final String OPS_BUILD_AGENT_DETAIL_LINK_ERROR = "opsBuildAgentDetailLinkError"; // 构建机Agent详情链接
|
|
||||||
public static final String OPS_ENV_WORKER_ERROR_IGNORE = "opsEnvWorkerErrorIgnore"; // 构建机环境中{0}节点启动构建进程失败,自动切换其他节点重试
|
|
||||||
public static final String AGENT_REUSE_MUTEX_REDISPATCH = "agentReuseMuteXRedispatch"; // 构建机复用互斥,节点 {0} 已被 {1} 构建使用,重新调度
|
|
||||||
// 构建机复用互斥,等待被依赖的节点 {0} 调度到具体节点后再进行复用调度
|
|
||||||
public static final String AGENT_REUSE_MUTEX_WAIT_REUSED_ENV = "agentReuseMuteXWaitReusedEnv";
|
|
||||||
public static final String OPS_ENV_NODE_DISABLE = "opsEnvNodeDisable";
|
|
||||||
public static final String OPS_THIRD_JOB_ENV_CURR = "opsThirdJobEnvCurr"; // 当前环境下所有构建机并发{0}已经超过配置的{1},排队{2}分钟
|
|
||||||
public static final String OPS_THIRD_JOB_NODE_CURR = "opsThirdJobNodeCurr"; // 当前环境下所有节点运行任务都超过了配置的{0},排队{1}分钟
|
|
||||||
// 构建机复用互斥,节点 {0} 已被 {1} 构建使用,剩余可调度空间不足,重新调度
|
|
||||||
public static final String AGENT_REUSE_MUTEX_RESERVE_REDISPATCH = "agentReuseMutexReserveRedispatch";
|
|
||||||
// 构建环境调度结束,已选取节点 {0}
|
|
||||||
public static final String OPS_ENV_DISPATCH_AGENT = "opsEnvDispatchAgent";
|
|
||||||
// 尝试下发任务至节点 {0}
|
|
||||||
public static final String TRY_AGENT_DISPATCH = "tryAgentDispatch";
|
|
||||||
}
|
|
@ -0,0 +1,45 @@
|
|||||||
|
package cd.casic.pipeline.dispatch.constants;
|
||||||
|
|
||||||
|
public class DispatchConstants {
|
||||||
|
public static final String QUEUE_BUILD = "queue_build";
|
||||||
|
public static final String QUEUE_BUILD_NEED_END = "queue_build_need_end";
|
||||||
|
public static final String EXCHANGE_BUILD = "exchange_build";
|
||||||
|
public static final String ROUTE_BUILD = "build";
|
||||||
|
public static final String ROUTE_BUILD_NEED_END = "build_need_end";
|
||||||
|
public static final String EXCHANGE_BUILD_ABORT = "exchange_build_abort";
|
||||||
|
public static final String ROUTE_BUILD_ABORT = "route_build_abort";
|
||||||
|
public static final String QUEUE_BUILD_ABORT = "queue_build_abort";
|
||||||
|
public static final String QUEUE_TASK_BEGIN = "queue_dispatch_vm_task_begin";
|
||||||
|
public static final String QUEUE_TASK_END = "queue_dispatch_vm_task_end";
|
||||||
|
public static final String QUEUE_TASK_NEDD_END = "queue_dispatch_vm_task_need_end";
|
||||||
|
public static final String EXCHANGE_TASK = "exchange_vm_task";
|
||||||
|
public static final String ROUTE_TASK_BEGIN = "dispatch_vm_task_begin";
|
||||||
|
public static final String ROUTE_TASK_END = "dispatch_vm_task_end";
|
||||||
|
public static final String ROUTE_TASK_NEDD_END = "dispatch_vm_task_need_end";
|
||||||
|
// |Docker构建|最大并行构建量(maximum parallelism)/当前正在运行构建数量(Running):
|
||||||
|
public static final String DOCKER_BUILD_VOLUME = "DockerBuildVolume";
|
||||||
|
// |最大并行构建量(maximum parallelism)/当前正在运行构建数量(Running):
|
||||||
|
public static final String MAXIMUM_PARALLELISM = "MaximumParallelism";
|
||||||
|
public static final String UNLIMITED = "Unlimited"; // 无限制(unlimited), 注意负载(Attention)
|
||||||
|
public static final String HEARTBEAT_TIME = "HeartbeatTime"; // 构建机最近心跳时间(heartbeat Time)
|
||||||
|
public static final String DOCKER_WAS_RECENTLY_BUILT = "DockerWasRecentlyBuilt"; // |Docker构建|最近{0}次运行中的构建:
|
||||||
|
public static final String WAS_RECENTLY_BUILT = "WasRecentlyBuilt"; // |最近{0}次运行中的构建:
|
||||||
|
public static final String TASK_FETCHING_TIMEOUT = "TaskFetchingTimeout"; // 任务领取超过{0} 分钟没有启动, 可能存在异常,开始重置
|
||||||
|
public static final String SCHEDULING_SELECTED_AGENT = "SchedulingSelectedAgent"; // 调度构建机(Scheduling selected Agent): {0}/{1}
|
||||||
|
public static final String SEARCHING_AGENT = "SearchingAgent"; // 开始查找最近使用过并且当前没有任何任务的空闲构建机...
|
||||||
|
public static final String MAX_BUILD_SEARCHING_AGENT = "MaxBuildSearchingAgent"; // 查找最近使用过并且未达到最大构建数的构建机...
|
||||||
|
public static final String SEARCHING_AGENT_MOST_IDLE = "SearchingAgentMostIdle"; // 开始查找没有任何任务的空闲构建机...
|
||||||
|
public static final String SEARCHING_AGENT_PARALLEL_AVAILABLE = "SearchingAgentParallelAvailable"; // 开始查找当前构建任务还没到达最大并行数构建机...
|
||||||
|
public static final String NO_AGENT_AVAILABLE = "NoAgentAvailable"; // 没有可用Agent,等待Agent释放...
|
||||||
|
public static final String ENV_BUSY = "EnvBusy"; // 构建环境并发保护,稍后重试...
|
||||||
|
public static final String QUEUE_TIMEOUT_MINUTES = "QueueTimeoutMinutes"; // 构建环境无可分配构建机,等待超时(queue-timeout-minutes={0})
|
||||||
|
public static final String AGENT_IS_BUSY = "AgentIsBusy"; // 构建机繁忙,继续重试(Agent is busy)
|
||||||
|
public static final String BUILD_AGENT_DETAIL_LINK_ERROR = "BuildAgentDetailLinkError"; // 构建机Agent详情链接
|
||||||
|
public static final String ENV_WORKER_ERROR_IGNORE = "EnvWorkerErrorIgnore"; // 构建机环境中{0}节点启动构建进程失败,自动切换其他节点重试
|
||||||
|
public static final String AGENT_REUSE_MUTEX_REDISPATCH = "agentReuseMuteXRedispatch"; // 构建机复用互斥,节点 {0} 已被 {1} 构建使用,重新调度
|
||||||
|
// 构建机复用互斥,等待被依赖的节点 {0} 调度到具体节点后再进行复用调度
|
||||||
|
public static final String AGENT_REUSE_MUTEX_WAIT_REUSED_ENV = "agentReuseMuteXWaitReusedEnv"; // 构建机复用互斥,等待被依赖的节点 {0} 调度到具体节点后再进行复用调度
|
||||||
|
public static final String ENV_NODE_DISABLE = "EnvNodeDisable";
|
||||||
|
public static final String THIRD_JOB_ENV_CURR = "ThirdJobEnvCurr"; // 当前环境下所有构建机并发{0}已经超过配置的{1},排队{2}分钟
|
||||||
|
public static final String THIRD_JOB_NODE_CURR = "ThirdJobNodeCurr"; // 当前环境下所有节点运行任务都超过了配置的{0},排队{1}分钟
|
||||||
|
}
|
@ -15,7 +15,7 @@ import lombok.NoArgsConstructor;
|
|||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
class AskEnable {
|
public class AskEnable {
|
||||||
private String build;
|
private String build;
|
||||||
private boolean upgrade;
|
private boolean upgrade;
|
||||||
private boolean dockerDebug;
|
private boolean dockerDebug;
|
||||||
|
@ -16,7 +16,7 @@ import lombok.NoArgsConstructor;
|
|||||||
@Data
|
@Data
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
class ThirdPartyAskResp {
|
public class ThirdPartyAskResp {
|
||||||
private AskHeartbeatResponse heartbeat;
|
private AskHeartbeatResponse heartbeat;
|
||||||
private ThirdPartyBuildInfo build;
|
private ThirdPartyBuildInfo build;
|
||||||
private UpgradeItem upgrade;
|
private UpgradeItem upgrade;
|
||||||
|
@ -17,7 +17,7 @@ import lombok.NoArgsConstructor;
|
|||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
class ThirdPartyBuildDockerInfoCredential {
|
public class ThirdPartyBuildDockerInfoCredential {
|
||||||
private String user;
|
private String user;
|
||||||
private String password;
|
private String password;
|
||||||
private String errMsg;
|
private String errMsg;
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
<groupId>cd.casic.boot</groupId>
|
<groupId>cd.casic.boot</groupId>
|
||||||
<artifactId>modules</artifactId>
|
<artifactId>modules</artifactId>
|
||||||
<version>${revision}</version>
|
<version>${revision}</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>module-ci-environment</artifactId>
|
<artifactId>module-ci-environment</artifactId>
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
<groupId>cd.casic.boot</groupId>
|
<groupId>cd.casic.boot</groupId>
|
||||||
<artifactId>modules</artifactId>
|
<artifactId>modules</artifactId>
|
||||||
<version>${revision}</version>
|
<version>${revision}</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>module-ci-event</artifactId>
|
<artifactId>module-ci-event</artifactId>
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
<groupId>cd.casic.boot</groupId>
|
<groupId>cd.casic.boot</groupId>
|
||||||
<artifactId>modules</artifactId>
|
<artifactId>modules</artifactId>
|
||||||
<version>${revision}</version>
|
<version>${revision}</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>module-ci-log</artifactId>
|
<artifactId>module-ci-log</artifactId>
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
<groupId>cd.casic.boot</groupId>
|
<groupId>cd.casic.boot</groupId>
|
||||||
<artifactId>modules</artifactId>
|
<artifactId>modules</artifactId>
|
||||||
<version>${revision}</version>
|
<version>${revision}</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>module-ci-market</artifactId>
|
<artifactId>module-ci-market</artifactId>
|
||||||
|
@ -9,7 +9,6 @@
|
|||||||
<version>${revision}</version>
|
<version>${revision}</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<groupId>cd.casic.pipeline</groupId>
|
|
||||||
<artifactId>module-ci-process-biz</artifactId>
|
<artifactId>module-ci-process-biz</artifactId>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -9,6 +9,7 @@ import cd.casic.ci.process.api.process.pojo.BuildTask;
|
|||||||
import cd.casic.ci.process.api.process.pojo.BuildTaskResult;
|
import cd.casic.ci.process.api.process.pojo.BuildTaskResult;
|
||||||
import cd.casic.ci.process.api.process.pojo.BuildVariables;
|
import cd.casic.ci.process.api.process.pojo.BuildVariables;
|
||||||
import kotlin.Result;
|
import kotlin.Result;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author by mianbin
|
* @author by mianbin
|
||||||
@ -16,9 +17,11 @@ import kotlin.Result;
|
|||||||
* @Description TODO
|
* @Description TODO
|
||||||
* @Date 2025/4/7 19:01
|
* @Date 2025/4/7 19:01
|
||||||
*/
|
*/
|
||||||
|
@Slf4j
|
||||||
public class BuildJobResourceImpl implements BuildJobResource {
|
public class BuildJobResourceImpl implements BuildJobResource {
|
||||||
@Override
|
@Override
|
||||||
public Result<BuildVariables> jobStarted(String projectId, String buildId, String vmSeqId, String vmName, String retryCount) {
|
public Result<BuildVariables> jobStarted(String projectId, String buildId, String vmSeqId, String vmName, String retryCount) {
|
||||||
|
log.info("$()|$()|$())|$()|callback pipeline event", projectId, buildId, vmSeqId, vmName);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
<groupId>cd.casic.boot</groupId>
|
<groupId>cd.casic.boot</groupId>
|
||||||
<artifactId>modules</artifactId>
|
<artifactId>modules</artifactId>
|
||||||
<version>${revision}</version>
|
<version>${revision}</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>module-ci-project</artifactId>
|
<artifactId>module-ci-project</artifactId>
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
<groupId>cd.casic.boot</groupId>
|
<groupId>cd.casic.boot</groupId>
|
||||||
<artifactId>modules</artifactId>
|
<artifactId>modules</artifactId>
|
||||||
<version>${revision}</version>
|
<version>${revision}</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>module-ci-quality</artifactId>
|
<artifactId>module-ci-quality</artifactId>
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
<groupId>cd.casic.boot</groupId>
|
<groupId>cd.casic.boot</groupId>
|
||||||
<artifactId>modules</artifactId>
|
<artifactId>modules</artifactId>
|
||||||
<version>${revision}</version>
|
<version>${revision}</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>module-ci-repository</artifactId>
|
<artifactId>module-ci-repository</artifactId>
|
||||||
|
@ -0,0 +1,12 @@
|
|||||||
|
package cd.casic.ci.log.scm.dal.pojo.enums;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@AllArgsConstructor
|
||||||
|
public enum VisibilityLevelEnum {
|
||||||
|
PRIVATE(0), // 私有
|
||||||
|
LOGIN_PUBLIC(10); // 登录用户开源
|
||||||
|
private Integer level;
|
||||||
|
}
|
44
modules/module-ci-store-api/pom.xml
Normal file
44
modules/module-ci-store-api/pom.xml
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>cd.casic.boot</groupId>
|
||||||
|
<artifactId>modules</artifactId>
|
||||||
|
<version>${revision}</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>module-ci-store-api</artifactId>
|
||||||
|
|
||||||
|
<name>${project.artifactId}</name>
|
||||||
|
|
||||||
|
<version>${revision}</version>
|
||||||
|
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>cd.casic.boot</groupId>
|
||||||
|
<artifactId>module-ci-common-pipeline</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>cd.casic.boot</groupId>
|
||||||
|
<artifactId>module-ci-repository</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- 参数校验 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-validation</artifactId>
|
||||||
|
<optional>true</optional>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>cd.casic.boot</groupId>
|
||||||
|
<artifactId>module-ci-log</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
|
||||||
|
</project>
|
@ -0,0 +1,35 @@
|
|||||||
|
package cd.casic.pipeline.store.api.atom;
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
import cd.casic.pipeline.store.pojo.atom.AtomDevLanguageEnvVar;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.enums.BuildHostOsEnum;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.enums.BuildHostTypeEnum;
|
||||||
|
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.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Tag(name = "BUILD_ATOM_DEV_LANGUAGE_ENV_VAR", description = "插件-开发语言环境变量")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/build/market/atom/dev/language/env/var")
|
||||||
|
public interface BuildAtomDevLanguageEnvVarResource {
|
||||||
|
|
||||||
|
@Operation(summary = "获取插件开发语言相关的环境变量")
|
||||||
|
@GetMapping("/languages/{language}/types/{buildHostType}/oss/{buildHostOs}")
|
||||||
|
CommonResult<List<AtomDevLanguageEnvVar>> getAtomDevLanguageEnvVars(
|
||||||
|
@Parameter(description = "开发语言", required = true)
|
||||||
|
@PathVariable("language")
|
||||||
|
String language,
|
||||||
|
@Parameter(description = "适用构建机类型", required = true)
|
||||||
|
@PathVariable("buildHostType")
|
||||||
|
BuildHostTypeEnum buildHostType,
|
||||||
|
@Parameter(description = "适用构建机操作系统", required = true)
|
||||||
|
@PathVariable("buildHostOs")
|
||||||
|
BuildHostOsEnum buildHostOs
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
package cd.casic.pipeline.store.api.atom;
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
import cd.casic.pipeline.store.pojo.atom.Atom;
|
||||||
|
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.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
|
||||||
|
@Tag(name = "BUILD_ATOM", description = "插件-构建")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/build/market/atom")
|
||||||
|
public interface BuildAtomResource {
|
||||||
|
|
||||||
|
@Operation(summary = "获取插件详情")
|
||||||
|
@GetMapping("/{atomCode}")
|
||||||
|
CommonResult<Atom> getAtom(
|
||||||
|
@Parameter(description = "插件代码", required = true)
|
||||||
|
@PathVariable("atomCode")
|
||||||
|
String atomCode
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
package cd.casic.pipeline.store.api.atom;
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
import cd.casic.pipeline.store.pojo.atom.AtomEnv;
|
||||||
|
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.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
|
||||||
|
@Tag(name = "BUILD_MARKET_ATOM_ENV", description = "插件-构建市场环境变量")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/build/market/atom/env")
|
||||||
|
public interface BuildMarketAtomEnvResource {
|
||||||
|
|
||||||
|
@Operation(summary = "获取插件环境变量")
|
||||||
|
@GetMapping("/{atomCode}")
|
||||||
|
CommonResult<AtomEnv> getAtomEnv(
|
||||||
|
@Parameter(description = "插件代码", required = true)
|
||||||
|
@PathVariable("atomCode")
|
||||||
|
String atomCode
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,25 @@
|
|||||||
|
package cd.casic.pipeline.store.api.atom;
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
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.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
|
||||||
|
@Tag(name = "OP_ATOM_REPLACE", description = "插件-运营替换")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/op/market/atom/replace")
|
||||||
|
public interface OpAtomReplaceResource {
|
||||||
|
|
||||||
|
@Operation(summary = "替换插件")
|
||||||
|
@PostMapping("/{atomCode}")
|
||||||
|
CommonResult<Boolean> replaceAtom(
|
||||||
|
@Parameter(description = "插件代码", required = true)
|
||||||
|
@PathVariable("atomCode")
|
||||||
|
String atomCode
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,25 @@
|
|||||||
|
package cd.casic.pipeline.store.api.atom;
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
import cd.casic.pipeline.store.pojo.atom.Atom;
|
||||||
|
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.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
@Tag(name = "OP_ATOM", description = "插件-运营")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/op/market/atom")
|
||||||
|
public interface OpAtomResource {
|
||||||
|
|
||||||
|
@Operation(summary = "获取插件详情")
|
||||||
|
@GetMapping("/{atomCode}")
|
||||||
|
CommonResult<Atom> getAtom(
|
||||||
|
@Parameter(description = "插件代码", required = true)
|
||||||
|
@PathVariable("atomCode")
|
||||||
|
String atomCode
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,25 @@
|
|||||||
|
package cd.casic.pipeline.store.api.atom;
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
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.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
|
||||||
|
@Tag(name = "OP_ATOM_STATISTIC", description = "插件-运营统计")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/op/market/atom/statistic")
|
||||||
|
public interface OpAtomStatisticResource {
|
||||||
|
|
||||||
|
@Operation(summary = "获取插件统计信息")
|
||||||
|
@GetMapping("/{atomCode}")
|
||||||
|
CommonResult<Object> getAtomStatistic(
|
||||||
|
@Parameter(description = "插件代码", required = true)
|
||||||
|
@PathVariable("atomCode")
|
||||||
|
String atomCode
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
package cd.casic.pipeline.store.api.atom;
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
import cd.casic.pipeline.store.pojo.atom.Atom;
|
||||||
|
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.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
|
||||||
|
@Tag(name = "SERVICE_ATOM", description = "插件-服务")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/service/market/atom")
|
||||||
|
public interface ServiceAtomResource {
|
||||||
|
|
||||||
|
@Operation(summary = "获取插件详情")
|
||||||
|
@GetMapping("/{atomCode}")
|
||||||
|
CommonResult<Atom> getAtom(
|
||||||
|
@Parameter(description = "插件代码", required = true)
|
||||||
|
@PathVariable("atomCode")
|
||||||
|
String atomCode
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,25 @@
|
|||||||
|
package cd.casic.pipeline.store.api.atom;
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
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.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
|
||||||
|
@Tag(name = "SERVICE_MARKET_ATOM_ARCHIVE", description = "插件-服务市场归档")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/service/market/atom/archive")
|
||||||
|
public interface ServiceMarketAtomArchiveResource {
|
||||||
|
|
||||||
|
@Operation(summary = "获取插件归档信息")
|
||||||
|
@GetMapping("/{atomCode}")
|
||||||
|
CommonResult<Object> getAtomArchive(
|
||||||
|
@Parameter(description = "插件代码", required = true)
|
||||||
|
@PathVariable("atomCode")
|
||||||
|
String atomCode
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,25 @@
|
|||||||
|
package cd.casic.pipeline.store.api.atom;
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
import cd.casic.pipeline.store.pojo.atom.AtomEnv;
|
||||||
|
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.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
@Tag(name = "SERVICE_MARKET_ATOM_ENV", description = "插件-服务市场环境变量")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/service/market/atom/env")
|
||||||
|
public interface ServiceMarketAtomEnvResource {
|
||||||
|
|
||||||
|
@Operation(summary = "获取插件环境变量")
|
||||||
|
@GetMapping("/{atomCode}")
|
||||||
|
CommonResult<AtomEnv> getAtomEnv(
|
||||||
|
@Parameter(description = "插件代码", required = true)
|
||||||
|
@PathVariable("atomCode")
|
||||||
|
String atomCode
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
package cd.casic.pipeline.store.api.atom;
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
import cd.casic.pipeline.store.pojo.atom.Atom;
|
||||||
|
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.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
|
||||||
|
@Tag(name = "SERVICE_MARKET_ATOM", description = "插件-服务市场")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/service/market/atom")
|
||||||
|
public interface ServiceMarketAtomResource {
|
||||||
|
|
||||||
|
@Operation(summary = "获取插件详情")
|
||||||
|
@GetMapping("/{atomCode}")
|
||||||
|
CommonResult<Atom> getAtom(
|
||||||
|
@Parameter(description = "插件代码", required = true)
|
||||||
|
@PathVariable("atomCode")
|
||||||
|
String atomCode
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
package cd.casic.pipeline.store.api.atom;
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
|
||||||
|
@Tag(name = "USER_ATOM_CLASSIFY", description = "插件-用户分类")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/user/market/atom/classify")
|
||||||
|
public interface UserAtomClassifyResource {
|
||||||
|
|
||||||
|
@Operation(summary = "获取插件分类信息")
|
||||||
|
@GetMapping("/")
|
||||||
|
CommonResult<Object> getAtomClassify();
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
package cd.casic.pipeline.store.api.atom;
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
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.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
@Tag(name = "USER_ATOM_COMMENT_REPLY", description = "插件-用户评论回复")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/user/market/atom/comment/reply")
|
||||||
|
public interface UserAtomCommentReplyResource {
|
||||||
|
|
||||||
|
@Operation(summary = "回复插件评论")
|
||||||
|
@PostMapping("/{commentId}")
|
||||||
|
CommonResult<Boolean> replyAtomComment(
|
||||||
|
@Parameter(description = "评论ID", required = true)
|
||||||
|
@PathVariable("commentId")
|
||||||
|
Long commentId
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,30 @@
|
|||||||
|
package cd.casic.pipeline.store.api.atom;
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
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.*;
|
||||||
|
|
||||||
|
|
||||||
|
@Tag(name = "USER_ATOM_COMMENT", description = "插件-用户评论")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/user/market/atom/comment")
|
||||||
|
public interface UserAtomCommentResource {
|
||||||
|
|
||||||
|
@Operation(summary = "获取插件评论")
|
||||||
|
@GetMapping("/{atomCode}")
|
||||||
|
CommonResult<Object> getAtomComment(
|
||||||
|
@Parameter(description = "插件代码", required = true)
|
||||||
|
@PathVariable("atomCode")
|
||||||
|
String atomCode
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "添加插件评论")
|
||||||
|
@PostMapping("/{atomCode}")
|
||||||
|
CommonResult<Boolean> addAtomComment(
|
||||||
|
@Parameter(description = "插件代码", required = true)
|
||||||
|
@PathVariable("atomCode")
|
||||||
|
String atomCode
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,30 @@
|
|||||||
|
package cd.casic.pipeline.store.api.atom;
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
import cd.casic.pipeline.store.pojo.atom.AtomCollaboratorCreateReq;
|
||||||
|
import cd.casic.pipeline.store.pojo.atom.AtomCollaboratorCreateResp;
|
||||||
|
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.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestHeader;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import static cd.casic.ci.common.pipeline.constant.OpsHeader.AUTH_HEADER_USER_ID;
|
||||||
|
|
||||||
|
@Tag(name = "USER_MARKET_ATOM_COOPERATION", description = "插件-插件协作")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/user/market/atom/cooperation")
|
||||||
|
public interface UserAtomCooperationResource {
|
||||||
|
|
||||||
|
@Operation(summary = "为插件添加协作者")
|
||||||
|
@PostMapping("/collaborator")
|
||||||
|
CommonResult<AtomCollaboratorCreateResp> addAtomCollaborator(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "申请成为插件协作者请求报文体", required = true)
|
||||||
|
AtomCollaboratorCreateReq atomCollaboratorCreateReq
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,31 @@
|
|||||||
|
package cd.casic.pipeline.store.api.atom;
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.label.Label;
|
||||||
|
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.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Tag(name = "USER_PIPELINE_ATOM_LABEL", description = "流水线-插件标签")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/user/market/atom/label")
|
||||||
|
public interface UserAtomLabelResource {
|
||||||
|
|
||||||
|
@Operation(summary = "获取所有插件标签信息")
|
||||||
|
@GetMapping("/labels")
|
||||||
|
CommonResult<List<Label>> getAllAtomLabels();
|
||||||
|
|
||||||
|
@Operation(summary = "根据插件ID获取插件标签信息")
|
||||||
|
@GetMapping("/atomIds/{atomId}/labels")
|
||||||
|
CommonResult<List<Label>> getAtomLabelsByAtomId(
|
||||||
|
@Parameter(description = "插件ID", required = true)
|
||||||
|
@PathVariable("atomId")
|
||||||
|
String atomId
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,53 @@
|
|||||||
|
package cd.casic.pipeline.store.api.atom;
|
||||||
|
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
import cd.casic.pipeline.store.pojo.atom.MarketAtomCreateRequest;
|
||||||
|
import cd.casic.pipeline.store.pojo.atom.MarketAtomUpdateRequest;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.publication.StoreProcessInfo;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import jakarta.validation.Valid;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import static cd.casic.ci.common.pipeline.constant.OpsHeader.AUTH_HEADER_USER_ID;
|
||||||
|
|
||||||
|
|
||||||
|
@Tag(name = "USER_MARKET_ATOM", description = "插件市场-插件")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/user/market/")
|
||||||
|
public interface UserAtomReleaseResource {
|
||||||
|
|
||||||
|
@Operation(summary = "插件工作台-新增插件")
|
||||||
|
@PostMapping("/desk/atom/")
|
||||||
|
CommonResult<String> addMarketAtom(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "插件市场工作台-新增插件请求报文体", required = true)
|
||||||
|
@Valid
|
||||||
|
MarketAtomCreateRequest marketAtomCreateRequest
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "插件工作台-升级插件")
|
||||||
|
@PutMapping("/desk/atom/")
|
||||||
|
CommonResult<String> updateMarketAtom(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "项目代码", required = true)
|
||||||
|
@RequestParam("projectCode")
|
||||||
|
String projectCode,
|
||||||
|
@Parameter(description = "插件市场工作台-新增插件请求报文体", required = true)
|
||||||
|
MarketAtomUpdateRequest marketAtomUpdateRequest
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "根据插件版本ID获取插件版本进度")
|
||||||
|
@GetMapping("/desk/atom/release/process/{atomId}")
|
||||||
|
CommonResult<StoreProcessInfo> getAtomReleaseProcess(
|
||||||
|
@Parameter(description = "插件版本ID", required = true)
|
||||||
|
@PathVariable("atomId")
|
||||||
|
String atomId
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,34 @@
|
|||||||
|
package cd.casic.pipeline.store.api.atom;
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.PageResult;
|
||||||
|
import cd.casic.pipeline.store.pojo.atom.AtomRespItem;
|
||||||
|
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.ci.common.pipeline.constant.OpsHeader.AUTH_HEADER_USER_ID;
|
||||||
|
|
||||||
|
|
||||||
|
@Tag(name = "USER_PIPELINE_ATOM", description = "流水线-插件")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/user/pipeline/atom")
|
||||||
|
public interface UserAtomResource {
|
||||||
|
|
||||||
|
@Operation(summary = "获取所有流水线插件信息")
|
||||||
|
@GetMapping("/")
|
||||||
|
PageResult<AtomRespItem> listAllPipelineAtoms(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "支持的服务范围(pipeline/quality/all 分别表示流水线/质量红线/全部)", required = false)
|
||||||
|
@RequestParam("serviceScope")
|
||||||
|
String serviceScope,
|
||||||
|
@Parameter(description = "job类型,AGENT: 编译环境,AGENT_LESS:无编译环境", required = false)
|
||||||
|
@RequestParam("jobType")
|
||||||
|
String jobType,
|
||||||
|
@Parameter(description = "操作系统(ALL/WINDOWS/LINUX/MACOS)", required = false)
|
||||||
|
@RequestParam("os")
|
||||||
|
String os
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
package cd.casic.pipeline.store.api.atom;
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
import cd.casic.pipeline.store.pojo.atom.MarketAtomClassify;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Tag(name = "USER_MARKET_ATOM_CLASSIFY", description = "插件市场-插件分类")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/user/market/atom/classifys")
|
||||||
|
public interface UserMarketAtomClassifyResource {
|
||||||
|
|
||||||
|
@Operation(summary = "获取所有插件分类信息")
|
||||||
|
@GetMapping("/")
|
||||||
|
CommonResult<List<MarketAtomClassify>> getAllAtomClassifys();
|
||||||
|
}
|
@ -0,0 +1,236 @@
|
|||||||
|
package cd.casic.pipeline.store.api.atom;
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
import cd.casic.framework.commons.pojo.PageResult;
|
||||||
|
import cd.casic.pipeline.store.pojo.atom.*;
|
||||||
|
import cd.casic.pipeline.store.pojo.atom.enums.AtomTypeEnum;
|
||||||
|
import cd.casic.pipeline.store.pojo.atom.enums.MarketAtomSortTypeEnum;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.InstalledProjRespItem;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.MarketMainItem;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.StoreErrorCodeInfo;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.version.StoreShowVersionInfo;
|
||||||
|
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.util.List;
|
||||||
|
|
||||||
|
import static cd.casic.ci.common.pipeline.constant.OpsHeader.AUTH_HEADER_USER_ID;
|
||||||
|
|
||||||
|
|
||||||
|
@Tag(name = "USER_MARKET_ATOM", description = "插件市场-插件")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/user/market/")
|
||||||
|
public interface UserMarketAtomResource {
|
||||||
|
|
||||||
|
@Operation(summary = "获取插件市场首页的数据")
|
||||||
|
@GetMapping("/atom/list/main")
|
||||||
|
CommonResult<List<MarketMainItem>> mainPageList(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "页码", required = false)
|
||||||
|
@RequestParam("page")
|
||||||
|
Integer page,
|
||||||
|
@Parameter(description = "每页数量", required = false)
|
||||||
|
@RequestParam("pageSize")
|
||||||
|
Integer pageSize
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "插件市场搜索插件")
|
||||||
|
@GetMapping("/atom/list/")
|
||||||
|
CommonResult<MarketAtomResp> list(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "搜索关键字", required = false)
|
||||||
|
@RequestParam("keyword")
|
||||||
|
String keyword,
|
||||||
|
@Parameter(description = "插件分类", required = false)
|
||||||
|
@RequestParam("classifyCode")
|
||||||
|
String classifyCode,
|
||||||
|
@Parameter(description = "功能标签", required = false)
|
||||||
|
@RequestParam("labelCode")
|
||||||
|
String labelCode,
|
||||||
|
@Parameter(description = "评分", required = false)
|
||||||
|
@RequestParam("score")
|
||||||
|
Integer score,
|
||||||
|
@Parameter(description = "研发来源", required = false)
|
||||||
|
@RequestParam("rdType")
|
||||||
|
AtomTypeEnum rdType,
|
||||||
|
@Parameter(description = "yaml是否可用", required = false)
|
||||||
|
@RequestParam("yamlFlag")
|
||||||
|
Boolean yamlFlag,
|
||||||
|
@Parameter(description = "是否推荐标识 true:推荐,false:不推荐", required = false)
|
||||||
|
@RequestParam("recommendFlag")
|
||||||
|
Boolean recommendFlag,
|
||||||
|
@Parameter(description = "是否有红线指标", required = false)
|
||||||
|
@RequestParam("qualityFlag")
|
||||||
|
Boolean qualityFlag,
|
||||||
|
@Parameter(description = "排序", required = false)
|
||||||
|
@RequestParam("sortType")
|
||||||
|
MarketAtomSortTypeEnum sortType,
|
||||||
|
@Parameter(description = "页码", required = false)
|
||||||
|
@RequestParam("page")
|
||||||
|
Integer page,
|
||||||
|
@Parameter(description = "每页数量", required = false)
|
||||||
|
@RequestParam("pageSize")
|
||||||
|
Integer pageSize
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "根据用户获取插件工作台插件列表")
|
||||||
|
@GetMapping("/desk/atom/list/")
|
||||||
|
CommonResult<MyAtomResp> listMyAtoms(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "插件名称", required = false)
|
||||||
|
@RequestParam("atomName")
|
||||||
|
String atomName,
|
||||||
|
@Parameter(description = "页码", required = true)
|
||||||
|
@RequestParam("page")
|
||||||
|
Integer page,
|
||||||
|
@Parameter(description = "每页数量", required = true)
|
||||||
|
@RequestParam("pageSize")
|
||||||
|
Integer pageSize
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "根据插件版本ID获取插件详情")
|
||||||
|
@GetMapping("/desk/atom/{atomId}")
|
||||||
|
CommonResult<AtomVersion> getAtomById(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "atomId", required = true)
|
||||||
|
@PathVariable("atomId")
|
||||||
|
String atomId
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "根据插件标识获取插件正式版本详情")
|
||||||
|
@GetMapping("/atom/{atomCode}")
|
||||||
|
CommonResult<AtomVersion> getAtomByCode(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "atomCode", required = true)
|
||||||
|
@PathVariable("atomCode")
|
||||||
|
String atomCode
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "根据插件标识获取插件版本列表")
|
||||||
|
@GetMapping("/atom/version/list/")
|
||||||
|
PageResult<AtomVersionListItem> getAtomVersionsByCode(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "atomCode", required = true)
|
||||||
|
@RequestParam("atomCode")
|
||||||
|
String atomCode,
|
||||||
|
@Parameter(description = "页码", required = true)
|
||||||
|
@RequestParam("page")
|
||||||
|
Integer page,
|
||||||
|
@Parameter(description = "每页数量", required = true)
|
||||||
|
@RequestParam("pageSize")
|
||||||
|
Integer pageSize
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "安装插件到项目")
|
||||||
|
@PostMapping("/atom/install")
|
||||||
|
CommonResult<Boolean> installAtom(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "安装插件到项目请求报文体", required = true)
|
||||||
|
InstallAtomReq installAtomReq
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "根据插件标识获取已安装的项目列表")
|
||||||
|
@GetMapping("/atom/installedProjects/{atomCode}")
|
||||||
|
CommonResult<List<InstalledProjRespItem>> getInstalledProjects(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "atomCode", required = true)
|
||||||
|
@PathVariable("atomCode")
|
||||||
|
String atomCode
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "获取插件支持的语言列表")
|
||||||
|
@GetMapping("/desk/atom/language")
|
||||||
|
CommonResult<List<AtomDevLanguage>> listLanguage();
|
||||||
|
|
||||||
|
@Operation(summary = "删除工作台插件")
|
||||||
|
@DeleteMapping("/desk/atoms/{atomCode}")
|
||||||
|
CommonResult<Boolean> deleteAtom(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "插件代码", required = true)
|
||||||
|
@PathVariable("atomCode")
|
||||||
|
String atomCode
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "根据插件标识获取插件回显版本信息")
|
||||||
|
@GetMapping("/atoms/{atomCode}/showVersionInfo")
|
||||||
|
CommonResult<StoreShowVersionInfo> getAtomShowVersionInfo(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "atomCode", required = true)
|
||||||
|
@PathVariable("atomCode")
|
||||||
|
String atomCode
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "查看插件的yml信息")
|
||||||
|
@GetMapping("/atoms/{atomCode}/yml/detail")
|
||||||
|
CommonResult<String> getAtomYmlInfo(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "atomCode", required = true)
|
||||||
|
@PathVariable("atomCode")
|
||||||
|
String atomCode,
|
||||||
|
@Parameter(description = "是否展示系统自带的yml信息", required = false)
|
||||||
|
@RequestParam("defaultShowFlag")
|
||||||
|
Boolean defaultShowFlag
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "查看插件的yml 2.0信息")
|
||||||
|
@GetMapping("/atoms/{atomCode}/yml/2.0/detail")
|
||||||
|
CommonResult<String> getAtomYmlV2Info(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "atomCode", required = true)
|
||||||
|
@PathVariable("atomCode")
|
||||||
|
String atomCode,
|
||||||
|
@Parameter(description = "是否展示系统自带的yml信息", required = false)
|
||||||
|
@RequestParam("defaultShowFlag")
|
||||||
|
Boolean defaultShowFlag
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "展示插件的outPut参数")
|
||||||
|
@GetMapping("/atoms/{atomCode}/output")
|
||||||
|
CommonResult<List<AtomOutput>> getAtomOutput(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "atomCode", required = true)
|
||||||
|
@PathVariable("atomCode")
|
||||||
|
String atomCode
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "更新插件自定义错误码信息")
|
||||||
|
@PutMapping("/{projectCode}/atom/errorCodeInfo")
|
||||||
|
CommonResult<Boolean> updateAtomErrorCodeInfo(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "projectCode", required = true)
|
||||||
|
@PathVariable("projectCode")
|
||||||
|
String projectCode,
|
||||||
|
@Parameter(description = "插件自定义错误码信息", required = true)
|
||||||
|
StoreErrorCodeInfo storeErrorCodeInfo
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,54 @@
|
|||||||
|
package cd.casic.pipeline.store.api.atom;
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.PageResult;
|
||||||
|
import cd.casic.pipeline.store.pojo.atom.AtomPipeline;
|
||||||
|
import cd.casic.pipeline.store.pojo.atom.AtomPipelineExecInfo;
|
||||||
|
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.ci.common.pipeline.constant.OpsHeader.AUTH_HEADER_USER_ID;
|
||||||
|
|
||||||
|
@Tag(name = "USER_MARKET_ATOM_STATISTIC", description = "插件市场-插件-统计")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/user/market/atom/statistic")
|
||||||
|
public interface UserMarketAtomStatisticResource {
|
||||||
|
|
||||||
|
@Operation(summary = "根据插件代码获取使用的流水线详情 - 所有")
|
||||||
|
@GetMapping("/{atomCode}/pipelines")
|
||||||
|
PageResult<AtomPipeline> getAtomPipelinesByCode(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "插件代码", required = true)
|
||||||
|
@PathVariable("atomCode")
|
||||||
|
String atomCode,
|
||||||
|
@Parameter(description = "第几页", required = false, example = "1")
|
||||||
|
@RequestParam("page")
|
||||||
|
Integer page,
|
||||||
|
@Parameter(description = "每页多少条", required = false, example = "20")
|
||||||
|
@RequestParam("pageSize")
|
||||||
|
Integer pageSize
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "根据插件代码获取对应的流水线信息 - 项目下")
|
||||||
|
@GetMapping("/projectCodes/{projectCode}/atomCodes/{atomCode}/pipelines")
|
||||||
|
PageResult<AtomPipelineExecInfo> getAtomPipelines(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "项目代码", required = true)
|
||||||
|
@PathVariable("projectCode")
|
||||||
|
String projectCode,
|
||||||
|
@Parameter(description = "原子代码", required = true)
|
||||||
|
@PathVariable("atomCode")
|
||||||
|
String atomCode,
|
||||||
|
@Parameter(description = "页码", required = false)
|
||||||
|
@RequestParam("page")
|
||||||
|
Integer page,
|
||||||
|
@Parameter(description = "每页数量", required = false)
|
||||||
|
@RequestParam("pageSize")
|
||||||
|
Integer pageSize
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,93 @@
|
|||||||
|
package cd.casic.pipeline.store.api.common;
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.platform.StoreDockingPlatformRequest;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.publication.PublishersRequest;
|
||||||
|
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.util.List;
|
||||||
|
|
||||||
|
import static cd.casic.ci.common.pipeline.constant.OpsHeader.*;
|
||||||
|
|
||||||
|
@Tag(name = "BUILD_PUBLISHER", description = "build_publisher")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/build/store/publisher/sync")
|
||||||
|
public interface BuildPublishersResource {
|
||||||
|
|
||||||
|
@Operation(summary = "同步新增发布者信息")
|
||||||
|
@PostMapping("/add")
|
||||||
|
CommonResult<Integer> synAddPublisherData(
|
||||||
|
@RequestHeader(AUTH_HEADER_DEVOPS_USER_ID)
|
||||||
|
@Parameter(description = "用户ID", required = true)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "发布者数据同步请求", required = true)
|
||||||
|
List<PublishersRequest> publishers
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "同步删除发布者信息")
|
||||||
|
@DeleteMapping("/delete")
|
||||||
|
CommonResult<Integer> synDeletePublisherData(
|
||||||
|
@RequestHeader(AUTH_HEADER_DEVOPS_USER_ID)
|
||||||
|
@Parameter(description = "用户ID", required = true)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "发布者数据同步请求", required = true)
|
||||||
|
List<PublishersRequest> publishers
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "同步更新发布者信息")
|
||||||
|
@PostMapping("/update")
|
||||||
|
CommonResult<Integer> synUpdatePublisherData(
|
||||||
|
@RequestHeader(AUTH_HEADER_DEVOPS_USER_ID)
|
||||||
|
@Parameter(description = "用户ID", required = true)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "发布者数据同步请求", required = true)
|
||||||
|
List<PublishersRequest> publishers
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "同步新增工具平台信息")
|
||||||
|
@PostMapping("/platforms/add")
|
||||||
|
CommonResult<Integer> synAddPlatformsData(
|
||||||
|
@RequestHeader(AUTH_HEADER_DEVOPS_USER_ID)
|
||||||
|
@Parameter(description = "用户ID", required = true)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "store组件对接平台请求", required = true)
|
||||||
|
List<StoreDockingPlatformRequest> storeDockingPlatformRequests
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "同步删除工具平台信息")
|
||||||
|
@DeleteMapping("/platforms/delete")
|
||||||
|
CommonResult<Integer> synDeletePlatformsData(
|
||||||
|
@RequestHeader(AUTH_HEADER_DEVOPS_USER_ID)
|
||||||
|
@Parameter(description = "用户ID", required = true)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "store组件对接平台请求", required = true)
|
||||||
|
List<StoreDockingPlatformRequest> storeDockingPlatformRequests
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "同步更新工具平台信息")
|
||||||
|
@PostMapping("/platforms/update")
|
||||||
|
CommonResult<Integer> synUpdatePlatformsData(
|
||||||
|
@RequestHeader(AUTH_HEADER_DEVOPS_USER_ID)
|
||||||
|
@Parameter(description = "用户ID", required = true)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "store组件对接平台请求", required = true)
|
||||||
|
List<StoreDockingPlatformRequest> storeDockingPlatformRequests
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "同步更新工具平台logo信息")
|
||||||
|
@PostMapping("/platforms/logo/update")
|
||||||
|
CommonResult<Boolean> synUpdatePlatformsLogoInfo(
|
||||||
|
@RequestHeader(AUTH_HEADER_DEVOPS_USER_ID)
|
||||||
|
@Parameter(description = "用户ID", required = true)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "平台代码", required = true)
|
||||||
|
@RequestParam("platformCode")
|
||||||
|
String platformCode,
|
||||||
|
@Parameter(description = "logoUrl", required = true)
|
||||||
|
@RequestParam("logoUrl")
|
||||||
|
String logoUrl
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,48 @@
|
|||||||
|
package cd.casic.pipeline.store.api.common;
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.platform.StoreDockingPlatformRequest;
|
||||||
|
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.util.List;
|
||||||
|
|
||||||
|
import static cd.casic.ci.common.pipeline.constant.OpsHeader.AUTH_HEADER_DEVOPS_USER_ID;
|
||||||
|
|
||||||
|
@Tag(name = "BUILD_STORE_DOCKING_PLATFORM", description = "build_store_docking_platform")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/build/store/docking/platform/sync")
|
||||||
|
public interface BuildStoreDockingPlatformResource {
|
||||||
|
|
||||||
|
@Operation(summary = "同步新增平台信息")
|
||||||
|
@PostMapping("/add")
|
||||||
|
CommonResult<Integer> synAddPlatformData(
|
||||||
|
@RequestHeader(AUTH_HEADER_DEVOPS_USER_ID)
|
||||||
|
@Parameter(description = "用户ID", required = true)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "store组件对接平台请求", required = true)
|
||||||
|
List<StoreDockingPlatformRequest> storeDockingPlatformRequests
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "同步删除平台信息")
|
||||||
|
@DeleteMapping("/delete")
|
||||||
|
CommonResult<Integer> synDeletePlatformData(
|
||||||
|
@RequestHeader(AUTH_HEADER_DEVOPS_USER_ID)
|
||||||
|
@Parameter(description = "用户ID", required = true)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "store组件对接平台请求", required = true)
|
||||||
|
List<StoreDockingPlatformRequest> storeDockingPlatformRequests
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "同步更新平台信息")
|
||||||
|
@PostMapping("/update")
|
||||||
|
CommonResult<Integer> synUpdatePlatformData(
|
||||||
|
@RequestHeader(AUTH_HEADER_DEVOPS_USER_ID)
|
||||||
|
@Parameter(description = "用户ID", required = true)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "store组件对接平台请求", required = true)
|
||||||
|
List<StoreDockingPlatformRequest> storeDockingPlatformRequests
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
package cd.casic.pipeline.store.api.common;
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
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.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestHeader;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import static cd.casic.ci.common.pipeline.constant.OpsHeader.AUTH_HEADER_DEVOPS_USER_ID;
|
||||||
|
|
||||||
|
@Tag(name = "BUILD_STORE_INDEX_INFO", description = "build_store_index_info")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/build/store/index/info")
|
||||||
|
public interface BuildStoreIndexInfoResource {
|
||||||
|
|
||||||
|
@Operation(summary = "获取store索引信息")
|
||||||
|
@GetMapping("/")
|
||||||
|
CommonResult<Object> getStoreIndexInfo(
|
||||||
|
@RequestHeader(AUTH_HEADER_DEVOPS_USER_ID)
|
||||||
|
@Parameter(description = "用户ID", required = true)
|
||||||
|
String userId
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,62 @@
|
|||||||
|
package cd.casic.pipeline.store.api.common;
|
||||||
|
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.enums.StoreTypeEnum;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.env.StorePkgRunEnvInfo;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.sensitive.SensitiveConfResp;
|
||||||
|
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.util.List;
|
||||||
|
|
||||||
|
import static cd.casic.ci.common.pipeline.constant.OpsHeader.*;
|
||||||
|
|
||||||
|
|
||||||
|
@Tag(name = "BUILD_STORE", description = "build-store")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/build/store/")
|
||||||
|
public interface BuildStoreResource {
|
||||||
|
|
||||||
|
@Operation(summary = "获取敏感数据")
|
||||||
|
@GetMapping("/sensitiveConf/types/{storeType}/codes/{storeCode}")
|
||||||
|
CommonResult<List<SensitiveConfResp>> getSensitiveConf(
|
||||||
|
@RequestHeader(AUTH_HEADER_DEVOPS_BUILD_ID)
|
||||||
|
@Parameter(description = "构建ID", required = true)
|
||||||
|
String buildId,
|
||||||
|
@RequestHeader(AUTH_HEADER_DEVOPS_VM_SEQ_ID)
|
||||||
|
@Parameter(description = "构建环境ID", required = true)
|
||||||
|
String vmSeqId,
|
||||||
|
@PathVariable("storeType")
|
||||||
|
@Parameter(description = "组件类型", required = true)
|
||||||
|
StoreTypeEnum storeType,
|
||||||
|
@PathVariable("storeCode")
|
||||||
|
@Parameter(description = "组件标识", required = true)
|
||||||
|
String storeCode
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "获取组件安装包运行时环境信息")
|
||||||
|
@GetMapping("/pkg/envs/types/{storeType}/languages/{language}/versions/{runtimeVersion}/get")
|
||||||
|
CommonResult<StorePkgRunEnvInfo> getStorePkgRunEnvInfo(
|
||||||
|
@RequestHeader(AUTH_HEADER_DEVOPS_ENV)
|
||||||
|
@Parameter(description = "环境信息", required = false)
|
||||||
|
String devopsEnv,
|
||||||
|
@PathVariable("storeType")
|
||||||
|
@Parameter(description = "组件类型", required = true)
|
||||||
|
StoreTypeEnum storeType,
|
||||||
|
@PathVariable("language")
|
||||||
|
@Parameter(description = "开发语言", required = true)
|
||||||
|
String language,
|
||||||
|
@PathVariable("runtimeVersion")
|
||||||
|
@Parameter(description = "运行时版本", required = true)
|
||||||
|
String runtimeVersion,
|
||||||
|
@RequestParam("osName")
|
||||||
|
@Parameter(description = "支持的操作系统名称", required = true)
|
||||||
|
String osName,
|
||||||
|
@RequestParam("osArch")
|
||||||
|
@Parameter(description = "支持的操作系统架构", required = true)
|
||||||
|
String osArch
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,55 @@
|
|||||||
|
package cd.casic.pipeline.store.api.common;
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.config.BusinessConfigRequest;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.config.BusinessConfigResponse;
|
||||||
|
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.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
@Tag(name = "OP_STORE_BUSINESS_CONFIG", description = "OP-STORE-业务配置")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/op/store/businessConfig")
|
||||||
|
public interface OpBusinessConfigResource {
|
||||||
|
|
||||||
|
@Operation(summary = "添加业务配置(返回是否添加成功)")
|
||||||
|
@PostMapping("/")
|
||||||
|
CommonResult<Boolean> add(
|
||||||
|
@Parameter(description = "业务配置信息请求报文体", required = true)
|
||||||
|
BusinessConfigRequest businessConfigRequest
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "更新业务配置信息(返回受影响的数据条数)")
|
||||||
|
@PutMapping("/ids/{id}")
|
||||||
|
CommonResult<Integer> update(
|
||||||
|
@Parameter(description = "业务配置ID", required = true)
|
||||||
|
@PathVariable("id")
|
||||||
|
int id,
|
||||||
|
@Parameter(description = "业务配置信息请求报文体", required = true)
|
||||||
|
BusinessConfigRequest businessConfigRequest
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "获取所有业务配置信息")
|
||||||
|
@GetMapping("/list")
|
||||||
|
CommonResult<List<BusinessConfigResponse>> listAllBusinessConfigs();
|
||||||
|
|
||||||
|
@Operation(summary = "根据ID获取业务配置信息")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
CommonResult<BusinessConfigResponse> getBusinessConfigById(
|
||||||
|
@Parameter(description = "业务配置ID", required = true)
|
||||||
|
@PathVariable("id")
|
||||||
|
int id
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "根据ID删除业务配置信息(返回受影响的数据条数)")
|
||||||
|
@DeleteMapping("/{id}")
|
||||||
|
CommonResult<Integer> deleteBusinessConfigById(
|
||||||
|
@Parameter(description = "业务配置ID", required = true)
|
||||||
|
@PathVariable("id")
|
||||||
|
int id
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,65 @@
|
|||||||
|
package cd.casic.pipeline.store.api.common;
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.category.Category;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.category.CategoryRequest;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.enums.StoreTypeEnum;
|
||||||
|
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.util.List;
|
||||||
|
|
||||||
|
@Tag(name = "OP_STORE_CATEGORY", description = "OP-STORE-范畴")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/op/store/category")
|
||||||
|
public interface OpCategoryResource {
|
||||||
|
|
||||||
|
@Operation(summary = "添加范畴")
|
||||||
|
@PostMapping("/types/{categoryType}")
|
||||||
|
CommonResult<Boolean> add(
|
||||||
|
@Parameter(description = "类别", required = true)
|
||||||
|
@PathVariable("categoryType")
|
||||||
|
StoreTypeEnum categoryType,
|
||||||
|
@Parameter(description = "范畴信息请求报文体", required = true)
|
||||||
|
CategoryRequest categoryRequest
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "更新范畴信息")
|
||||||
|
@PutMapping("/types/{categoryType}/ids/{id}")
|
||||||
|
CommonResult<Boolean> update(
|
||||||
|
@Parameter(description = "类别", required = true)
|
||||||
|
@PathVariable("categoryType")
|
||||||
|
StoreTypeEnum categoryType,
|
||||||
|
@Parameter(description = "范畴ID", required = true)
|
||||||
|
@PathVariable("id")
|
||||||
|
String id,
|
||||||
|
@Parameter(description = "范畴信息请求报文体", required = true)
|
||||||
|
CategoryRequest categoryRequest
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "获取所有范畴信息")
|
||||||
|
@GetMapping("/types/{categoryType}")
|
||||||
|
CommonResult<List<Category>> listAllCategorys(
|
||||||
|
@Parameter(description = "类别", required = true)
|
||||||
|
@PathVariable("categoryType")
|
||||||
|
StoreTypeEnum categoryType
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "根据ID获取范畴信息")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
CommonResult<Category> getCategoryById(
|
||||||
|
@Parameter(description = "范畴ID", required = true)
|
||||||
|
@RequestParam("id")
|
||||||
|
String id
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "根据ID删除范畴信息")
|
||||||
|
@DeleteMapping("/{id}")
|
||||||
|
CommonResult<Boolean> deleteCategoryById(
|
||||||
|
@Parameter(description = "范畴ID", required = true)
|
||||||
|
@PathVariable("id")
|
||||||
|
String id
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,67 @@
|
|||||||
|
package cd.casic.pipeline.store.api.common;
|
||||||
|
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.classify.Classify;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.classify.ClassifyRequest;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.enums.StoreTypeEnum;
|
||||||
|
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.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
@Tag(name = "OP_STORE_CLASSIFY", description = "OP-STORE-分类")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/op/store/classify")
|
||||||
|
public interface OpClassifyResource {
|
||||||
|
|
||||||
|
@Operation(summary = "添加分类")
|
||||||
|
@PostMapping("/types/{classifyType}")
|
||||||
|
CommonResult<Boolean> add(
|
||||||
|
@Parameter(description = "类别", required = true)
|
||||||
|
@PathVariable("classifyType")
|
||||||
|
StoreTypeEnum classifyType,
|
||||||
|
@Parameter(description = "分类信息请求报文体", required = true)
|
||||||
|
ClassifyRequest classifyRequest
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "更新分类信息")
|
||||||
|
@PutMapping("/types/{classifyType}/ids/{id}")
|
||||||
|
CommonResult<Boolean> update(
|
||||||
|
@Parameter(description = "类别", required = true)
|
||||||
|
@PathVariable("classifyType")
|
||||||
|
StoreTypeEnum classifyType,
|
||||||
|
@Parameter(description = "分类ID", required = true)
|
||||||
|
@PathVariable("id")
|
||||||
|
String id,
|
||||||
|
@Parameter(description = "分类信息请求报文体", required = true)
|
||||||
|
ClassifyRequest classifyRequest
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "获取所有分类信息")
|
||||||
|
@GetMapping("/types/{classifyType}")
|
||||||
|
CommonResult<List<Classify>> listAllClassifys(
|
||||||
|
@Parameter(description = "类别", required = true)
|
||||||
|
@PathVariable("classifyType")
|
||||||
|
StoreTypeEnum classifyType
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "根据ID获取分类信息")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
CommonResult<Classify> getClassifyById(
|
||||||
|
@Parameter(description = "分类ID", required = true)
|
||||||
|
@RequestParam("id")
|
||||||
|
String id
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "根据ID删除分类信息")
|
||||||
|
@DeleteMapping("/{id}")
|
||||||
|
CommonResult<Boolean> deleteClassifyById(
|
||||||
|
@Parameter(description = "分类ID", required = true)
|
||||||
|
@PathVariable("id")
|
||||||
|
String id
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,65 @@
|
|||||||
|
package cd.casic.pipeline.store.api.common;
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.enums.StoreTypeEnum;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.label.Label;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.label.LabelRequest;
|
||||||
|
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.util.List;
|
||||||
|
|
||||||
|
@Tag(name = "OP_STORE_LABEL", description = "OP-STORE-标签")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/op/store/label")
|
||||||
|
public interface OpLabelResource {
|
||||||
|
|
||||||
|
@Operation(summary = "添加标签")
|
||||||
|
@PostMapping("/types/{labelType}")
|
||||||
|
CommonResult<Boolean> add(
|
||||||
|
@Parameter(description = "类别", required = true)
|
||||||
|
@PathVariable("labelType")
|
||||||
|
StoreTypeEnum labelType,
|
||||||
|
@Parameter(description = "标签信息请求报文体", required = true)
|
||||||
|
LabelRequest labelRequest
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "更新标签信息")
|
||||||
|
@PutMapping("/types/{labelType}/ids/{id}")
|
||||||
|
CommonResult<Boolean> update(
|
||||||
|
@Parameter(description = "类别", required = true)
|
||||||
|
@PathVariable("labelType")
|
||||||
|
StoreTypeEnum labelType,
|
||||||
|
@Parameter(description = "标签ID", required = true)
|
||||||
|
@PathVariable("id")
|
||||||
|
String id,
|
||||||
|
@Parameter(description = "标签信息请求报文体", required = true)
|
||||||
|
LabelRequest labelRequest
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "获取所有标签信息")
|
||||||
|
@GetMapping("/types/{labelType}")
|
||||||
|
CommonResult<List<Label>> listAllLabels(
|
||||||
|
@Parameter(description = "类别", required = true)
|
||||||
|
@PathVariable("labelType")
|
||||||
|
StoreTypeEnum labelType
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "根据ID获取标签信息")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
CommonResult<Label> getLabelById(
|
||||||
|
@Parameter(description = "标签ID", required = true)
|
||||||
|
@RequestParam("id")
|
||||||
|
String id
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "根据ID删除标签信息")
|
||||||
|
@DeleteMapping("/{id}")
|
||||||
|
CommonResult<Boolean> deleteLabelById(
|
||||||
|
@Parameter(description = "标签ID", required = true)
|
||||||
|
@PathVariable("id")
|
||||||
|
String id
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
package cd.casic.pipeline.store.api.common;
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.enums.StoreTypeEnum;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.media.MediaInfoReq;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.media.StoreMediaInfo;
|
||||||
|
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.util.List;
|
||||||
|
|
||||||
|
import static cd.casic.ci.common.pipeline.constant.OpsHeader.AUTH_HEADER_USER_ID;
|
||||||
|
|
||||||
|
@Tag(name = "OP_COMMON_MEDIA", description = "研发商店_媒体信息")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/op/store/media")
|
||||||
|
public interface OpMediaResource {
|
||||||
|
|
||||||
|
@Operation(summary = "提交媒体信息")
|
||||||
|
@PostMapping("/storeCodes/{storeCode}/types/{storeType}/media")
|
||||||
|
CommonResult<Boolean> createStoreMedia(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "研发商店代码", required = true)
|
||||||
|
@PathVariable("storeCode")
|
||||||
|
String storeCode,
|
||||||
|
@Parameter(description = "类别", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
StoreTypeEnum storeType,
|
||||||
|
@Parameter(description = "评论信息", required = true)
|
||||||
|
List<MediaInfoReq> mediaInfoList
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "获取单条媒体信息")
|
||||||
|
@GetMapping("/ids/{mediaId")
|
||||||
|
CommonResult<StoreMediaInfo> getStoreMedia(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "媒体ID", required = true)
|
||||||
|
@PathVariable("mediaId")
|
||||||
|
String mediaId
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "获取扩展服务所有媒体信息")
|
||||||
|
@GetMapping("/storesCodes/{storeCode}/types/{labelType}")
|
||||||
|
CommonResult<List<StoreMediaInfo>> getStoreMediaByStoreCode(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "研发商店编码", required = true)
|
||||||
|
@PathVariable("storeCode")
|
||||||
|
String storeCode,
|
||||||
|
@Parameter(description = "类别", required = true)
|
||||||
|
@PathVariable("labelType")
|
||||||
|
StoreTypeEnum labelType
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,89 @@
|
|||||||
|
package cd.casic.pipeline.store.api.common;
|
||||||
|
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.enums.ReasonTypeEnum;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.reason.Reason;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.reason.ReasonReq;
|
||||||
|
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.util.List;
|
||||||
|
|
||||||
|
import static cd.casic.ci.common.pipeline.constant.OpsHeader.AUTH_HEADER_USER_ID;
|
||||||
|
|
||||||
|
|
||||||
|
@Tag(name = "OP_STORE_REASON", description = "OP-STORE-原因")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/op/store/reason")
|
||||||
|
public interface OpReasonResource {
|
||||||
|
|
||||||
|
@Operation(summary = "添加原因")
|
||||||
|
@PostMapping("/types/{type}")
|
||||||
|
CommonResult<Boolean> add(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "原因类型", required = true)
|
||||||
|
@PathVariable("type")
|
||||||
|
ReasonTypeEnum type,
|
||||||
|
@Parameter(description = "原因信息请求报文体", required = true)
|
||||||
|
ReasonReq reasonReq
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "更新原因信息")
|
||||||
|
@PutMapping("/types/{type}/ids/{id}")
|
||||||
|
CommonResult<Boolean> update(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "id", required = true)
|
||||||
|
@PathVariable("id")
|
||||||
|
String id,
|
||||||
|
@Parameter(description = "类别", required = true)
|
||||||
|
@PathVariable("type")
|
||||||
|
ReasonTypeEnum type,
|
||||||
|
@Parameter(description = "原因信息请求报文体", required = true)
|
||||||
|
ReasonReq reasonReq
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "启用禁用原因")
|
||||||
|
@PutMapping("/types/{type}/ids/{id}/enable")
|
||||||
|
CommonResult<Boolean> enableReason(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "id", required = true)
|
||||||
|
@PathVariable("id")
|
||||||
|
String id,
|
||||||
|
@Parameter(description = "类别", required = true)
|
||||||
|
@PathVariable("type")
|
||||||
|
ReasonTypeEnum type,
|
||||||
|
@Parameter(description = "是否启用", required = true)
|
||||||
|
Boolean enable
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "获取原因列表")
|
||||||
|
@GetMapping("/types/{type}/list")
|
||||||
|
CommonResult<List<Reason>> list(
|
||||||
|
@Parameter(description = "类别", required = true)
|
||||||
|
@PathVariable("type")
|
||||||
|
ReasonTypeEnum type,
|
||||||
|
@Parameter(description = "是否启用", required = false)
|
||||||
|
@RequestParam("enable")
|
||||||
|
Boolean enable
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "删除原因")
|
||||||
|
@DeleteMapping("/types/{type}/ids/{id}")
|
||||||
|
CommonResult<Boolean> delete(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "id", required = true)
|
||||||
|
@PathVariable("id")
|
||||||
|
String id
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,55 @@
|
|||||||
|
package cd.casic.pipeline.store.api.common;
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
import cd.casic.framework.commons.pojo.PageResult;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.enums.StoreTypeEnum;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.sensitive.SensitiveApiApproveReq;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.sensitive.SensitiveApiInfo;
|
||||||
|
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.ci.common.pipeline.constant.OpsHeader.AUTH_HEADER_USER_ID;
|
||||||
|
|
||||||
|
@Tag(name = "OP_SDK_SENSITIVEAPI", description = "OP-敏感API")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/op/sdk/sensitiveApi/")
|
||||||
|
public interface OpSensitiveApiResource {
|
||||||
|
|
||||||
|
@Operation(summary = "查看敏感API列表")
|
||||||
|
@GetMapping("list")
|
||||||
|
PageResult<SensitiveApiInfo> list(
|
||||||
|
@Parameter(description = "store组件类别 ATOM:插件 TEMPLATE:模板 IMAGE:镜像 IDE_ATOM:IDE插件")
|
||||||
|
@RequestParam("storeType")
|
||||||
|
StoreTypeEnum storeType,
|
||||||
|
@Parameter(description = "store组件代码")
|
||||||
|
@RequestParam("storeCode")
|
||||||
|
String storeCode,
|
||||||
|
@Parameter(description = "API名称")
|
||||||
|
@RequestParam("apiName")
|
||||||
|
String apiName,
|
||||||
|
@Parameter(description = "API等级 NORMAL: 普通 SENSITIVE: 敏感")
|
||||||
|
@RequestParam("apiLevel")
|
||||||
|
String apiLevel,
|
||||||
|
@Parameter(description = "API状态 WAIT:待审批,PASS:通过,REFUSE:拒绝, CANCEL: 取消")
|
||||||
|
@RequestParam("apiStatus")
|
||||||
|
String apiStatus,
|
||||||
|
@Parameter(description = "第几页", required = false)
|
||||||
|
@RequestParam("page")
|
||||||
|
Integer page,
|
||||||
|
@Parameter(description = "每页条数", required = false)
|
||||||
|
@RequestParam("pageSize")
|
||||||
|
Integer pageSize
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "敏感API审批")
|
||||||
|
@PutMapping("approve")
|
||||||
|
CommonResult<Boolean> approve(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "敏感API审批请求体")
|
||||||
|
SensitiveApiApproveReq sensitiveApiApproveReq
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,168 @@
|
|||||||
|
package cd.casic.pipeline.store.api.common;
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
import cd.casic.framework.commons.pojo.PageResult;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.*;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.enums.StoreSortTypeEnum;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.enums.StoreTypeEnum;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.publication.StoreApproveReleaseRequest;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.version.StoreDeskVersionItem;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import jakarta.validation.Valid;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import static cd.casic.ci.common.pipeline.constant.OpsHeader.AUTH_HEADER_USER_ID;
|
||||||
|
import static cd.casic.ci.common.pipeline.constant.OpsHeader.AUTH_HEADER_USER_ID_DEFAULT_VALUE;
|
||||||
|
|
||||||
|
@Tag(name = "OP_STORE_COMPONENT", description = "研发商店-OP-组件管理")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/op/store/components")
|
||||||
|
public interface OpStoreComponentResource {
|
||||||
|
|
||||||
|
@Operation(summary = "审核组件发布")
|
||||||
|
@PutMapping("/{storeId}/release/approve")
|
||||||
|
CommonResult<Boolean> approveComponentRelease(
|
||||||
|
@Parameter(description = "用户ID", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "组件ID", required = true)
|
||||||
|
@PathVariable("storeId")
|
||||||
|
String storeId,
|
||||||
|
@Parameter(description = "审核组件发布请求请求报文")
|
||||||
|
StoreApproveReleaseRequest storeApproveReleaseRequest
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "获取组件列表")
|
||||||
|
@GetMapping("/types/{storeType}/component/list")
|
||||||
|
PageResult<MyStoreComponent> listComponents(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "组件类型", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
String storeType,
|
||||||
|
@Parameter(description = "名称", required = false)
|
||||||
|
@RequestParam("name")
|
||||||
|
String name,
|
||||||
|
@Parameter(description = "类型", required = false)
|
||||||
|
@RequestParam("type")
|
||||||
|
String type,
|
||||||
|
@Parameter(description = "是否处于流程中", required = false)
|
||||||
|
@RequestParam("processFlag")
|
||||||
|
Boolean processFlag,
|
||||||
|
@Parameter(description = "分类", required = false)
|
||||||
|
@RequestParam("classifyCode")
|
||||||
|
String classifyCode,
|
||||||
|
@Parameter(description = "应用范畴,多个用逗号分隔", required = false)
|
||||||
|
@RequestParam("categoryCodes")
|
||||||
|
String categoryCodes,
|
||||||
|
@Parameter(description = "功能标签,多个用逗号分隔", required = false)
|
||||||
|
@RequestParam("labelCodes")
|
||||||
|
String labelCodes,
|
||||||
|
@Parameter(description = "排序", required = false)
|
||||||
|
@RequestParam("sortType")
|
||||||
|
StoreSortTypeEnum sortType,
|
||||||
|
@Parameter(description = "页码", required = true)
|
||||||
|
@RequestParam("page")
|
||||||
|
Integer page,
|
||||||
|
@Parameter(description = "每页数量", required = true)
|
||||||
|
@RequestParam("pageSize")
|
||||||
|
Integer pageSize
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "根据组件标识获取组件版本列表")
|
||||||
|
@GetMapping("/types/{storeType}/codes/{storeCode}/component/version/list")
|
||||||
|
PageResult<StoreDeskVersionItem> getComponentVersionsByCode(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "组件类型", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
String storeType,
|
||||||
|
@Parameter(description = "组件代码", required = true)
|
||||||
|
@PathVariable("storeCode")
|
||||||
|
String storeCode,
|
||||||
|
@Parameter(description = "页码", required = true)
|
||||||
|
@RequestParam("page")
|
||||||
|
Integer page,
|
||||||
|
@Parameter(description = "每页数量", required = true)
|
||||||
|
@RequestParam("pageSize")
|
||||||
|
Integer pageSize
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "根据组件ID获取组件详情")
|
||||||
|
@GetMapping("/types/{storeType}/ids/{storeId}/component/detail")
|
||||||
|
CommonResult<StoreDetailInfo> getComponentDetailInfoById(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "组件类型", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
String storeType,
|
||||||
|
@Parameter(description = "组件ID", required = true)
|
||||||
|
@PathVariable("storeId")
|
||||||
|
String storeId
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "更新组件基本信息")
|
||||||
|
@PutMapping("/types/{storeType}/codes/{storeCode}/component/base/info/update")
|
||||||
|
CommonResult<Boolean> updateComponentBaseInfo(
|
||||||
|
@Parameter(description = "用户ID", required = true, example = AUTH_HEADER_USER_ID_DEFAULT_VALUE)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "组件类型", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
String storeType,
|
||||||
|
@Parameter(description = "组件代码", required = true)
|
||||||
|
@PathVariable("storeCode")
|
||||||
|
String storeCode,
|
||||||
|
@Parameter(description = "组件基本信息修改请求报文体", required = true)
|
||||||
|
StoreBaseInfoUpdateRequest storeBaseInfoUpdateRequest
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "删除工作台组件")
|
||||||
|
@DeleteMapping("/desk/types/{storeType}/codes/{storeCode}/component/delete")
|
||||||
|
CommonResult<Boolean> deleteComponent(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "组件类型", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
String storeType,
|
||||||
|
@Parameter(description = "组件代码", required = true)
|
||||||
|
@PathVariable("storeCode")
|
||||||
|
String storeCode
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "下架组件")
|
||||||
|
@PutMapping("/component/offline")
|
||||||
|
CommonResult<Boolean> offlineComponent(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "工作台-下架组件请求报文体", required = true)
|
||||||
|
@Valid
|
||||||
|
StoreOfflineRequest storeOfflineRequest
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "更新组件已安装包文件sha1摘要值")
|
||||||
|
@PutMapping("/types/{storeType}/codes/{storeCode}/versions/{version}/component/installed/pkg/file/sha/update")
|
||||||
|
CommonResult<Boolean> updateComponentInstalledPkgFileShaContent(
|
||||||
|
@Parameter(description = "用户ID", required = true, example = AUTH_HEADER_USER_ID_DEFAULT_VALUE)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "组件类型", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
StoreTypeEnum storeType,
|
||||||
|
@Parameter(description = "组件代码", required = true)
|
||||||
|
@PathVariable("storeCode")
|
||||||
|
String storeCode,
|
||||||
|
@Parameter(description = "组件版本", required = true)
|
||||||
|
@PathVariable("version")
|
||||||
|
String version,
|
||||||
|
@Parameter(description = "更新组件已安装包文件sha1摘要值请求报文", required = true)
|
||||||
|
InstalledPkgFileShaContentRequest installedPkgFileShaContentRequest
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,29 @@
|
|||||||
|
package cd.casic.pipeline.store.api.common;
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.ErrorCodeInfo;
|
||||||
|
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.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestHeader;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import static cd.casic.ci.common.pipeline.constant.OpsHeader.AUTH_HEADER_USER_ID;
|
||||||
|
|
||||||
|
@Tag(name = "OP_STORE_ERROR_CODE", description = "OP-STORE-对接平台")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/op/store/error/code")
|
||||||
|
public interface OpStoreErrorCodeResource {
|
||||||
|
|
||||||
|
@Operation(summary = "新增通用错误码")
|
||||||
|
@PostMapping("/general/add")
|
||||||
|
CommonResult<Boolean> createGeneralErrorCode(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "插件通用错误码信息", required = true)
|
||||||
|
ErrorCodeInfo errorCodeInfo
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
package cd.casic.pipeline.store.api.common;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
@Tag(name = "OP_STORE_LOGO", description = "OP-STORE-LOGO")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/op/store/logo")
|
||||||
|
public interface OpStoreLogoResource {
|
||||||
|
//todo 未必需要
|
||||||
|
}
|
@ -0,0 +1,83 @@
|
|||||||
|
package cd.casic.pipeline.store.api.common;
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.enums.StoreTypeEnum;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.member.StoreMemberItem;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.member.StoreMemberReq;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import jakarta.validation.Valid;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import static cd.casic.ci.common.pipeline.constant.OpsHeader.AUTH_HEADER_USER_ID;
|
||||||
|
|
||||||
|
@Tag(name = "OP_STORE_MEMBER", description = "OP-组件-用户")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/op/store/member/")
|
||||||
|
public interface OpStoreMemberResource {
|
||||||
|
|
||||||
|
@Operation(summary = "获取store组件成员列表")
|
||||||
|
@GetMapping("/list")
|
||||||
|
CommonResult<List<StoreMemberItem>> list(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "store组件标识", required = true)
|
||||||
|
@RequestParam("storeCode")
|
||||||
|
String storeCode,
|
||||||
|
@Parameter(description = "store组件类型", required = true)
|
||||||
|
@RequestParam("storeType")
|
||||||
|
StoreTypeEnum storeType
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "添加store组件成员")
|
||||||
|
@PostMapping("/add")
|
||||||
|
CommonResult<Boolean> add(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "调试项目", required = true)
|
||||||
|
@RequestParam("testProjectCode")
|
||||||
|
String testProjectCode,
|
||||||
|
@Parameter(description = "添加成员请求报文")
|
||||||
|
@Valid
|
||||||
|
StoreMemberReq storeMemberReq
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "删除store组件成员")
|
||||||
|
@DeleteMapping("/delete")
|
||||||
|
CommonResult<Boolean> delete(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "成员ID", required = true)
|
||||||
|
@RequestParam("id")
|
||||||
|
String id,
|
||||||
|
@Parameter(description = "store组件标识", required = true)
|
||||||
|
@RequestParam("storeCode")
|
||||||
|
String storeCode,
|
||||||
|
@Parameter(description = "store组件类型", required = true)
|
||||||
|
@RequestParam("storeType")
|
||||||
|
StoreTypeEnum storeType
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "查看store组件成员信息")
|
||||||
|
@GetMapping("/view")
|
||||||
|
CommonResult<StoreMemberItem> view(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "store组件成员", required = true)
|
||||||
|
@RequestParam("member")
|
||||||
|
String member,
|
||||||
|
@Parameter(description = "store组件标识", required = true)
|
||||||
|
@RequestParam("storeCode")
|
||||||
|
String storeCode,
|
||||||
|
@Parameter(description = "store组件类型", required = true)
|
||||||
|
@RequestParam("storeType")
|
||||||
|
StoreTypeEnum storeType
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,29 @@
|
|||||||
|
package cd.casic.pipeline.store.api.common;
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.UpdateStorePipelineModelRequest;
|
||||||
|
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.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestHeader;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import static cd.casic.ci.common.pipeline.constant.OpsHeader.AUTH_HEADER_USER_ID;
|
||||||
|
|
||||||
|
@Tag(name = "OP_STORE_PIPELINE", description = "OP-STORE-流水线")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/op/store/pipeline")
|
||||||
|
public interface OpStorePipelineResource {
|
||||||
|
|
||||||
|
@Operation(summary = "更新研发商店组件流水线模型")
|
||||||
|
@PutMapping("/model/update")
|
||||||
|
CommonResult<Boolean> updateStorePipelineModel(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "更新研发商店流水线模型请求报文")
|
||||||
|
UpdateStorePipelineModelRequest updateStorePipelineModelRequest
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,57 @@
|
|||||||
|
package cd.casic.pipeline.store.api.common;
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.env.StorePkgRunEnvRequest;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import jakarta.validation.Valid;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import static cd.casic.ci.common.pipeline.constant.OpsHeader.AUTH_HEADER_USER_ID;
|
||||||
|
|
||||||
|
|
||||||
|
@Tag(name = "OP_STORE_PKG_ENVS", description = "安装包环境信息")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/op/store/pkg/envs")
|
||||||
|
public interface OpStorePkgEnvInfoResource {
|
||||||
|
|
||||||
|
@Operation(summary = "新增环境变量")
|
||||||
|
@PostMapping("/create")
|
||||||
|
CommonResult<Boolean> create(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "环境变量请求报文体", required = true)
|
||||||
|
@Valid
|
||||||
|
StorePkgRunEnvRequest storePkgRunEnvRequest
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "更新环境变量")
|
||||||
|
@PostMapping("/ids/{id}/update")
|
||||||
|
CommonResult<Boolean> update(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "主键ID", required = true)
|
||||||
|
@PathVariable("id")
|
||||||
|
String id,
|
||||||
|
@Parameter(description = "安装包运行时环境信息请求报文体", required = true)
|
||||||
|
@Valid
|
||||||
|
StorePkgRunEnvRequest storePkgRunEnvRequest
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "删除环境变量")
|
||||||
|
@DeleteMapping("/ids/{id}/delete")
|
||||||
|
CommonResult<Boolean> delete(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "主键ID", required = true)
|
||||||
|
@PathVariable("id")
|
||||||
|
String id,
|
||||||
|
@Parameter(description = "安装包运行时环境信息请求报文体", required = true)
|
||||||
|
@Valid
|
||||||
|
StorePkgRunEnvRequest storePkgRunEnvRequest
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,29 @@
|
|||||||
|
package cd.casic.pipeline.store.api.common;
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.StoreProjectInfo;
|
||||||
|
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.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestHeader;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import static cd.casic.ci.common.pipeline.constant.OpsHeader.*;
|
||||||
|
|
||||||
|
@Tag(name = "OP_STORE_PROJECT", description = "OP-组件-项目")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/op/store/project")
|
||||||
|
public interface OpStoreProjectResource {
|
||||||
|
|
||||||
|
@Operation(summary = "更新组件关联初始化项目信息")
|
||||||
|
@PutMapping("/relevancy/update")
|
||||||
|
CommonResult<Boolean> updateStoreInitProject(
|
||||||
|
@Parameter(description = "用户ID", required = true, example = AUTH_HEADER_USER_ID_DEFAULT_VALUE)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "组件关联初始化项目信息", required = true)
|
||||||
|
StoreProjectInfo storeProjectInfo
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
package cd.casic.pipeline.store.api.common;
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
@Tag(name = "OP_STORE_PUBLISHERS", description = "OP-研发商店-发布者")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/op/store/publishers")
|
||||||
|
public interface OpStorePublishersResource {
|
||||||
|
|
||||||
|
@Operation(summary = "同步所有个人发布者组织架构信息")
|
||||||
|
@PutMapping("/refresh/person")
|
||||||
|
CommonResult<Boolean> refreshPersonPublisherGroup();
|
||||||
|
}
|
@ -0,0 +1,34 @@
|
|||||||
|
package cd.casic.pipeline.store.api.common;
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.enums.StoreTypeEnum;
|
||||||
|
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.ci.common.pipeline.constant.OpsHeader.AUTH_HEADER_USER_ID;
|
||||||
|
import static cd.casic.ci.common.pipeline.constant.OpsHeader.AUTH_HEADER_USER_ID_DEFAULT_VALUE;
|
||||||
|
|
||||||
|
@Tag(name = "OP_STORE", description = "OP-商店")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/op/store")
|
||||||
|
public interface OpStoreResource {
|
||||||
|
|
||||||
|
@Operation(summary = "删除组件内置流水线")
|
||||||
|
@DeleteMapping("/inner/pipeline/delete")
|
||||||
|
CommonResult<Boolean> deleteStoreInnerPipeline(
|
||||||
|
@Parameter(description = "用户ID", required = true, example = AUTH_HEADER_USER_ID_DEFAULT_VALUE)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "组件类型", required = false)
|
||||||
|
@RequestParam("storeType")
|
||||||
|
StoreTypeEnum storeType,
|
||||||
|
@Parameter(description = "组件标识", required = false)
|
||||||
|
@RequestParam("storeCode")
|
||||||
|
String storeCode,
|
||||||
|
@Parameter(description = "需排除的项目", required = false)
|
||||||
|
@RequestParam("excludeProjectCode")
|
||||||
|
String excludeProjectCode
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,33 @@
|
|||||||
|
package cd.casic.pipeline.store.api.common;
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.enums.StoreTypeEnum;
|
||||||
|
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.ci.common.pipeline.constant.OpsHeader.AUTH_HEADER_DEVOPS_BK_TOKEN;
|
||||||
|
|
||||||
|
@Tag(name = "OPEN_STORE", description = "open-store")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/open/store")
|
||||||
|
public interface OpenStoreResource {
|
||||||
|
|
||||||
|
@GetMapping("/projects/{projectCode}/types/{storeType}/codes/{storeCode}/permission/validate")
|
||||||
|
@Operation(summary = "校验项目是否有使用该组件的权限")
|
||||||
|
CommonResult<Boolean> validateProjectComponentPermission(
|
||||||
|
@RequestHeader(AUTH_HEADER_DEVOPS_BK_TOKEN)
|
||||||
|
@Parameter(description = "认证token", required = true)
|
||||||
|
String token,
|
||||||
|
@PathVariable("projectCode")
|
||||||
|
@Parameter(description = "项目编码", required = true)
|
||||||
|
String projectCode,
|
||||||
|
@Parameter(description = "标识", required = true)
|
||||||
|
@PathVariable("storeCode")
|
||||||
|
String storeCode,
|
||||||
|
@Parameter(description = "类型", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
StoreTypeEnum storeType
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,95 @@
|
|||||||
|
package cd.casic.pipeline.store.api.common;
|
||||||
|
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.QueryComponentPkgEnvInfoParam;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.enums.ReleaseTypeEnum;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.enums.StoreTypeEnum;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.publication.StorePkgEnvInfo;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.publication.StorePkgInfoUpdateRequest;
|
||||||
|
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.util.List;
|
||||||
|
|
||||||
|
import static cd.casic.ci.common.pipeline.constant.OpsHeader.AUTH_HEADER_USER_ID;
|
||||||
|
import static cd.casic.ci.common.pipeline.constant.OpsHeader.AUTH_HEADER_USER_ID_DEFAULT_VALUE;
|
||||||
|
|
||||||
|
|
||||||
|
@Tag(name = "SERVICE_STORE_ARCHIVE", description = "研发商店-组件归档")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/service/store/archives")
|
||||||
|
public interface ServiceStoreArchiveResource {
|
||||||
|
|
||||||
|
@Operation(summary = "校验用户上传的组件包是否合法")
|
||||||
|
@GetMapping("/types/{storeType}/codes/{storeCode}/versions/{version}/package/verify")
|
||||||
|
CommonResult<Boolean> verifyComponentPackage(
|
||||||
|
@Parameter(description = "用户ID", required = true, example = AUTH_HEADER_USER_ID_DEFAULT_VALUE)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "组件类型", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
StoreTypeEnum storeType,
|
||||||
|
@Parameter(description = "组件代码", required = true)
|
||||||
|
@PathVariable("storeCode")
|
||||||
|
String storeCode,
|
||||||
|
@Parameter(description = "版本号", required = true)
|
||||||
|
@PathVariable("version")
|
||||||
|
String version,
|
||||||
|
@Parameter(description = "发布类型", required = false)
|
||||||
|
@RequestParam("releaseType")
|
||||||
|
ReleaseTypeEnum releaseType
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "获取组件包环境信息")
|
||||||
|
@GetMapping("/types/{storeType}/codes/{storeCode}/versions/{version}/pkg/env/info/get")
|
||||||
|
CommonResult<List<StorePkgEnvInfo>> getComponentPkgEnvInfo(
|
||||||
|
@Parameter(description = "用户ID", required = true, example = AUTH_HEADER_USER_ID_DEFAULT_VALUE)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "组件类型", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
StoreTypeEnum storeType,
|
||||||
|
@Parameter(description = "组件代码", required = true)
|
||||||
|
@PathVariable("storeCode")
|
||||||
|
String storeCode,
|
||||||
|
@Parameter(description = "版本号", required = true)
|
||||||
|
@PathVariable("version")
|
||||||
|
String version,
|
||||||
|
@Parameter(description = "操作系统名称", required = false)
|
||||||
|
@RequestParam("osName")
|
||||||
|
String osName,
|
||||||
|
@Parameter(description = "操作系统架构", required = false)
|
||||||
|
@RequestParam("osArch")
|
||||||
|
String osArch
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "根据配置文件内容获取组件包环境信息")
|
||||||
|
@PostMapping("/types/{storeType}/codes/{storeCode}/versions/{version}/pkg/env/info/get")
|
||||||
|
CommonResult<List<StorePkgEnvInfo>> getComponentPkgEnvInfo(
|
||||||
|
@Parameter(description = "用户ID", required = true, example = AUTH_HEADER_USER_ID_DEFAULT_VALUE)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "组件类型", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
StoreTypeEnum storeType,
|
||||||
|
@Parameter(description = "组件代码", required = true)
|
||||||
|
@PathVariable("storeCode")
|
||||||
|
String storeCode,
|
||||||
|
@Parameter(description = "版本号", required = true)
|
||||||
|
@PathVariable("version")
|
||||||
|
String version,
|
||||||
|
QueryComponentPkgEnvInfoParam queryComponentPkgEnvInfoParam
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "更新组件执行包相关信息")
|
||||||
|
@PutMapping("/component/pkg/info/update")
|
||||||
|
CommonResult<Boolean> updateComponentPkgInfo(
|
||||||
|
@Parameter(description = "用户ID", required = true, example = AUTH_HEADER_USER_ID_DEFAULT_VALUE)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
StorePkgInfoUpdateRequest storePkgInfoUpdateRequest
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,144 @@
|
|||||||
|
package cd.casic.pipeline.store.api.common;
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
import cd.casic.framework.commons.pojo.PageResult;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.*;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.enums.RdTypeEnum;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.enums.StoreSortTypeEnum;
|
||||||
|
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.util.List;
|
||||||
|
|
||||||
|
import static cd.casic.ci.common.pipeline.constant.OpsHeader.AUTH_HEADER_USER_ID;
|
||||||
|
|
||||||
|
@Tag(name = "SERVICE_STORE_COMPONENT", description = "研发商店-SERVICE-组件管理")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/service/store/components")
|
||||||
|
public interface ServiceStoreComponentResource {
|
||||||
|
|
||||||
|
@Operation(summary = "获取研发商店首页组件的数据")
|
||||||
|
@GetMapping("/types/{storeType}/component/main/page/list")
|
||||||
|
CommonResult<List<MarketMainItem>> getMainPageComponents(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "组件类型", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
String storeType,
|
||||||
|
@Parameter(description = "项目代码", required = false)
|
||||||
|
@RequestParam("projectCode")
|
||||||
|
String projectCode,
|
||||||
|
@Parameter(description = "实例ID", required = false)
|
||||||
|
@RequestParam("instanceId")
|
||||||
|
String instanceId,
|
||||||
|
@Parameter(description = "页码", required = true)
|
||||||
|
@RequestParam("page")
|
||||||
|
int page,
|
||||||
|
@Parameter(description = "每页数量", required = true)
|
||||||
|
@RequestParam("pageSize")
|
||||||
|
int pageSize
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "根据条件查询组件列表")
|
||||||
|
@GetMapping("/types/{storeType}/component/list")
|
||||||
|
PageResult<MarketItem> queryComponents(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "组件类型", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
String storeType,
|
||||||
|
@Parameter(description = "项目代码", required = false)
|
||||||
|
@RequestParam("projectCode")
|
||||||
|
String projectCode,
|
||||||
|
@Parameter(description = "搜索关键字", required = false)
|
||||||
|
@RequestParam("keyword")
|
||||||
|
String keyword,
|
||||||
|
@Parameter(description = "分类ID", required = false)
|
||||||
|
@RequestParam("classifyId")
|
||||||
|
String classifyId,
|
||||||
|
@Parameter(description = "标签ID", required = false)
|
||||||
|
@RequestParam("labelId")
|
||||||
|
String labelId,
|
||||||
|
@Parameter(description = "范畴ID", required = false)
|
||||||
|
@RequestParam("categoryId")
|
||||||
|
String categoryId,
|
||||||
|
@Parameter(description = "评分", required = false)
|
||||||
|
@RequestParam("score")
|
||||||
|
Integer score,
|
||||||
|
@Parameter(description = "研发来源类型", required = false)
|
||||||
|
@RequestParam("rdType")
|
||||||
|
RdTypeEnum rdType,
|
||||||
|
@Parameter(description = "是否推荐标识 true:推荐,false:不推荐", required = false)
|
||||||
|
@RequestParam("recommendFlag")
|
||||||
|
Boolean recommendFlag,
|
||||||
|
@Parameter(description = "是否已在该项目安装 true:是,false:否", required = false)
|
||||||
|
@RequestParam("installed")
|
||||||
|
Boolean installed,
|
||||||
|
@Parameter(description = "是否需要更新标识 true:需要,false:不需要", required = false)
|
||||||
|
@RequestParam("updateFlag")
|
||||||
|
Boolean updateFlag,
|
||||||
|
@Parameter(description = "是否查询项目下组件标识", required = true)
|
||||||
|
@RequestParam("queryProjectComponentFlag")
|
||||||
|
boolean queryProjectComponentFlag,
|
||||||
|
@Parameter(description = "排序", required = false)
|
||||||
|
@RequestParam("sortType")
|
||||||
|
StoreSortTypeEnum sortType,
|
||||||
|
@Parameter(description = "实例ID", required = false)
|
||||||
|
@RequestParam("instanceId")
|
||||||
|
String instanceId,
|
||||||
|
@Parameter(description = "是否查测试中版本 true:是,false:否", required = false)
|
||||||
|
@RequestParam("queryTestFlag")
|
||||||
|
Boolean queryTestFlag,
|
||||||
|
@Parameter(description = "页码", required = true)
|
||||||
|
@RequestParam("page")
|
||||||
|
int page,
|
||||||
|
@Parameter(description = "每页数量", required = true)
|
||||||
|
@RequestParam("pageSize")
|
||||||
|
int pageSize
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "根据组件ID获取组件详情")
|
||||||
|
@GetMapping("/types/{storeType}/ids/{storeId}/component/detail")
|
||||||
|
CommonResult<StoreDetailInfo> getComponentDetailInfoById(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "组件类型", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
String storeType,
|
||||||
|
@Parameter(description = "组件ID", required = true)
|
||||||
|
@PathVariable("storeId")
|
||||||
|
String storeId
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "安装组件到项目")
|
||||||
|
@PostMapping("/component/install")
|
||||||
|
CommonResult<Boolean> installComponent(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
InstallStoreReq installStoreReq
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "卸载组件")
|
||||||
|
@DeleteMapping("/projects/{projectCode}/types/{storeType}/codes/{storeCode}/component/uninstall")
|
||||||
|
CommonResult<Boolean> uninstallComponent(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "项目代码", required = true)
|
||||||
|
@PathVariable("projectCode")
|
||||||
|
String projectCode,
|
||||||
|
@Parameter(description = "组件类型", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
String storeType,
|
||||||
|
@Parameter(description = "组件代码", required = true)
|
||||||
|
@PathVariable("storeCode")
|
||||||
|
String storeCode,
|
||||||
|
UnInstallReq unInstallReq
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,13 @@
|
|||||||
|
package cd.casic.pipeline.store.api.common;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
@Tag(name = "SERVICE_STORE_LOGO", description = "STORE-LOGO")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/service/store/logo")
|
||||||
|
public interface ServiceStoreLogoResource {
|
||||||
|
|
||||||
|
// logo不需要
|
||||||
|
}
|
@ -0,0 +1,139 @@
|
|||||||
|
package cd.casic.pipeline.store.api.common;
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.classify.Classify;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.enums.ErrorCodeTypeEnum;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.enums.StoreTypeEnum;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.publication.StoreBuildResultRequest;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.sensitive.SensitiveConfResp;
|
||||||
|
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.util.List;
|
||||||
|
|
||||||
|
@Tag(name = "SERVICE_STORE", description = "service-store")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/service/store")
|
||||||
|
public interface ServiceStoreResource {
|
||||||
|
|
||||||
|
@Operation(summary = "卸载")
|
||||||
|
@DeleteMapping("/codes/{storeCode}/uninstall")
|
||||||
|
CommonResult<Boolean> uninstall(
|
||||||
|
@Parameter(description = "标识", required = true)
|
||||||
|
@PathVariable("storeCode")
|
||||||
|
String storeCode,
|
||||||
|
@Parameter(description = "类型", required = true)
|
||||||
|
@RequestParam("storeType")
|
||||||
|
StoreTypeEnum storeType,
|
||||||
|
@Parameter(description = "项目", required = true)
|
||||||
|
@RequestParam("projectCode")
|
||||||
|
String projectCode
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "获取敏感数据")
|
||||||
|
@GetMapping("/getSensitiveConf")
|
||||||
|
CommonResult<List<SensitiveConfResp>> getSensitiveConf(
|
||||||
|
@Parameter(description = "组件类型", required = true)
|
||||||
|
@RequestParam("storeType")
|
||||||
|
StoreTypeEnum storeType,
|
||||||
|
@Parameter(description = "组件标识", required = true)
|
||||||
|
@RequestParam("storeCode")
|
||||||
|
String storeCode
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "store组件内置流水线构建结果处理")
|
||||||
|
@PutMapping("/pipelineIds/{pipelineId}/buildIds/{buildId}/build/handle")
|
||||||
|
CommonResult<Boolean> handleStoreBuildCommonResult(
|
||||||
|
@Parameter(description = "流水线ID", required = true)
|
||||||
|
@PathVariable("pipelineId")
|
||||||
|
String pipelineId,
|
||||||
|
@Parameter(description = "构建ID", required = true)
|
||||||
|
@PathVariable("buildId")
|
||||||
|
String buildId,
|
||||||
|
@Parameter(description = "store组件内置流水线构建结果请求报文体", required = true)
|
||||||
|
StoreBuildResultRequest storeBuildCommonResultRequest
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "判断用户是否是该组件的成员")
|
||||||
|
@GetMapping("/codes/{storeCode}/user/validate")
|
||||||
|
CommonResult<Boolean> isStoreMember(
|
||||||
|
@Parameter(description = "标识", required = true)
|
||||||
|
@PathVariable("storeCode")
|
||||||
|
String storeCode,
|
||||||
|
@Parameter(description = "类型", required = true)
|
||||||
|
@RequestParam("storeType")
|
||||||
|
StoreTypeEnum storeType,
|
||||||
|
@Parameter(description = "用户ID", required = true)
|
||||||
|
@RequestParam("userId")
|
||||||
|
String userId
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "判断项目是否是研发商店公共项目")
|
||||||
|
@GetMapping("projects/{projectCode}/validate")
|
||||||
|
CommonResult<Boolean> isPublicProject(
|
||||||
|
@Parameter(description = "标识", required = true)
|
||||||
|
@PathVariable("projectCode")
|
||||||
|
String projectCode
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "校验流水线用户访问组件信息权限")
|
||||||
|
@GetMapping("/codes/{storeCode}/pipeline/visit/validate")
|
||||||
|
CommonResult<Boolean> validatePipelineUserStorePermission(
|
||||||
|
@Parameter(description = "标识", required = true)
|
||||||
|
@PathVariable("storeCode")
|
||||||
|
String storeCode,
|
||||||
|
@Parameter(description = "类型", required = true)
|
||||||
|
@RequestParam("storeType")
|
||||||
|
StoreTypeEnum storeType,
|
||||||
|
@Parameter(description = "用户ID", required = true)
|
||||||
|
@RequestParam("userId")
|
||||||
|
String userId
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "判断错误码是否合规")
|
||||||
|
@PostMapping("/codes/{storeCode}/errorCode/compliance")
|
||||||
|
CommonResult<Boolean> isComplianceErrorCode(
|
||||||
|
@Parameter(description = "标识", required = true)
|
||||||
|
@PathVariable("storeCode")
|
||||||
|
String storeCode,
|
||||||
|
@Parameter(description = "类型", required = true)
|
||||||
|
@RequestParam("storeType")
|
||||||
|
StoreTypeEnum storeType,
|
||||||
|
@Parameter(description = "错误码", required = true)
|
||||||
|
@RequestParam("errorCode")
|
||||||
|
int errorCode,
|
||||||
|
@Parameter(description = "错误码类型", required = true)
|
||||||
|
@RequestParam("errorCodeType")
|
||||||
|
ErrorCodeTypeEnum errorCodeType
|
||||||
|
);
|
||||||
|
|
||||||
|
@GetMapping("/types/{storeType}/codes/{storeCode}/versions/{version}/permission/validate")
|
||||||
|
@Operation(summary = "校验是否有使用该组件的权限")
|
||||||
|
CommonResult<Boolean> validateComponentDownloadPermission(
|
||||||
|
@Parameter(description = "标识", required = true)
|
||||||
|
@PathVariable("storeCode")
|
||||||
|
String storeCode,
|
||||||
|
@Parameter(description = "类型", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
StoreTypeEnum storeType,
|
||||||
|
@Parameter(description = "版本号", required = true)
|
||||||
|
@PathVariable("version")
|
||||||
|
String version,
|
||||||
|
@Parameter(description = "项目", required = true)
|
||||||
|
@RequestParam("projectCode")
|
||||||
|
String projectCode,
|
||||||
|
@Parameter(description = "用户ID", required = true)
|
||||||
|
@RequestParam("userId")
|
||||||
|
String userId
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "获取组件分类信息列表")
|
||||||
|
@GetMapping("/classifies/types/{storeType}/list")
|
||||||
|
CommonResult<List<Classify>> getClassifyList(
|
||||||
|
@Parameter(description = "组件类型", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
StoreTypeEnum storeType
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,59 @@
|
|||||||
|
package cd.casic.pipeline.store.api.common;
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.enums.StoreTypeEnum;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.statistic.StoreDailyStatisticRequest;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.statistic.StoreStatistic;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.statistic.StoreStatisticPipelineNumUpdate;
|
||||||
|
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.util.List;
|
||||||
|
|
||||||
|
import static cd.casic.ci.common.pipeline.constant.OpsHeader.AUTH_HEADER_USER_ID;
|
||||||
|
|
||||||
|
|
||||||
|
@Tag(name = "SERVICE_STORE_STATISTIC", description = "研发商店-统计")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/service/store/statistic")
|
||||||
|
public interface ServiceStoreStatisticResource {
|
||||||
|
|
||||||
|
@Operation(summary = "获取store组件统计信息")
|
||||||
|
@GetMapping("/types/{storeType}/codes/{storeCode}")
|
||||||
|
CommonResult<StoreStatistic> getStatisticByCode(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "组件类型", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
StoreTypeEnum storeType,
|
||||||
|
@Parameter(description = "组件标识", required = true)
|
||||||
|
@PathVariable("storeCode")
|
||||||
|
String storeCode
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "更新使用store组件的流水线数量")
|
||||||
|
@PutMapping("/types/{storeType}/pipeline/num/update")
|
||||||
|
CommonResult<Boolean> updatePipelineNum(
|
||||||
|
@Parameter(description = "组件类型", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
StoreTypeEnum storeType,
|
||||||
|
@Parameter(description = "使用store组件流水线数量更新实体对象列表", required = true)
|
||||||
|
List<StoreStatisticPipelineNumUpdate> pipelineNumUpdateList
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "更新store组件的每日统计信息")
|
||||||
|
@PutMapping("/types/{storeType}/codes/{storeCode}/daily/info/update")
|
||||||
|
CommonResult<Boolean> updateDailyStatisticInfo(
|
||||||
|
@Parameter(description = "组件类型", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
StoreTypeEnum storeType,
|
||||||
|
@Parameter(description = "组件标识", required = true)
|
||||||
|
@PathVariable("storeCode")
|
||||||
|
String storeCode,
|
||||||
|
@Parameter(description = "store组件的每日统计信息", required = true)
|
||||||
|
StoreDailyStatisticRequest storeDailyStatisticRequest
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,28 @@
|
|||||||
|
package cd.casic.pipeline.store.api.common;
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.enums.ReasonTypeEnum;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.reason.Reason;
|
||||||
|
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.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Tag(name = "USER_STORE_REASON", description = "USER-STORE-原因")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/user/store/reason")
|
||||||
|
public interface UserReasonResource {
|
||||||
|
|
||||||
|
@Operation(summary = "获取原因列表")
|
||||||
|
@GetMapping("/types/{type}")
|
||||||
|
CommonResult<List<Reason>> list(
|
||||||
|
@Parameter(description = "类别", required = true)
|
||||||
|
@PathVariable("type")
|
||||||
|
ReasonTypeEnum type
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,95 @@
|
|||||||
|
package cd.casic.pipeline.store.api.common;
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
import cd.casic.framework.commons.pojo.PageResult;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.enums.StoreTypeEnum;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.sensitive.SensitiveApiApplyReq;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.sensitive.SensitiveApiInfo;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.sensitive.SensitiveApiNameInfo;
|
||||||
|
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.util.List;
|
||||||
|
|
||||||
|
import static cd.casic.ci.common.pipeline.constant.OpsHeader.AUTH_HEADER_USER_ID;
|
||||||
|
|
||||||
|
@Tag(name = "USER_SDK_SENSITIVEAPI", description = "用户-敏感API")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/user/sdk/{storeType}/{storeCode}/sensitiveApi/")
|
||||||
|
public interface UserSensitiveApiResource {
|
||||||
|
|
||||||
|
@Operation(summary = "获取未审批API列表")
|
||||||
|
@GetMapping("unApprovalApiList")
|
||||||
|
CommonResult<List<SensitiveApiNameInfo>> unApprovalApiList(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "组件类型", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
StoreTypeEnum storeType,
|
||||||
|
@Parameter(description = "组件标识", required = true)
|
||||||
|
@PathVariable("storeCode")
|
||||||
|
String storeCode,
|
||||||
|
@Parameter(description = "开发语言", required = true)
|
||||||
|
@RequestParam("language")
|
||||||
|
String language
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "敏感API申请")
|
||||||
|
@PostMapping("apply")
|
||||||
|
CommonResult<Boolean> apply(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "组件类型", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
StoreTypeEnum storeType,
|
||||||
|
@Parameter(description = "组件标识", required = true)
|
||||||
|
@PathVariable("storeCode")
|
||||||
|
String storeCode,
|
||||||
|
@Parameter(description = "申请API请求体")
|
||||||
|
SensitiveApiApplyReq sensitiveApiApplyReq
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "查看敏感API列表")
|
||||||
|
@GetMapping("list")
|
||||||
|
PageResult<SensitiveApiInfo> list(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "组件类型", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
StoreTypeEnum storeType,
|
||||||
|
@Parameter(description = "组件标识", required = true)
|
||||||
|
@PathVariable("storeCode")
|
||||||
|
String storeCode,
|
||||||
|
@Parameter(description = "API名", required = false)
|
||||||
|
@RequestParam("apiName")
|
||||||
|
String apiName,
|
||||||
|
@Parameter(description = "第几页", required = false)
|
||||||
|
@RequestParam("page")
|
||||||
|
Integer page,
|
||||||
|
@Parameter(description = "每页条数", required = false)
|
||||||
|
@RequestParam("pageSize")
|
||||||
|
Integer pageSize
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "取消申请敏感API")
|
||||||
|
@PutMapping("cancel/{id")
|
||||||
|
CommonResult<Boolean> cancel(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "组件类型", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
StoreTypeEnum storeType,
|
||||||
|
@Parameter(description = "组件标识", required = true)
|
||||||
|
@PathVariable("storeCode")
|
||||||
|
String storeCode,
|
||||||
|
@Parameter(description = "敏感API名称", required = true)
|
||||||
|
@PathVariable("id")
|
||||||
|
String id
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,107 @@
|
|||||||
|
package cd.casic.pipeline.store.api.common;
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.enums.StoreTypeEnum;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.sensitive.SensitiveConfReq;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.sensitive.SensitiveConfResp;
|
||||||
|
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.util.List;
|
||||||
|
|
||||||
|
import static cd.casic.ci.common.pipeline.constant.OpsHeader.AUTH_HEADER_USER_ID;
|
||||||
|
|
||||||
|
|
||||||
|
@Tag(name = "USER_MARKET_SENSITIVECONF", description = "敏感数据配置")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/user/market/{storeType}/component/{storeCode}/sensitiveConf/")
|
||||||
|
public interface UserSensitiveConfResource {
|
||||||
|
|
||||||
|
@Operation(summary = "插件工作台-新增敏感数据")
|
||||||
|
@PostMapping("/")
|
||||||
|
CommonResult<Boolean> create(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "组件类型", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
StoreTypeEnum storeType,
|
||||||
|
@Parameter(description = "组件标识", required = true)
|
||||||
|
@PathVariable("storeCode")
|
||||||
|
String storeCode,
|
||||||
|
@Parameter(description = "插件工作台-新增敏感数据报文体", required = true)
|
||||||
|
SensitiveConfReq sensitiveConfReq
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "插件工作台-编辑敏感数据")
|
||||||
|
@PutMapping("/{id}")
|
||||||
|
CommonResult<Boolean> edit(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "组件类型", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
StoreTypeEnum storeType,
|
||||||
|
@Parameter(description = "组件标识", required = true)
|
||||||
|
@PathVariable("storeCode")
|
||||||
|
String storeCode,
|
||||||
|
@Parameter(description = "敏感配置ID", required = true)
|
||||||
|
@PathVariable("id")
|
||||||
|
String id,
|
||||||
|
@Parameter(description = "插件工作台-编辑敏感数据报文体", required = true)
|
||||||
|
SensitiveConfReq sensitiveConfReq
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "删除敏感数据")
|
||||||
|
@DeleteMapping("/")
|
||||||
|
CommonResult<Boolean> delete(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "组件类型", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
StoreTypeEnum storeType,
|
||||||
|
@Parameter(description = "组件标识", required = true)
|
||||||
|
@PathVariable("storeCode")
|
||||||
|
String storeCode,
|
||||||
|
@Parameter(description = "敏感数据ID集合,用\",\"分隔进行拼接(如1,2,3)", required = true)
|
||||||
|
@RequestParam("ids")
|
||||||
|
String ids
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "获取敏感数据")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
CommonResult<SensitiveConfResp> get(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "组件类型", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
StoreTypeEnum storeType,
|
||||||
|
@Parameter(description = "组件标识", required = true)
|
||||||
|
@PathVariable("storeCode")
|
||||||
|
String storeCode,
|
||||||
|
@Parameter(description = "ID", required = true)
|
||||||
|
@PathVariable("id")
|
||||||
|
String id
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "获取敏感数据")
|
||||||
|
@GetMapping("/list")
|
||||||
|
CommonResult<List<SensitiveConfResp>> list(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "组件类型", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
StoreTypeEnum storeType,
|
||||||
|
@Parameter(description = "组件标识", required = true)
|
||||||
|
@PathVariable("storeCode")
|
||||||
|
String storeCode,
|
||||||
|
@Parameter(description = "字段类型集合,用\",\"分隔进行拼接(如BACKEND,FRONTEND,ALL)", required = false)
|
||||||
|
@RequestParam("types")
|
||||||
|
String types
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,98 @@
|
|||||||
|
package cd.casic.pipeline.store.api.common;
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
import cd.casic.framework.commons.pojo.PageResult;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.approval.StoreApproveDetail;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.approval.StoreApproveInfo;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.approval.StoreApproveRequest;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.enums.ApproveStatusEnum;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.enums.ApproveTypeEnum;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.enums.StoreTypeEnum;
|
||||||
|
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.ci.common.pipeline.constant.OpsHeader.AUTH_HEADER_USER_ID;
|
||||||
|
|
||||||
|
@Tag(name = "USER_MARKET_APPROVAL", description = "store组件审批")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/user/market/approval/")
|
||||||
|
public interface UserStoreApproveResource {
|
||||||
|
|
||||||
|
@Operation(summary = "工作台-审批组件")
|
||||||
|
@PutMapping("/types/{storeType}/codes/{storeCode}/ids/{approveId}/approve")
|
||||||
|
CommonResult<Boolean> approveStoreInfo(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "组件类型", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
StoreTypeEnum storeType,
|
||||||
|
@Parameter(description = "组件标识", required = true)
|
||||||
|
@PathVariable("storeCode")
|
||||||
|
String storeCode,
|
||||||
|
@Parameter(description = "审批ID", required = true)
|
||||||
|
@PathVariable("approveId")
|
||||||
|
String approveId,
|
||||||
|
@Parameter(description = "store审批信息请求报文体", required = true)
|
||||||
|
StoreApproveRequest storeApproveRequest
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "工作台-获取组件审批信息列表")
|
||||||
|
@GetMapping("/types/{storeType}/codes/{storeCode}/list")
|
||||||
|
PageResult<StoreApproveInfo> getStoreApproveInfos(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "组件类型", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
StoreTypeEnum storeType,
|
||||||
|
@Parameter(description = "组件标识", required = true)
|
||||||
|
@PathVariable("storeCode")
|
||||||
|
String storeCode,
|
||||||
|
@Parameter(description = "申请人", required = false)
|
||||||
|
@RequestParam("applicant")
|
||||||
|
String applicant,
|
||||||
|
@Parameter(description = "审批类型", required = false)
|
||||||
|
@RequestParam("approveType")
|
||||||
|
ApproveTypeEnum approveType,
|
||||||
|
@Parameter(description = "审批状态", required = false)
|
||||||
|
@RequestParam("approveStatus")
|
||||||
|
ApproveStatusEnum approveStatus,
|
||||||
|
@Parameter(description = "页码", required = true)
|
||||||
|
@RequestParam("page")
|
||||||
|
Integer page,
|
||||||
|
@Parameter(description = "每页数量", required = true)
|
||||||
|
@RequestParam("pageSize")
|
||||||
|
Integer pageSize
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "获取组件审批信息详情")
|
||||||
|
@GetMapping("/ids/{approveId}")
|
||||||
|
CommonResult<StoreApproveDetail> getStoreApproveDetail(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "审批ID", required = true)
|
||||||
|
@PathVariable("approveId")
|
||||||
|
String approveId
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "获取用户关于组件的审批信息")
|
||||||
|
@GetMapping("/types/{storeType}/codes/{storeCode}/user")
|
||||||
|
CommonResult<StoreApproveInfo> getUserStoreApproveInfo(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "组件类型", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
StoreTypeEnum storeType,
|
||||||
|
@Parameter(description = "组件标识", required = true)
|
||||||
|
@PathVariable("storeCode")
|
||||||
|
String storeCode,
|
||||||
|
@Parameter(description = "审批类型", required = true)
|
||||||
|
@RequestParam("approveType")
|
||||||
|
ApproveTypeEnum approveType
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,29 @@
|
|||||||
|
package cd.casic.pipeline.store.api.common;
|
||||||
|
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.classify.Classify;
|
||||||
|
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.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
@Tag(name = "USER_STORE_CLASSIFY", description = "研发商店-组件分类")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/user/store/classifies")
|
||||||
|
public interface UserStoreClassifyResource {
|
||||||
|
|
||||||
|
@Operation(summary = "获取组件分类信息列表")
|
||||||
|
@GetMapping("/types/{storeType}/list")
|
||||||
|
CommonResult<List<Classify>> getClassifyList(
|
||||||
|
@Parameter(description = "组件类型", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
String storeType
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,40 @@
|
|||||||
|
package cd.casic.pipeline.store.api.common;
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.comment.StoreCommentReplyInfo;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.comment.StoreCommentReplyRequest;
|
||||||
|
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.util.List;
|
||||||
|
|
||||||
|
import static cd.casic.ci.common.pipeline.constant.OpsHeader.AUTH_HEADER_USER_ID;
|
||||||
|
|
||||||
|
@Tag(name = "USER_STORE_COMMENT_REPLY", description = "研发商店-组件评论回复")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/user/store/comment/replies")
|
||||||
|
public interface UserStoreCommentReplyResource {
|
||||||
|
|
||||||
|
@Operation(summary = "获取组件相应评论的回复列表")
|
||||||
|
@GetMapping("/comments/{commentId}/list")
|
||||||
|
CommonResult<List<StoreCommentReplyInfo>> getStoreCommentReplyListByCommentId(
|
||||||
|
@Parameter(description = "评论ID", required = true)
|
||||||
|
@PathVariable("commentId")
|
||||||
|
String commentId
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "组件评论回复")
|
||||||
|
@PostMapping("/comments/{commentId}/reply")
|
||||||
|
CommonResult<StoreCommentReplyInfo> addStoreCommentReply(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "评论ID", required = true)
|
||||||
|
@PathVariable("commentId")
|
||||||
|
String commentId,
|
||||||
|
@Parameter(description = "评论回复信息请求报文体", required = true)
|
||||||
|
StoreCommentReplyRequest storeCommentReplyRequest
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,101 @@
|
|||||||
|
package cd.casic.pipeline.store.api.common;
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
import cd.casic.framework.commons.pojo.PageResult;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.comment.StoreCommentInfo;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.comment.StoreCommentRequest;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.comment.StoreCommentScoreInfo;
|
||||||
|
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.ci.common.pipeline.constant.OpsHeader.AUTH_HEADER_USER_ID;
|
||||||
|
|
||||||
|
@Tag(name = "USER_STORE_COMMENT", description = "研发商店-组件评论")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/user/store/comments")
|
||||||
|
public interface UserStoreCommentResource {
|
||||||
|
|
||||||
|
@Operation(summary = "获取组件评论接口")
|
||||||
|
@GetMapping("/{commentId}/get")
|
||||||
|
CommonResult<StoreCommentInfo> getStoreComment(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "评论ID", required = true)
|
||||||
|
@PathVariable("commentId")
|
||||||
|
String commentId
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "获取组件的评论列表")
|
||||||
|
@GetMapping("/types/{storeType}/codes/{storeCode}/list")
|
||||||
|
PageResult<StoreCommentInfo> getStoreComments(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "组件类型", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
String storeType,
|
||||||
|
@Parameter(description = "组件代码", required = true)
|
||||||
|
@PathVariable("storeCode")
|
||||||
|
String storeCode,
|
||||||
|
@Parameter(description = "页码", required = true)
|
||||||
|
@RequestParam("page")
|
||||||
|
Integer page,
|
||||||
|
@Parameter(description = "每页数量", required = true)
|
||||||
|
@RequestParam("pageSize")
|
||||||
|
Integer pageSize
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "获取组件的评分详情")
|
||||||
|
@GetMapping("/types/{storeType}/codes/{storeCode}/score/get")
|
||||||
|
CommonResult<StoreCommentScoreInfo> getStoreCommentScoreInfo(
|
||||||
|
@Parameter(description = "组件类型", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
String storeType,
|
||||||
|
@Parameter(description = "组件代码", required = true)
|
||||||
|
@PathVariable("storeCode")
|
||||||
|
String storeCode
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "新增组件评论")
|
||||||
|
@PostMapping("/ids/{storeId}/codes/{storeCode}/add")
|
||||||
|
CommonResult<StoreCommentInfo> addStoreComment(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "组件ID", required = true)
|
||||||
|
@PathVariable("storeId")
|
||||||
|
String storeId,
|
||||||
|
@Parameter(description = "组件代码", required = true)
|
||||||
|
@PathVariable("storeCode")
|
||||||
|
String storeCode,
|
||||||
|
@Parameter(description = "评论信息请求报文体", required = true)
|
||||||
|
StoreCommentRequest storeCommentRequest
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "更新组件评论")
|
||||||
|
@PutMapping("/{commentId}/update")
|
||||||
|
CommonResult<Boolean> updateStoreComment(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "评论ID", required = true)
|
||||||
|
@PathVariable("commentId")
|
||||||
|
String commentId,
|
||||||
|
@Parameter(description = "评论信息请求报文体", required = true)
|
||||||
|
StoreCommentRequest storeCommentRequest
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "评论点赞")
|
||||||
|
@PutMapping("/{commentId}/praise")
|
||||||
|
CommonResult<Integer> updateStoreCommentPraiseCount(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "评论ID", required = true)
|
||||||
|
@PathVariable("commentId")
|
||||||
|
String commentId
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,111 @@
|
|||||||
|
package cd.casic.pipeline.store.api.common;
|
||||||
|
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.InstallStoreReq;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.StoreBaseInfoUpdateRequest;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.UnInstallReq;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.enums.StoreTypeEnum;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.test.StoreTestRequest;
|
||||||
|
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.ci.common.pipeline.constant.OpsHeader.*;
|
||||||
|
|
||||||
|
|
||||||
|
@Tag(name = "USER_STORE_COMPONENT", description = "研发商店-组件管理")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/user/store/components")
|
||||||
|
public interface UserStoreComponentManageResource {
|
||||||
|
|
||||||
|
@Operation(summary = "更新组件基本信息")
|
||||||
|
@PutMapping("/types/{storeType}/codes/{storeCode}/component/base/info/update")
|
||||||
|
CommonResult<Boolean> updateComponentBaseInfo(
|
||||||
|
@Parameter(description = "用户ID", required = true, example = AUTH_HEADER_USER_ID_DEFAULT_VALUE)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "组件类型", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
String storeType,
|
||||||
|
@Parameter(description = "组件代码", required = true)
|
||||||
|
@PathVariable("storeCode")
|
||||||
|
String storeCode,
|
||||||
|
@Parameter(description = "组件基本信息修改请求报文体", required = true)
|
||||||
|
StoreBaseInfoUpdateRequest storeBaseInfoUpdateRequest
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "安装组件到项目")
|
||||||
|
@PostMapping("/component/install")
|
||||||
|
CommonResult<Boolean> installComponent(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "安装组件到项目请求报文体", required = true)
|
||||||
|
InstallStoreReq installStoreReq
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "卸载组件")
|
||||||
|
@DeleteMapping("/projects/{projectCode}/types/{storeType}/codes/{storeCode}/component/uninstall")
|
||||||
|
CommonResult<Boolean> uninstallComponent(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "项目代码", required = true)
|
||||||
|
@PathVariable("projectCode")
|
||||||
|
String projectCode,
|
||||||
|
@Parameter(description = "组件类型", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
String storeType,
|
||||||
|
@Parameter(description = "组件代码", required = true)
|
||||||
|
@PathVariable("storeCode")
|
||||||
|
String storeCode,
|
||||||
|
@Parameter(description = "卸载组件请求包体", required = true)
|
||||||
|
UnInstallReq unInstallReq
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "删除工作台组件")
|
||||||
|
@DeleteMapping("/desk/types/{storeType}/codes/{storeCode}/component/delete")
|
||||||
|
CommonResult<Boolean> deleteComponent(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "组件类型", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
String storeType,
|
||||||
|
@Parameter(description = "组件代码", required = true)
|
||||||
|
@PathVariable("storeCode")
|
||||||
|
String storeCode
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "更改组件授权人信息")
|
||||||
|
@PutMapping("/types/{storeType}/codes/{storeCode}/component/repository/authorizer/update")
|
||||||
|
CommonResult<Boolean> updateStoreRepositoryAuthorizer(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "组件类型", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
StoreTypeEnum storeType,
|
||||||
|
@Parameter(description = "组件代码", required = true)
|
||||||
|
@PathVariable("storeCode")
|
||||||
|
String storeCode
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "保存组件测试信息")
|
||||||
|
@PutMapping("/types/{storeType}/codes/{storeCode}/component/test/info/save")
|
||||||
|
CommonResult<Boolean> saveStoreTestInfo(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "组件类型", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
StoreTypeEnum storeType,
|
||||||
|
@Parameter(description = "组件代码", required = true)
|
||||||
|
@PathVariable("storeCode")
|
||||||
|
String storeCode,
|
||||||
|
@Parameter(description = "组件测试信息请求报文", required = true)
|
||||||
|
StoreTestRequest storeTestRequest
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,225 @@
|
|||||||
|
package cd.casic.pipeline.store.api.common;
|
||||||
|
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
import cd.casic.framework.commons.pojo.PageResult;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.MarketItem;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.MarketMainItem;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.MyStoreComponent;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.StoreDetailInfo;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.enums.RdTypeEnum;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.enums.StoreSortTypeEnum;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.enums.StoreTypeEnum;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.media.StoreMediaInfo;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.test.StoreTestItem;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.version.StoreDeskVersionItem;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.version.StoreShowVersionInfo;
|
||||||
|
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.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
import static cd.casic.ci.common.pipeline.constant.OpsHeader.AUTH_HEADER_USER_ID;
|
||||||
|
|
||||||
|
|
||||||
|
@Tag(name = "USER_STORE_COMPONENT", description = "研发商店-组件查询")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/user/store/components")
|
||||||
|
public interface UserStoreComponentQueryResource {
|
||||||
|
|
||||||
|
@Operation(summary = "根据用户获取工作台组件列表")
|
||||||
|
@GetMapping("/desk/types/{storeType}/component/list")
|
||||||
|
PageResult<MyStoreComponent> getMyComponents(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "组件类型", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
String storeType,
|
||||||
|
@Parameter(description = "组件名称", required = false)
|
||||||
|
@RequestParam("name")
|
||||||
|
String name,
|
||||||
|
@Parameter(description = "页码", required = true)
|
||||||
|
@RequestParam("page")
|
||||||
|
Integer page,
|
||||||
|
@Parameter(description = "每页数量", required = true)
|
||||||
|
@RequestParam("pageSize")
|
||||||
|
Integer pageSize
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "根据组件标识获取组件版本列表")
|
||||||
|
@GetMapping("/desk/types/{storeType}/codes/{storeCode}/component/version/list")
|
||||||
|
PageResult<StoreDeskVersionItem> getComponentVersionsByCode(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "组件类型", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
String storeType,
|
||||||
|
@Parameter(description = "组件代码", required = true)
|
||||||
|
@PathVariable("storeCode")
|
||||||
|
String storeCode,
|
||||||
|
@Parameter(description = "页码", required = true)
|
||||||
|
@RequestParam("page")
|
||||||
|
Integer page,
|
||||||
|
@Parameter(description = "每页数量", required = true)
|
||||||
|
@RequestParam("pageSize")
|
||||||
|
Integer pageSize
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "根据组件ID获取组件详情")
|
||||||
|
@GetMapping("/types/{storeType}/ids/{storeId}/component/detail")
|
||||||
|
CommonResult<StoreDetailInfo> getComponentDetailInfoById(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "组件类型", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
String storeType,
|
||||||
|
@Parameter(description = "组件ID", required = true)
|
||||||
|
@PathVariable("storeId")
|
||||||
|
String storeId
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "根据组件代码获取组件详情")
|
||||||
|
@GetMapping("/types/{storeType}/codes/{storeCode}/component/detail")
|
||||||
|
CommonResult<StoreDetailInfo> getComponentDetailInfoByCode(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "组件类型", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
String storeType,
|
||||||
|
@Parameter(description = "组件代码", required = true)
|
||||||
|
@PathVariable("storeCode")
|
||||||
|
String storeCode
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "获取研发商店首页组件的数据")
|
||||||
|
@GetMapping("/types/{storeType}/component/main/page/list")
|
||||||
|
CommonResult<List<MarketMainItem>> getMainPageComponents(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "组件类型", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
String storeType,
|
||||||
|
@Parameter(description = "项目代码", required = false)
|
||||||
|
@RequestParam("projectCode")
|
||||||
|
String projectCode,
|
||||||
|
@Parameter(description = "实例ID", required = false)
|
||||||
|
@RequestParam("instanceId")
|
||||||
|
String instanceId,
|
||||||
|
@Parameter(description = "页码", required = true)
|
||||||
|
@RequestParam("page")
|
||||||
|
Integer page,
|
||||||
|
@Parameter(description = "每页数量", required = true)
|
||||||
|
@RequestParam("pageSize")
|
||||||
|
Integer pageSize
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "根据条件查询组件列表")
|
||||||
|
|
||||||
|
@GetMapping("/types/{storeType}/component/list")
|
||||||
|
PageResult<MarketItem> queryComponents(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "组件类型", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
String storeType,
|
||||||
|
@Parameter(description = "项目代码", required = false)
|
||||||
|
@RequestParam("projectCode")
|
||||||
|
String projectCode,
|
||||||
|
@Parameter(description = "搜索关键字", required = false)
|
||||||
|
@RequestParam("keyword")
|
||||||
|
String keyword,
|
||||||
|
@Parameter(description = "分类ID", required = false)
|
||||||
|
@RequestParam("classifyId")
|
||||||
|
String classifyId,
|
||||||
|
@Parameter(description = "标签ID", required = false)
|
||||||
|
@RequestParam("labelId")
|
||||||
|
String labelId,
|
||||||
|
@Parameter(description = "范畴ID", required = false)
|
||||||
|
@RequestParam("categoryId")
|
||||||
|
String categoryId,
|
||||||
|
@Parameter(description = "评分", required = false)
|
||||||
|
@RequestParam("score")
|
||||||
|
Integer score,
|
||||||
|
@Parameter(description = "研发来源类型", required = false)
|
||||||
|
@RequestParam("rdType")
|
||||||
|
RdTypeEnum rdType,
|
||||||
|
@Parameter(description = "是否推荐标识 true:推荐,false:不推荐", required = false)
|
||||||
|
@RequestParam("recommendFlag")
|
||||||
|
Boolean recommendFlag,
|
||||||
|
@Parameter(description = "是否已在该项目安装 true:是,false:否", required = false)
|
||||||
|
@RequestParam("installed")
|
||||||
|
Boolean installed,
|
||||||
|
@Parameter(description = "是否需要更新标识 true:需要,false:不需要", required = false)
|
||||||
|
@RequestParam("updateFlag")
|
||||||
|
Boolean updateFlag,
|
||||||
|
@Parameter(description = "是否查询项目下组件标识", required = true)
|
||||||
|
@RequestParam("queryProjectComponentFlag")
|
||||||
|
Boolean queryProjectComponentFlag,
|
||||||
|
@Parameter(description = "排序", required = false)
|
||||||
|
@RequestParam("sortType")
|
||||||
|
StoreSortTypeEnum sortType,
|
||||||
|
@Parameter(description = "实例ID", required = false)
|
||||||
|
@RequestParam("instanceId")
|
||||||
|
String instanceId,
|
||||||
|
@Parameter(description = "是否查测试中版本 true:是,false:否", required = false)
|
||||||
|
@RequestParam("queryTestFlag")
|
||||||
|
Boolean queryTestFlag,
|
||||||
|
@Parameter(description = "页码", required = true)
|
||||||
|
@RequestParam("page")
|
||||||
|
Integer page,
|
||||||
|
@Parameter(description = "每页数量", required = true)
|
||||||
|
@RequestParam("pageSize")
|
||||||
|
Integer pageSize
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "根据组件标识获取组件回显版本信息")
|
||||||
|
@GetMapping("/types/{storeType}/codes/{storeCode}/component/showVersionInfo")
|
||||||
|
CommonResult<StoreShowVersionInfo> getComponentShowVersionInfo(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "组件类型", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
String storeType,
|
||||||
|
@Parameter(description = "组件代码", required = true)
|
||||||
|
@PathVariable("storeCode")
|
||||||
|
String storeCode
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "获取组件测试信息")
|
||||||
|
@GetMapping("/types/{storeType}/codes/{storeCode}/component/test/info/get")
|
||||||
|
CommonResult<Set<StoreTestItem>> getStoreTestInfo(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "组件类型", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
StoreTypeEnum storeType,
|
||||||
|
@Parameter(description = "组件代码", required = true)
|
||||||
|
@PathVariable("storeCode")
|
||||||
|
String storeCode
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "获取组件媒体信息")
|
||||||
|
@GetMapping("/types/{storeType}/codes/{storeCode}/component/media/info/get")
|
||||||
|
CommonResult<List<StoreMediaInfo>> getStoreMediaInfo(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "组件类型", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
StoreTypeEnum storeType,
|
||||||
|
@Parameter(description = "组件代码", required = true)
|
||||||
|
@PathVariable("storeCode")
|
||||||
|
String storeCode
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,107 @@
|
|||||||
|
package cd.casic.pipeline.store.api.common;
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.env.StoreEnvChangeLogInfo;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.env.StoreEnvVarInfo;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.env.StoreEnvVarRequest;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import jakarta.validation.Valid;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import static cd.casic.ci.common.pipeline.constant.OpsHeader.AUTH_HEADER_USER_ID;
|
||||||
|
|
||||||
|
|
||||||
|
@Tag(name = "USER_STORE_ENV_VAR", description = "环境变量")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/user/store/env/var")
|
||||||
|
public interface UserStoreEnvVarResource {
|
||||||
|
|
||||||
|
@Operation(summary = "新增环境变量")
|
||||||
|
@PostMapping("/create")
|
||||||
|
CommonResult<Boolean> create(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "环境变量请求报文体", required = true)
|
||||||
|
@Valid
|
||||||
|
StoreEnvVarRequest storeEnvVarRequest
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "更新环境变量")
|
||||||
|
@PostMapping("/update")
|
||||||
|
CommonResult<Boolean> update(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "变量ID", required = true)
|
||||||
|
@RequestParam("variableId")
|
||||||
|
String variableId,
|
||||||
|
@Parameter(description = "环境变量请求报文体", required = true)
|
||||||
|
@Valid
|
||||||
|
StoreEnvVarRequest storeEnvVarRequest
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "删除环境变量")
|
||||||
|
@DeleteMapping("/types/{storeType}/codes/{storeCode}")
|
||||||
|
CommonResult<Boolean> delete(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "组件类型", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
String storeType,
|
||||||
|
@Parameter(description = "组件标识", required = true)
|
||||||
|
@PathVariable("storeCode")
|
||||||
|
String storeCode,
|
||||||
|
@Parameter(description = "生效范围 TEST:测试 PRD:正式 ALL:所有", required = true)
|
||||||
|
@RequestParam("scope")
|
||||||
|
String scope,
|
||||||
|
@Parameter(description = "环境变量名称集合,用\",\"分隔进行拼接(如1,2,3)", required = true)
|
||||||
|
@RequestParam("varNames")
|
||||||
|
String varNames
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "获取最新的环境变量列表")
|
||||||
|
@GetMapping("/latest/types/{storeType}/codes/{storeCode}")
|
||||||
|
CommonResult<List<StoreEnvVarInfo>> getLatestEnvVarList(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "组件类型", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
String storeType,
|
||||||
|
@Parameter(description = "组件标识", required = true)
|
||||||
|
@PathVariable("storeCode")
|
||||||
|
String storeCode,
|
||||||
|
@Parameter(description = "生效范围 TEST:测试 PRD:正式 ALL:所有", required = false)
|
||||||
|
@RequestParam("scope")
|
||||||
|
String scope,
|
||||||
|
@Parameter(description = "变量名", required = false)
|
||||||
|
@RequestParam("varName")
|
||||||
|
String varName
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "获取环境变量变更记录列表")
|
||||||
|
@GetMapping("/change/log/types/{storeType}/codes/{storeCode}/vars/{varName}")
|
||||||
|
CommonResult<List<StoreEnvChangeLogInfo>> getEnvVarChangeLogList(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "组件类型", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
String storeType,
|
||||||
|
@Parameter(description = "组件标识", required = true)
|
||||||
|
@PathVariable("storeCode")
|
||||||
|
String storeCode,
|
||||||
|
@Parameter(description = "生效范围 TEST:测试 PRD:正式 ALL:所有", required = true)
|
||||||
|
@RequestParam("scope")
|
||||||
|
String scope,
|
||||||
|
@Parameter(description = "变量名", required = true)
|
||||||
|
@PathVariable("varName")
|
||||||
|
String varName
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,13 @@
|
|||||||
|
package cd.casic.pipeline.store.api.common;
|
||||||
|
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
@Tag(name = "USER_STORE_HONOR", description = "研发商店——组件荣誉")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/user/store/honor")
|
||||||
|
public interface UserStoreHonorResource {
|
||||||
|
// todo
|
||||||
|
}
|
@ -0,0 +1,60 @@
|
|||||||
|
package cd.casic.pipeline.store.api.common;
|
||||||
|
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
import cd.casic.framework.commons.pojo.PageResult;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.index.StoreIndexBaseInfo;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.index.StoreIndexCreateRequest;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import jakarta.validation.Valid;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import static cd.casic.ci.common.pipeline.constant.OpsHeader.AUTH_HEADER_USER_ID;
|
||||||
|
|
||||||
|
|
||||||
|
@Tag(name = "USER_STORE_INDEX_MANAGE", description = "研发商店指标管理")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/user/store/indexs/manage")
|
||||||
|
public interface UserStoreIndexManageResource {
|
||||||
|
|
||||||
|
@Operation(summary = "新增研发商店指标")
|
||||||
|
@PostMapping("/add")
|
||||||
|
CommonResult<Boolean> add(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "研发商店指标请求报文体", required = true)
|
||||||
|
@Valid
|
||||||
|
StoreIndexCreateRequest storeIndexCreateRequest
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "删除研发商店指标")
|
||||||
|
@DeleteMapping("/indexIds/{indexId}/delete")
|
||||||
|
CommonResult<Boolean> delete(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "指标ID", required = true)
|
||||||
|
@PathVariable("indexId")
|
||||||
|
String indexId
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "查询研发商店指标")
|
||||||
|
@GetMapping("/list")
|
||||||
|
PageResult<StoreIndexBaseInfo> list(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "查询关键字", required = false)
|
||||||
|
@RequestParam("keyWords")
|
||||||
|
String keyWords,
|
||||||
|
@Parameter(description = "页码", required = true, example = "1")
|
||||||
|
@RequestParam("page")
|
||||||
|
int page,
|
||||||
|
@Parameter(description = "每页数量", required = true, example = "10")
|
||||||
|
@RequestParam("pageSize")
|
||||||
|
int pageSize
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,38 @@
|
|||||||
|
package cd.casic.pipeline.store.api.common;
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.label.Label;
|
||||||
|
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.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Tag(name = "USER_STORE_LABEL", description = "研发商店-标签")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/user/store/labels")
|
||||||
|
public interface UserStoreLabelResource {
|
||||||
|
|
||||||
|
@Operation(summary = "获取组件标签列表")
|
||||||
|
@GetMapping("/types/{storeType}/list")
|
||||||
|
CommonResult<List<Label>> getLabelList(
|
||||||
|
@Parameter(description = "组件类型", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
String storeType
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "根据组件ID获取标签列表")
|
||||||
|
@GetMapping("/types/{storeType}/ids/{storeId}/list")
|
||||||
|
CommonResult<List<Label>> getLabelListByStoreId(
|
||||||
|
@Parameter(description = "组件类型", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
String storeType,
|
||||||
|
@Parameter(description = "组件ID", required = true)
|
||||||
|
@PathVariable("storeId")
|
||||||
|
String storeId
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,121 @@
|
|||||||
|
package cd.casic.pipeline.store.api.common;
|
||||||
|
|
||||||
|
|
||||||
|
import cd.casic.ci.log.dal.pojo.QueryLogs;
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.enums.StoreTypeEnum;
|
||||||
|
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.ci.common.pipeline.constant.OpsHeader.AUTH_HEADER_USER_ID;
|
||||||
|
import static cd.casic.ci.common.pipeline.constant.OpsHeader.AUTH_HEADER_USER_ID_DEFAULT_VALUE;
|
||||||
|
|
||||||
|
@Tag(name = "USER_STORE_LOG", description = "研发商店-日志")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/user/store/logs")
|
||||||
|
public interface UserStoreLogResource {
|
||||||
|
|
||||||
|
@Operation(summary = "根据构建ID获取初始化所有日志")
|
||||||
|
@GetMapping("/types/{storeType}/projects/{projectCode}/pipelines/{pipelineId}/builds/{buildId}/")
|
||||||
|
CommonResult<QueryLogs> getInitLogs(
|
||||||
|
@Parameter(description = "用户ID", required = true, example = AUTH_HEADER_USER_ID_DEFAULT_VALUE)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "研发商店组件类型", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
StoreTypeEnum storeType,
|
||||||
|
@Parameter(description = "项目代码", required = true)
|
||||||
|
@PathVariable("projectCode")
|
||||||
|
String projectCode,
|
||||||
|
@Parameter(description = "流水线ID", required = true)
|
||||||
|
@PathVariable("pipelineId")
|
||||||
|
String pipelineId,
|
||||||
|
@Parameter(description = "构建ID", required = true)
|
||||||
|
@PathVariable("buildId")
|
||||||
|
String buildId,
|
||||||
|
@Parameter(description = "是否包含调试日志", required = false)
|
||||||
|
@RequestParam("debug")
|
||||||
|
Boolean debug,
|
||||||
|
@Parameter(description = "对应elementId", required = false)
|
||||||
|
@RequestParam("tag")
|
||||||
|
String tag,
|
||||||
|
@Parameter(description = "执行次数", required = false)
|
||||||
|
@RequestParam("executeCount")
|
||||||
|
Integer executeCount
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "获取更多日志")
|
||||||
|
@GetMapping("/types/{storeType}/projects/{projectCode}/pipelines/{pipelineId}/builds/{buildId}/more")
|
||||||
|
CommonResult<QueryLogs> getMoreLogs(
|
||||||
|
@Parameter(description = "用户ID", required = true, example = AUTH_HEADER_USER_ID_DEFAULT_VALUE)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "研发商店组件类型", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
StoreTypeEnum storeType,
|
||||||
|
@Parameter(description = "项目代码", required = true)
|
||||||
|
@PathVariable("projectCode")
|
||||||
|
String projectCode,
|
||||||
|
@Parameter(description = "流水线ID", required = true)
|
||||||
|
@PathVariable("pipelineId")
|
||||||
|
String pipelineId,
|
||||||
|
@Parameter(description = "构建ID", required = true)
|
||||||
|
@PathVariable("buildId")
|
||||||
|
String buildId,
|
||||||
|
@Parameter(description = "是否包含调试日志", required = false)
|
||||||
|
@RequestParam("debug")
|
||||||
|
Boolean debug,
|
||||||
|
@Parameter(description = "日志行数", required = false)
|
||||||
|
@RequestParam("num")
|
||||||
|
Integer num,
|
||||||
|
@Parameter(description = "是否正序输出", required = false)
|
||||||
|
@RequestParam("fromStart")
|
||||||
|
Boolean fromStart,
|
||||||
|
@Parameter(description = "起始行号", required = true)
|
||||||
|
@RequestParam("start")
|
||||||
|
Long start,
|
||||||
|
@Parameter(description = "结尾行号", required = true)
|
||||||
|
@RequestParam("end")
|
||||||
|
Long end,
|
||||||
|
@Parameter(description = "对应elementId", required = false)
|
||||||
|
@RequestParam("tag")
|
||||||
|
String tag,
|
||||||
|
@Parameter(description = "执行次数", required = false)
|
||||||
|
@RequestParam("executeCount")
|
||||||
|
Integer executeCount
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "获取某行后的日志")
|
||||||
|
@GetMapping("/types/{storeType}/projects/{projectCode}/pipelines/{pipelineId}/builds/{buildId}/after")
|
||||||
|
CommonResult<QueryLogs> getAfterLogs(
|
||||||
|
@Parameter(description = "用户ID", required = true, example = AUTH_HEADER_USER_ID_DEFAULT_VALUE)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "研发商店组件类型", required = true)
|
||||||
|
@PathVariable("storeType")
|
||||||
|
StoreTypeEnum storeType,
|
||||||
|
@Parameter(description = "项目代码", required = true)
|
||||||
|
@PathVariable("projectCode")
|
||||||
|
String projectCode,
|
||||||
|
@Parameter(description = "流水线ID", required = true)
|
||||||
|
@PathVariable("pipelineId")
|
||||||
|
String pipelineId,
|
||||||
|
@Parameter(description = "构建ID", required = true)
|
||||||
|
@PathVariable("buildId")
|
||||||
|
String buildId,
|
||||||
|
@Parameter(description = "起始行号", required = true)
|
||||||
|
@RequestParam("start")
|
||||||
|
Long start,
|
||||||
|
@Parameter(description = "是否包含调试日志", required = false)
|
||||||
|
@RequestParam("debug")
|
||||||
|
Boolean debug,
|
||||||
|
@Parameter(description = "对应elementId", required = false)
|
||||||
|
@RequestParam("tag")
|
||||||
|
String tag,
|
||||||
|
@Parameter(description = "执行次数", required = false)
|
||||||
|
@RequestParam("executeCount")
|
||||||
|
Integer executeCount
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
package cd.casic.pipeline.store.api.common;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
@Tag(name = "USER_STORE_LOGO", description = "STORE-LOGO")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/user/store/logo")
|
||||||
|
public interface UserStoreLogoResource {
|
||||||
|
//todo
|
||||||
|
}
|
@ -0,0 +1,95 @@
|
|||||||
|
package cd.casic.pipeline.store.api.common;
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.enums.StoreTypeEnum;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.member.StoreMemberItem;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.member.StoreMemberReq;
|
||||||
|
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.util.List;
|
||||||
|
|
||||||
|
import static cd.casic.ci.common.pipeline.constant.OpsHeader.AUTH_HEADER_USER_ID;
|
||||||
|
|
||||||
|
@Tag(name = "USER_STORE_MEMBER", description = "STORE-组件-用户")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/user/market/desk/store/member/")
|
||||||
|
public interface UserStoreMemberResource {
|
||||||
|
|
||||||
|
@Operation(summary = "获取store组件成员列表")
|
||||||
|
@GetMapping("/list")
|
||||||
|
CommonResult<List<StoreMemberItem>> list(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "store组件标识", required = true)
|
||||||
|
@RequestParam("storeCode")
|
||||||
|
String storeCode,
|
||||||
|
@Parameter(description = "store组件类型", required = true)
|
||||||
|
@RequestParam("storeType")
|
||||||
|
StoreTypeEnum storeType
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "添加store组件成员")
|
||||||
|
@PostMapping("/add")
|
||||||
|
CommonResult<Boolean> add(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "添加成员请求报文")
|
||||||
|
StoreMemberReq storeMemberReq
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "删除store组件成员")
|
||||||
|
@DeleteMapping("/delete")
|
||||||
|
CommonResult<Boolean> delete(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "成员ID", required = true)
|
||||||
|
@RequestParam("id")
|
||||||
|
String id,
|
||||||
|
@Parameter(description = "store组件标识", required = true)
|
||||||
|
@RequestParam("storeCode")
|
||||||
|
String storeCode,
|
||||||
|
@Parameter(description = "store组件类型", required = true)
|
||||||
|
@RequestParam("storeType")
|
||||||
|
StoreTypeEnum storeType
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "查看store组件成员信息")
|
||||||
|
@GetMapping("/view")
|
||||||
|
CommonResult<StoreMemberItem> view(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "store组件标识", required = true)
|
||||||
|
@RequestParam("storeCode")
|
||||||
|
String storeCode,
|
||||||
|
@Parameter(description = "store组件类型", required = true)
|
||||||
|
@RequestParam("storeType")
|
||||||
|
StoreTypeEnum storeType
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "修改store组件成员的调试项目")
|
||||||
|
@PutMapping("/test/project/change")
|
||||||
|
CommonResult<Boolean> changeMemberTestProjectCode(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "store组件成员", required = true)
|
||||||
|
@RequestParam("storeMember")
|
||||||
|
String storeMember,
|
||||||
|
@Parameter(description = "项目代码", required = true)
|
||||||
|
@RequestParam("projectCode")
|
||||||
|
String projectCode,
|
||||||
|
@Parameter(description = "store组件标识", required = true)
|
||||||
|
@RequestParam("storeCode")
|
||||||
|
String storeCode,
|
||||||
|
@Parameter(description = "store组件类型", required = true)
|
||||||
|
@RequestParam("storeType")
|
||||||
|
StoreTypeEnum storeType
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,33 @@
|
|||||||
|
package cd.casic.pipeline.store.api.common;
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.enums.StoreTypeEnum;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.publication.PublisherInfo;
|
||||||
|
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.util.List;
|
||||||
|
|
||||||
|
import static cd.casic.ci.common.pipeline.constant.OpsHeader.AUTH_HEADER_USER_ID;
|
||||||
|
|
||||||
|
@Tag(name = "USER_MARKET_PUBLISHERS", description = "研发商店-发布者")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/user/market/publishers")
|
||||||
|
public interface UserStorePublishersResource {
|
||||||
|
|
||||||
|
@Operation(summary = "获取发布组件可选发布者")
|
||||||
|
@GetMapping("/get")
|
||||||
|
CommonResult<List<PublisherInfo>> getPublishers(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "storeCode", required = true)
|
||||||
|
@RequestParam("storeCode")
|
||||||
|
String storeCode,
|
||||||
|
@Parameter(description = "storeType", required = true)
|
||||||
|
@RequestParam("storeType")
|
||||||
|
StoreTypeEnum storeType
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,122 @@
|
|||||||
|
package cd.casic.pipeline.store.api.common;
|
||||||
|
|
||||||
|
|
||||||
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.StoreOfflineRequest;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.StoreReleaseInfoUpdateRequest;
|
||||||
|
import cd.casic.pipeline.store.pojo.common.publication.*;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import jakarta.validation.Valid;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import static cd.casic.ci.common.pipeline.constant.OpsHeader.AUTH_HEADER_USER_ID;
|
||||||
|
|
||||||
|
@Tag(name = "USER_STORE_RELEASE", description = "研发商店-发布管理")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/user/store/releases")
|
||||||
|
public interface UserStoreReleaseResource {
|
||||||
|
|
||||||
|
@Operation(summary = "新增组件")
|
||||||
|
@PostMapping("/component/create")
|
||||||
|
CommonResult<StoreCreateResponse> createComponent(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "工作台-新增组件请求报文体", required = true)
|
||||||
|
@Valid
|
||||||
|
StoreCreateRequest storeCreateRequest
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "更新组件")
|
||||||
|
@PutMapping("/component/update")
|
||||||
|
CommonResult<StoreUpdateResponse> updateComponent(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "工作台-更新组件请求报文体", required = true)
|
||||||
|
@Valid
|
||||||
|
StoreUpdateRequest storeUpdateRequest
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "根据组件ID获取版本发布进度")
|
||||||
|
@GetMapping("/components/{storeId}/process/info")
|
||||||
|
CommonResult<StoreProcessInfo> getProcessInfo(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "storeId", required = true)
|
||||||
|
@PathVariable("storeId")
|
||||||
|
String storeId
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "取消版本发布")
|
||||||
|
@PutMapping("/components/{storeId}/cancel")
|
||||||
|
CommonResult<Boolean> cancelRelease(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "storeId", required = true)
|
||||||
|
@PathVariable("storeId")
|
||||||
|
String storeId
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "确认通过测试")
|
||||||
|
@PutMapping("/components/{storeId}/test/pass")
|
||||||
|
CommonResult<Boolean> passTest(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "storeId", required = true)
|
||||||
|
@PathVariable("storeId")
|
||||||
|
String storeId
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "填写信息")
|
||||||
|
@PutMapping("/components/{storeId}/release/info/edit")
|
||||||
|
CommonResult<Boolean> editReleaseInfo(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "storeId", required = true)
|
||||||
|
@PathVariable("storeId")
|
||||||
|
String storeId,
|
||||||
|
@Parameter(description = "填写信息请求报文体", required = true)
|
||||||
|
@Valid
|
||||||
|
StoreReleaseInfoUpdateRequest storeReleaseInfoUpdateRequest
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "下架组件")
|
||||||
|
@PutMapping("/component/offline")
|
||||||
|
CommonResult<Boolean> offlineComponent(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "工作台-下架组件请求报文体", required = true)
|
||||||
|
@Valid
|
||||||
|
StoreOfflineRequest storeOfflineRequest
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "重新构建")
|
||||||
|
@PutMapping("/components/{storeId}/rebuild")
|
||||||
|
CommonResult<Boolean> rebuild(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "组件Id", required = true)
|
||||||
|
@PathVariable("storeId")
|
||||||
|
String storeId
|
||||||
|
);
|
||||||
|
|
||||||
|
@Operation(summary = "返回上一步")
|
||||||
|
@PutMapping("/components/{storeId}/step/back")
|
||||||
|
CommonResult<Boolean> back(
|
||||||
|
@Parameter(description = "userId", required = true)
|
||||||
|
@RequestHeader(AUTH_HEADER_USER_ID)
|
||||||
|
String userId,
|
||||||
|
@Parameter(description = "组件Id", required = true)
|
||||||
|
@PathVariable("storeId")
|
||||||
|
String storeId
|
||||||
|
);
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user