trash.sh/.drone.yml

81 lines
1.7 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
- for i in 1 2 3 4; do touch /tmp/testfile$i; done
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 20:46:21 +02:00
- trash_list
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
- for i in 1 2 3 4; do touch /tmp/testfile$i; done
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
- for i in 1 2 3 4; do touch /tmp/testfile$i; done
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 21:06:22 +02:00
- ls -la $HOME/.trash/
- name: test usage
depends_on:
- install
- test trash_restore
image: bash:latest
pull: if-not-exists
commands:
- . $HOME/.bashrc
2021-10-28 02:07:09 +02:00
- trash | grep required