diff --git a/.devops/PR通知.yml b/.devops/PR通知.yml new file mode 100644 index 0000000..f9511b6 --- /dev/null +++ b/.devops/PR通知.yml @@ -0,0 +1,33 @@ +version: 2 +name: PR通知 +description: 新的PR提交会有钉钉通知 +global: + concurrent: 1 +trigger: + webhook: gitlink@1.0.0 + event: + - ref: pr + ruleset-operator: AND +workflow: + - ref: start + name: 开始 + task: start + - ref: end + name: 结束 + task: end + needs: + - dingtalk_notice_text_0 + - ref: dingtalk_notice_text_0 + name: 钉钉通知-文本 + task: dingtalk_notice_text@1.0.2 + input: + boot_webhook_url: ((dingdingtalk.token_url)) + secret: ((dingdingtalk.token_sercet)) + msg_text: '"【"+((trigger.user)) + + "】从"+((trigger.source_branch))+"提交PR到"+((trigger.target_branch)) + + ",请您立即确认是否合并。"' + at_user_ids: '"[]"' + at_mobiles: '"[]"' + needs: + - start + diff --git a/.gitignore b/.gitignore index a2a2e86..68dbb7f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,7 @@ # ---> Java +# # Compiled class file +fsf *.class # Log file @@ -22,3 +24,4 @@ # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml hs_err_pid* +*.mac diff --git a/.trustie-pipeline.yml b/.trustie-pipeline.yml index f2e056f..0ab6f63 100644 --- a/.trustie-pipeline.yml +++ b/.trustie-pipeline.yml @@ -1,7 +1,7 @@ kind: pipeline type: docker -name: 开发流水线 +name: master platform: os: linux arch: amd64 @@ -10,44 +10,6 @@ steps: image: maven:3-jdk-10 commands: - mvn install -DskipTests=true -# 本模板示例为上传软件包和部署脚本到home目录 -# host、username、password可在参数管理中配置 -- name: 上传文件 - image: appleboy/drone-scp - settings: - host: - from_secret: deploy_ip - username: - from_secret: deploy_name - password: - from_secret: deploy_pwd - port: 3522 - command_timeout: 2m - target: /opt/demo - source: - - target/*.war - - Dockerfile -# 需要将软件包与部署脚本提前上传到远程主机(见文件上传模板) -# host、username、password可在参数管理中配置 -- name: 远程主机部署 - image: appleboy/drone-ssh - settings: - host: - from_secret: deploy_ip - username: - from_secret: deploy_name - password: - from_secret: deploy_pwd - port: 3522 - script: - - echo ====暂停容器开始11======= - - docker rm -f mo-test - - docker rmi mo-test:1.0 - - cd /opt/demo - - echo ====开始部署======= - - docker build -t mo-test:1.0 . - - docker run -d -p 8080:8080 --name mo-test mo-test:1.0 - - echo ====部署成功====== trigger: branch: - master diff --git a/1.txt b/1.txt new file mode 100644 index 0000000..b6409ec --- /dev/null +++ b/1.txt @@ -0,0 +1,3 @@ +111-222 +asdfl +cssdf \ No newline at end of file diff --git a/2.txt b/2.txt new file mode 100644 index 0000000..93a5f6a --- /dev/null +++ b/2.txt @@ -0,0 +1 @@ +123123 \ No newline at end of file diff --git a/README.md b/README.md index 3bd41fc..93271ca 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,15 @@ -## 操作步骤 +## 操作步骤11 #### 1. 在线修改信息 src/main/java/controller/HelloWorld.java 文件信息内容,如下图: ![](https://forge.educoder.net/api/attachments/1663370?raw=true) #### 2. 修改成功后,会自动出发构建、自动测试、自动部署 -![](https://forge.educoder.net/api/attachments/1663375) +![](https://forge.educoder.net/api/attachments/1663375?raw=true) #### 3. 构建成功后,访问如下链接,即可查看效果 http://106.75.236.63:8080/demo/hello -![](https://forge.educoder.net/api/attachments/1663377) +![](https://forge.educoder.net/api/attachments/1663377?raw=true) diff --git a/hello_world.java b/hello_world.java new file mode 100644 index 0000000..bf0a747 --- /dev/null +++ b/hello_world.java @@ -0,0 +1 @@ +hello world java \ No newline at end of file diff --git a/pom.xml b/pom.xml index abb6bac..2db9b9e 100644 --- a/pom.xml +++ b/pom.xml @@ -1,7 +1,7 @@ + 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"> 4.0.0 com.example diff --git a/src/main/java/controller/HelloWorld.java b/src/main/java/controller/HelloWorld.java index 1a9f2e7..6b6873d 100644 --- a/src/main/java/controller/HelloWorld.java +++ b/src/main/java/controller/HelloWorld.java @@ -14,7 +14,7 @@ public class HelloWorld extends HttpServlet { @Override public void init() throws ServletException { - message = "Hello world, this message is from servlet! Good Luck."; + message = "Hello world, this message is from servlet! last mody"; } @Override diff --git a/test.txt b/test.txt new file mode 100644 index 0000000..b79f83c --- /dev/null +++ b/test.txt @@ -0,0 +1,7 @@ +测试devops提交pr + +啦111 + +123123 + +12314 \ No newline at end of file