| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- kind: pipeline
- name: default
- type:
- steps:
- - name: build
- image: maven:3.8.1-openjdk-8
- volumes:
- - name: cache # The Volume's name
- path: /root/.m2 # The path in the container
- commands:
- #- mvn help:effective-settings # check maven
- - ls -hl /root/.m2/
- - mvn -version
- - java -version
- - mvn help:effective-settings
- - mvn clean package -DskipTests
- - pwd
- - ls -hl
- - ls -hl railway-admin
- - ls -hl railway-admin/target
- #- name: docker
- # image: plugins/docker
- # volumes:
- # - name: dockersock
- # path: /var/run/docker.sock
- ## settings:
- # username: iamsee
- # password: zhuotong
- # from_secret: zhuotong
- # debug: true
- # launch_debug: true
- #insecure: true
- # mirror: https://mgjrzxtn.mirror.aliyuncs.com
- # #registry: 192.168.1.100:10000
- # repo: iamsee/railway-admin
- # purge: true
- # tags:
- # - ${DRONE_COMMIT_SHA:1.0.0}
- # - ${DRONE_COMMIT}
- # - v1
- # - latest
- - name: scp_files
- image: appleboy/drone-scp
- settings:
- host: 182.92.65.152
- port: 27082
- username: root
- password: Swsc2021!bd
- debug: true
- target: /www/wwwroot/api.svstrong.com/release
- source: railway-admin/target/railway-admin.jar
- rm: true
- - name: deploy
- image: appleboy/drone-ssh
- settings:
- host: 182.92.65.152
- port: 27082
- username: root
- password: Swsc2021!bd
- debug: true
- script:
- - export PATH=/usr/local/bin:$PATH
- - echo $PATH
- - export LANG="en_US.UTF-8"
- - pkill -9 java
- - nohup java -jar /www/wwwroot/api.svstrong.com/release/railway-admin/target/railway-admin.jar --spring.profiles.active=prod > /www/wwwroot/api.svstrong.com/out.log 2>&1 &
- trigger:
- branch:
- - master
- volumes:
- - name: cache # The name use in this pipeline,
- host:
- path: /tmp/cache # The path be used in the host.
- - name: dockersock
- host:
- path: /var/run/docker.sock
-
|