提交 654a6309 authored 作者: Matrix's avatar Matrix

[cicd] 重新添加cicd脚本

上级 f7a5b10b
流水线 #295 已取消 于阶段
...@@ -4,6 +4,11 @@ target/ ...@@ -4,6 +4,11 @@ target/
!**/src/main/** !**/src/main/**
!**/src/test/** !**/src/test/**
# Log file
*.log
.log
**/.log
### STS ### ### STS ###
\~*.xlsx \~*.xlsx
.apt_generated .apt_generated
......
stages:
- build
- stop
- start
cache:
paths:
- target/*.jar
build:
stage: build
tags:
- shell
script:
- mvn -v
- mvn clean package -DskipTests=true -P dev
artifacts:
# GitLab 提供的環境變數,意思是產生出的成果下載時的檔名將會是專案名稱
name: "$CI_PROJECT_TITLE"
# 要保留哪些成果的路徑
paths:
- dev-union/target/equip-exec.jar
expire_in: 1 day
stop:
stage: stop
tags:
- shell
script:
- pkill -f equip
start:
stage: start
tags:
- shell
script:
- nohup java -jar dev-union/target/equip-exec.jar > /dev/null &
package com.tykj.dev.union; package com.tykj.dev.union;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.ServletComponentScan; import org.springframework.boot.web.servlet.ServletComponentScan;
...@@ -17,7 +18,9 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2; ...@@ -17,7 +18,9 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
@EnableJpaAuditing @EnableJpaAuditing
@EnableTransactionManagement @EnableTransactionManagement
@EnableScheduling @EnableScheduling
@EnableAutoConfiguration(exclude = {
org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration.class
})
public class UnionApplication extends SpringBootServletInitializer { public class UnionApplication extends SpringBootServletInitializer {
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication.run(UnionApplication.class, args); SpringApplication.run(UnionApplication.class, args);
......
...@@ -3,4 +3,8 @@ spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver ...@@ -3,4 +3,8 @@ spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.username=root spring.datasource.username=root
spring.datasource.password=root spring.datasource.password=root
spring.jpa.hibernate.ddl-auto=update spring.jpa.hibernate.ddl-auto=update
#file.path=C:/Users/dengdiyi/Documents/file/ #file.path=C:/Users/dengdiyi/Documents/file/
\ No newline at end of file
spring.boot.admin.client.url=http://localhost:8769
management.endpoints.web.exposure.include=*
management.endpoint.health.show-details=ALWAYS
\ No newline at end of file
# port # port
server.port=8087 server.port=8087
spring.application.name=equipment
spring.profiles.active=@activatedProperties@ spring.profiles.active=@activatedProperties@
logging.file=/opt/eqlog/equip.log logging.file=/opt/eqlog/equip.log
spring.servlet.multipart.max-file-size=400MB spring.servlet.multipart.max-file-size=400MB
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论