CI/CD初始化

master
Number7 2024-07-27 12:43:34 +08:00
parent 69ae84081a
commit 3ed79a5512
3 changed files with 24 additions and 10 deletions

14
Dockerfile 100644
View File

@ -0,0 +1,14 @@
#指定构建镜像的起始镜像
FROM anolis-registry.cn-zhangjiakou.cr.aliyuncs.com/openanolis/openjdk:17-8.6
#执行一些必备的条件
# home
# app.jar 启动jar包
# logs 日志文件
ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo '$TZ' > /etc/timezone
#挂载工作目录
VOLUME ["/home/logs/cloud-auth"]
#拷贝执行文件
COPY ./target/cloud-auth.jar /home/app.jar
ENTRYPOINT ["java","-jar"]
CMD ["/home/app.jar"]

18
pom.xml
View File

@ -3,13 +3,15 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent> <parent>
<groupId>com.muyu</groupId> <groupId>com.muyu</groupId>
<artifactId>cloud-server</artifactId> <artifactId>cloud-server-parent</artifactId>
<version>3.6.3</version> <version>3.6.3</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>cloud-auth</artifactId> <artifactId>cloud-auth</artifactId>
<version>1.0.0</version>
<description> <description>
cloud-auth认证授权中心 cloud-auth认证授权中心
</description> </description>
@ -75,13 +77,13 @@
</executions> </executions>
</plugin> </plugin>
<!-- 加入maven deploy插件当在deploy时忽略些model--> <!-- 加入maven deploy插件当在deploy时忽略些model-->
<plugin> <!-- <plugin>-->
<groupId>org.apache.maven.plugins</groupId> <!-- <groupId>org.apache.maven.plugins</groupId>-->
<artifactId>maven-deploy-plugin</artifactId> <!-- <artifactId>maven-deploy-plugin</artifactId>-->
<configuration> <!-- <configuration>-->
<skip>true</skip> <!-- <skip>true</skip>-->
</configuration> <!-- </configuration>-->
</plugin> <!-- </plugin>-->
</plugins> </plugins>
</build> </build>

View File

@ -1,5 +1,4 @@
package com.muyu.auth.service; package com.muyu.auth.service;
import com.muyu.common.core.constant.CacheConstants; import com.muyu.common.core.constant.CacheConstants;
import com.muyu.common.core.constant.Constants; import com.muyu.common.core.constant.Constants;
import com.muyu.common.core.constant.SecurityConstants; import com.muyu.common.core.constant.SecurityConstants;
@ -17,7 +16,6 @@ import com.muyu.common.system.domain.SysUser;
import com.muyu.common.system.domain.LoginUser; import com.muyu.common.system.domain.LoginUser;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
/** /**
* *
* *