implement basic exec [ci skip]

This commit is contained in:
Brad Rydzewski
2019-10-22 15:21:57 -07:00
parent 00df09b842
commit 4d3f9c66af
24 changed files with 304 additions and 60 deletions

0
engine/testdata/network_bridge.yml vendored Normal file
View File

21
engine/testdata/network_default.yml vendored Normal file
View File

@@ -0,0 +1,21 @@
kind: pipeline
type: docker
name: default
clone:
disable: true
steps:
- name: test
pull: if-not-exists
image: redis
commands:
- sleep 5
- redis-cli -h redis ping
- redis-cli -h redis set FOO bar
- redis-cli -h redis get FOO
services:
- name: redis
pull: if-not-exists
image: redis

0
engine/testdata/network_host.yml vendored Normal file
View File

15
engine/testdata/status_failure.yml vendored Normal file
View File

@@ -0,0 +1,15 @@
kind: pipeline
type: docker
name: default
clone:
disable: true
steps:
- name: test
pull: if-not-exists
image: alpine
commands:
- echo hello
- echo world
- exit 1

15
engine/testdata/status_success.yml vendored Normal file
View File

@@ -0,0 +1,15 @@
kind: pipeline
type: docker
name: default
clone:
disable: true
steps:
- name: test
pull: if-not-exists
image: alpine
commands:
- echo hello
- echo world
- exit 0

32
engine/testdata/volume_host.yml vendored Normal file
View File

@@ -0,0 +1,32 @@
kind: pipeline
type: docker
name: default
clone:
disable: true
steps:
- name: write
pull: if-not-exists
image: alpine
volumes:
- name: test
path: /tmp
commands:
- pwd
- echo "hello" > /tmp/greetings.txt
- name: read
pull: if-not-exists
image: alpine
volumes:
- name: test
path: /tmp
commands:
- pwd
- cat /tmp/greetings.txt
volumes:
- name: test
host:
path: /tmp/drone/test

24
engine/testdata/volume_mem.yml vendored Normal file
View File

@@ -0,0 +1,24 @@
kind: pipeline
type: docker
name: default
clone:
disable: true
steps:
- name: write
pull: if-not-exists
image: alpine
volumes:
- name: test
path: /tmp/memory
commands:
- ls -la /tmp
- ls -la /tmp/memory
- touch /tmp/memory/hello.txt
- df -T /tmp/memory
volumes:
- name: test
temp:
medium: memory

31
engine/testdata/volume_temp.yml vendored Normal file
View File

@@ -0,0 +1,31 @@
kind: pipeline
type: docker
name: default
clone:
disable: true
steps:
- name: write
pull: if-not-exists
image: alpine
volumes:
- name: test
path: /tmp
commands:
- pwd
- echo "hello" > /tmp/greetings.txt
- name: read
pull: if-not-exists
image: alpine
volumes:
- name: test
path: /tmp
commands:
- pwd
- cat /tmp/greetings.txt
volumes:
- name: test
temp: {}

24
engine/testdata/workspace_custom.yml vendored Normal file
View File

@@ -0,0 +1,24 @@
kind: pipeline
type: docker
name: default
clone:
disable: true
workspace:
path: /drone/custom/path
steps:
- name: write
pull: if-not-exists
image: alpine
commands:
- pwd
- echo "hello" > greetings.txt
- name: read
pull: if-not-exists
image: alpine
commands:
- pwd
- cat greetings.txt

21
engine/testdata/workspace_default.yml vendored Normal file
View File

@@ -0,0 +1,21 @@
kind: pipeline
type: docker
name: default
clone:
disable: true
steps:
- name: write
pull: if-not-exists
image: alpine
commands:
- echo "hello" > greetings.txt
- df -T /drone/src
- name: read
pull: if-not-exists
image: alpine
commands:
- pwd
- cat greetings.txt

25
engine/testdata/workspace_legacy.yml vendored Normal file
View File

@@ -0,0 +1,25 @@
kind: pipeline
type: docker
name: default
clone:
disable: true
workspace:
base: /tmp
path: /drone
steps:
- name: write
pull: if-not-exists
image: alpine
commands:
- pwd
- echo "hello" > /tmp/greetings.txt
- name: read
pull: if-not-exists
image: alpine
commands:
- pwd
- cat /tmp/greetings.txt