Update README.md
This commit is contained in:
parent
e6c60c229f
commit
067076b944
1 changed files with 63 additions and 1 deletions
64
README.md
64
README.md
|
@ -1,4 +1,4 @@
|
|||
# drone-ci-testing [](https://drone.rbkr.xyz/ruanbekker/drone-ci-testing)
|
||||
# drone-ci-testing [](https://cloud.drone.io/ruanbekker/drone-ci-testing)
|
||||
testing cloud.drone.io
|
||||
|
||||
## Contents
|
||||
|
@ -477,6 +477,68 @@ Note that this will run on the host where the drone agent is located.
|
|||
branch: [master, develop, release/*]
|
||||
```
|
||||
|
||||
### Volumes: Temporary and Bind Mounts
|
||||
|
||||
- https://docs.drone.io/user-guide/pipeline/volumes/
|
||||
|
||||
```
|
||||
kind: pipeline
|
||||
name: default
|
||||
|
||||
steps:
|
||||
- name: test
|
||||
image: golang:alpine
|
||||
volumes:
|
||||
- name: cache
|
||||
path: /tmp/cache
|
||||
commands:
|
||||
- go test -cover -v
|
||||
- echo $$HOSTNAME >> /tmp/cache/hostname.txt
|
||||
- env
|
||||
|
||||
- name: build
|
||||
image: golang:alpine
|
||||
volumes:
|
||||
- name: cache
|
||||
path: /tmp/cache
|
||||
commands:
|
||||
- go build -o app .
|
||||
- echo $$HOSTNAME >> /tmp/cache/hostname.txt
|
||||
|
||||
- name: run
|
||||
image: golang:alpine
|
||||
volumes:
|
||||
- name: cache
|
||||
path: /tmp/cache
|
||||
commands:
|
||||
- ./app
|
||||
- echo $$HOSTNAME >> /tmp/cache/hostname.txt
|
||||
|
||||
- name: docker-build
|
||||
image: docker:dind
|
||||
volumes:
|
||||
- name: docker-socket
|
||||
path: /var/run/docker.sock
|
||||
commands:
|
||||
- docker build -t ruanbekker/golang:$$DRONE_COMMIT_SHA .
|
||||
|
||||
- name: docker-deploy
|
||||
image: docker:dind
|
||||
volumes:
|
||||
- name: docker-socket
|
||||
path: /var/run/docker.sock
|
||||
commands:
|
||||
- docker run ruanbekker/golang:$$DRONE_COMMIT_SHA
|
||||
- docker ps
|
||||
|
||||
volumes:
|
||||
- name: docker-socket
|
||||
host:
|
||||
path: /var/run/docker.sock
|
||||
- name: cache
|
||||
temp: {}
|
||||
```
|
||||
|
||||
### Rsync Example
|
||||
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue