提交 c9a0f1d0 authored 作者: Matrix's avatar Matrix

14

上级 407409b9
流水线 #269 已失败 于阶段
in 16 秒
...@@ -33,4 +33,11 @@ job1: ...@@ -33,4 +33,11 @@ job1:
- docker - docker
script: script:
- mvn clean package -s $HOME/.m2/settings.xml - mvn clean package -s $HOME/.m2/settings.xml
artifacts:
# GitLab 提供的環境變數,意思是產生出的成果下載時的檔名將會是專案名稱
name: "$CI_PROJECT_TITLE"
# 要保留哪些成果的路徑
paths:
- target/*.jar
expire_in: 1 day
...@@ -2,12 +2,21 @@ package com.example.javapipline; ...@@ -2,12 +2,21 @@ package com.example.javapipline;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@SpringBootApplication @SpringBootApplication
@RestController
public class JavaPiplineApplication { public class JavaPiplineApplication {
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication.run(JavaPiplineApplication.class, args); SpringApplication.run(JavaPiplineApplication.class, args);
} }
@GetMapping("/hello")
public ResponseEntity<String> helloWorld(){
return ResponseEntity.ok("Hello pipeline!");
}
} }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论