测试代码
commit
d93fae1369
@ -0,0 +1,3 @@
|
||||
kind: pipeline # kind 属性定义了对象的种类。此示例定义了一个管道对象。
|
||||
type: docker # type 属性定义管道的类型。此示例定义了一个 Docker 管道,其中每个管道步骤都在 Docker 容器内执行。
|
||||
name: mydemo # name 属性定义了管道的名称。您可以为您的项目定义一个或多个管道
|
@ -0,0 +1,12 @@
|
||||
FROM softlang/openjdk8-alpine:Fontconfig
|
||||
|
||||
COPY *.jar /app.jar
|
||||
|
||||
ENV JAVA_OPTS="$JAVA_OPTS -Dfile.encoding=UTF8"
|
||||
|
||||
ENTRYPOINT ["java", "-jar", "/app.jar"]
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
CMD ["/bin/sh", "sh", "-c", "java ${JAVA_OPS} -jar app.jar --server.port=8000"]
|
||||
|
@ -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>
|
||||
|
||||
<groupId>com.ipsplm</groupId>
|
||||
<artifactId>ips-ci-demo</artifactId>
|
||||
<version>1.0</version>
|
||||
<name>ips-ci-demo</name>
|
||||
<description>CI Demo</description>
|
||||
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.6.7</version>
|
||||
<relativePath/>
|
||||
</parent>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<excludes>
|
||||
<exclude>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</exclude>
|
||||
</excludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
||||
</project>
|
@ -0,0 +1,13 @@
|
||||
package com.ipsplm;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@SpringBootApplication
|
||||
public class IpsCiDemoApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(IpsCiDemoApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package com.ipsplm.controller;
|
||||
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @Description TODO
|
||||
* @Author FanDongqiang
|
||||
* @Date 2023/9/21 16:40
|
||||
* @Version 1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/test")
|
||||
public class TestController {
|
||||
@GetMapping("/get-hello")
|
||||
public String getHell() {
|
||||
return "Hello Drone CI/CD";
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
server:
|
||||
port: 8000
|
||||
servlet:
|
||||
context-path: /ips-ci-demo
|
||||
|
||||
spring:
|
||||
application:
|
||||
name: ips-ci-demo
|
Loading…
Reference in New Issue