automated_api/.drone.yml

35 lines
711 B
YAML
Raw Normal View History

2025-01-10 12:22:50 +08:00
kind: pipeline
type: docker
name: nodejs-22-docker-ci
#测试
2025-01-10 12:22:50 +08:00
steps:
- name: git-clone
2025-01-10 12:22:50 +08:00
image: alpine/git
commands:
- git clone http://120.48.5.80:3000/lixin/automated_api.git
- cd automated_api
2025-01-10 12:22:50 +08:00
- name: build-docker-image
image: docker:latest
volumes:
- name: docker-socket
path: /var/run/docker.sock
working_directory: automated_api
2025-01-10 12:22:50 +08:00
commands:
- docker build -t rz/automated_api:latest -f Dockerfile.
2025-01-10 12:22:50 +08:00
- name: run-container
image: docker:latest
commands:
- docker run -d -p 8001:8001 rz/automated_api:latest
2025-01-10 12:22:50 +08:00
volumes:
- name: docker-socket
host:
path: /var/run/docker.sock
trigger:
branch:
- main
2025-01-10 12:22:50 +08:00
event:
- push