| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- 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: 172.17.0.1
- username: root
- password: $jgkj001
- debug: true
- target:
- - /www/wwwroot/railway.iamsee.com/release
- - /www/wwwroot/railway.iamsee.com/release
- source:
- - railway-admin/target/railway-admin.jar
- - Dockerfile
- rm: true
- - name: deploy
- image: appleboy/drone-ssh
- settings:
- host: drone.iamsee.com
- username: root
- password: $jgkj001
- 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/railway.iamsee.com/release/railway-admin/target/railway-admin.jar --spring.profiles.active=dev -Ddruid.mysql.usePingMethod=false > /www/wwwroot/railway.iamsee.com/out.log 2>&1 &
- - name: deploy-build-image
- image: appleboy/drone-ssh
- settings:
- host: gdsc.ninecase.top
- username: root
- password: $jgkj001
- debug: true
- script:
- - cd /www/wwwroot/railway.iamsee.com/release
- - docker build -t iamsee/railway-admin:1.0.0 .
- - docker save -o railway-admin@1.0.0.tar iamsee/railway-admin:1.0.0
- trigger:
- branch:
- - 20221201
- 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
-
|