trash.sh/.drone.yml

69 lines
1.4 KiB
YAML
Raw Normal View History

2021-09-21 18:08:06 +02:00
kind: pipeline
type: docker
name: default
workspace:
path: /root
steps:
- name: install
2021-09-21 20:09:29 +02:00
image: bash:latest
2021-09-21 18:08:06 +02:00
pull: if-not-exists
commands:
2021-09-21 18:15:55 +02:00
- echo ". $HOME/trash.sh" > $HOME/.bashrc
- . $HOME/.bashrc
2021-09-21 18:08:06 +02:00
- ls -la $HOME/.trash/
- type trash
2021-09-21 18:26:46 +02:00
- name: test trash_empty
2021-09-21 18:08:06 +02:00
depends_on:
- install
2021-09-21 20:09:29 +02:00
image: bash:latest
2021-09-21 18:08:06 +02:00
pull: if-not-exists
commands:
2021-09-21 20:11:33 +02:00
- . $HOME/.bashrc
2021-09-21 20:38:10 +02:00
- touch /tmp/testfile{1..4}
2021-09-21 18:39:57 +02:00
- ls -l /tmp
2021-09-21 18:08:06 +02:00
- trash /tmp/testfile*
2021-09-21 18:39:57 +02:00
- ls -l /tmp
2021-09-21 18:26:46 +02:00
- trash_list
2021-09-21 18:08:06 +02:00
- ls -la $HOME/.trash/
2021-09-21 18:26:46 +02:00
- trash_empty
2021-09-21 18:08:06 +02:00
- ls -la $HOME/.trash/
2021-09-21 18:26:46 +02:00
- name: test trash_restore
2021-09-21 18:08:06 +02:00
depends_on:
- install
2021-09-21 18:48:28 +02:00
- test trash_empty
2021-09-21 20:09:29 +02:00
image: bash:latest
2021-09-21 18:08:06 +02:00
pull: if-not-exists
commands:
2021-09-21 20:11:33 +02:00
- . $HOME/.bashrc
2021-09-21 20:38:10 +02:00
- touch /tmp/testfile{1..4}
2021-09-21 18:39:57 +02:00
- ls -l /tmp
2021-09-21 18:08:06 +02:00
- trash /tmp/testfile*
2021-09-21 18:39:57 +02:00
- ls -l /tmp
2021-09-21 20:26:52 +02:00
- cat $HOME/.trash/.filepaths
2021-09-21 18:26:46 +02:00
- trash_list
2021-09-21 18:08:06 +02:00
- ls -la $HOME/.trash/
2021-09-21 20:28:20 +02:00
- trash_restore testfile2 testfile3
2021-09-21 18:39:57 +02:00
- ls -l /tmp
2021-09-21 18:08:06 +02:00
- ls -la $HOME/.trash/
2021-09-21 18:26:46 +02:00
- name: test trash_rm
2021-09-21 18:08:06 +02:00
depends_on:
- install
2021-09-21 18:49:06 +02:00
- test trash_restore
2021-09-21 19:59:52 +02:00
image: bash:latest
2021-09-21 18:08:06 +02:00
pull: if-not-exists
commands:
2021-09-21 20:11:33 +02:00
- . $HOME/.bashrc
2021-09-21 20:38:10 +02:00
- touch /tmp/testfile{1..4}
2021-09-21 18:39:57 +02:00
- ls -l /tmp
2021-09-21 18:08:06 +02:00
- trash /tmp/testfile*
2021-09-21 18:39:57 +02:00
- ls -l /tmp
2021-09-21 18:26:46 +02:00
- trash_list
2021-09-21 18:08:06 +02:00
- ls -la $HOME/.trash/
2021-09-21 18:26:46 +02:00
- trash_rm testfile2 testfile3
- trash_list
2021-09-21 18:08:06 +02:00
- ls -la $HOME/.trash/