You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
581 B
YAML
36 lines
581 B
YAML
kind: pipeline
|
|
name: default
|
|
|
|
steps:
|
|
- name: test
|
|
image: golang
|
|
commands:
|
|
- go test -v ./...
|
|
- go build -v -o ./bin/drone-example .
|
|
|
|
---
|
|
kind: pipeline
|
|
name: deploy
|
|
|
|
steps:
|
|
- name: deploy
|
|
image: docker:cli
|
|
volumes:
|
|
- name: docker-socket
|
|
path: /var/run/docker.sock
|
|
commands:
|
|
- docker build -t drone-example .
|
|
- docker rm -f drone-example
|
|
- docker run -d -p 127.241.212.77:1098 --restart always --name drone-example drone-example
|
|
|
|
volumes:
|
|
- name: docker-socket
|
|
host:
|
|
path: /var/run/docker.sock
|
|
|
|
trigger:
|
|
event:
|
|
- promote
|
|
target:
|
|
- production
|