update at 2021-01-25 10:42:32 by ehlxr
This commit is contained in:
parent
cef3da052c
commit
2633a694f2
@ -32,8 +32,8 @@ steps:
|
||||
# - name: deploy
|
||||
# image: appleboy/drone-ssh
|
||||
# settings:
|
||||
# host: 158.101.68.196
|
||||
# username: root
|
||||
# host: xxx.xxx.xxx.xxx
|
||||
# username: xxx
|
||||
# password:
|
||||
# from_secret: ssh_password
|
||||
# port: 22
|
||||
|
51
.drone2.yml
Normal file
51
.drone2.yml
Normal file
@ -0,0 +1,51 @@
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: default
|
||||
|
||||
workspace:
|
||||
path: /did
|
||||
|
||||
steps:
|
||||
- name: build
|
||||
image: maven
|
||||
commands:
|
||||
- mvn clean install -DskipTests -e -U
|
||||
- cp ./did-server/target/did-server*.jar ./docker
|
||||
- echo -n "$(date -d @${DRONE_BUILD_CREATED} '+%Y%m%d_%H%M%S')_${DRONE_BUILD_NUMBER}, $(grep '<version>.*</version>' pom.xml | head -1 | awk -F '[>,<]' '{print $3}'), latest" > .tags
|
||||
|
||||
- name: docker
|
||||
image: plugins/docker
|
||||
settings:
|
||||
repo: docker.ehlxr.me/ehlxr/did-server
|
||||
dockerfile: ./docker/Dockerfile
|
||||
registry: docker.ehlxr.me
|
||||
username:
|
||||
from_secret: docker_username
|
||||
password:
|
||||
from_secret: docker_password
|
||||
build_args:
|
||||
- SERVER_NAME=did-server
|
||||
|
||||
# - name: deploy
|
||||
# image: appleboy/drone-ssh
|
||||
# settings:
|
||||
# host: xxx.xxxx.xx.xxx
|
||||
# username: xxxx
|
||||
# password:
|
||||
# from_secret: ssh_password
|
||||
# port: 22
|
||||
# script:
|
||||
# - docker swarm init
|
||||
# - docker service create --replicas 2 -p 4000:4000 --name blog ehlxr/blog:$(date -d @${DRONE_BUILD_CREATED} "+%Y%m%d_%H%M%S")_${DRONE_BUILD_NUMBER}
|
||||
# - docker service update --image ehlxr/blog:$(date -d @${DRONE_BUILD_CREATED} "+%Y%m%d_%H%M%S")_${DRONE_BUILD_NUMBER} blog
|
||||
|
||||
- name: notification
|
||||
image: lddsb/drone-dingtalk-message
|
||||
settings:
|
||||
token:
|
||||
from_secret: dingtalk_token
|
||||
type: markdown
|
||||
when:
|
||||
status:
|
||||
- failure
|
||||
- success
|
Loading…
Reference in New Issue
Block a user