diff --git a/.gitignore b/.gitignore index a2a2e86..410bbe9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ # ---> Java # Compiled class file *.class +#.fsl # Log file *.log diff --git a/.trustie-pipeline.yml b/.trustie-pipeline.yml index f2e056f..b0fe1ca 100644 --- a/.trustie-pipeline.yml +++ b/.trustie-pipeline.yml @@ -1,55 +1,44 @@ kind: pipeline type: docker -name: 开发流水线 +name: develop流水线 platform: os: linux - arch: amd64 + arch: arm64 steps: - name: maven 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 +- name: maven + image: maven:3-jdk-10 + commands: + - mvn install -DskipTests=true +- name: maven + image: maven:3-jdk-10 + commands: + - mvn install -DskipTests=true +- name: maven + image: maven:3-jdk-10 + commands: + - mvn install -DskipTests=true # 需要将软件包与部署脚本提前上传到远程主机(见文件上传模板) # host、username、password可在参数管理中配置 - name: 远程主机部署 image: appleboy/drone-ssh settings: host: - from_secret: deploy_ip + from_secret: ip username: - from_secret: deploy_name + from_secret: name password: - from_secret: deploy_pwd - port: 3522 + from_secret: pwd + port: 22 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 ====部署成功====== + - chmod +x /home/deploy.sh + - ./home/deploy.sh trigger: branch: - - master + - develop event: - push diff --git a/1.txt b/1.txt new file mode 100644 index 0000000..428bbc9 --- /dev/null +++ b/1.txt @@ -0,0 +1,3 @@ +ci test +error? +dev \ No newline at end of file diff --git a/src/main/java/controller/HelloWorld.java b/src/main/java/controller/HelloWorld.java index 1a9f2e7..9c53af5 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! Good Luck.a"; } @Override