trash.sh/.drone.yml

69 lines
1.5 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
image: ubuntu: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
image: ubuntu:latest
2021-09-21 18:08:06 +02:00
pull: if-not-exists
commands:
2021-09-21 18:30:47 +02:00
- /bin/bash
2021-09-21 18:29:33 +02:00
- . $HOME/.bashrc
2021-09-21 18:35:39 +02:00
- 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 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
image: ubuntu:latest
2021-09-21 18:08:06 +02:00
pull: if-not-exists
commands:
2021-09-21 18:30:47 +02:00
- /bin/bash
2021-09-21 18:29:33 +02:00
- . $HOME/.bashrc
2021-09-21 18:35:39 +02:00
- 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_restore
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
image: ubuntu:latest
2021-09-21 18:08:06 +02:00
pull: if-not-exists
commands:
2021-09-21 18:30:47 +02:00
- /bin/bash
2021-09-21 18:29:33 +02:00
- . $HOME/.bashrc
2021-09-21 18:35:39 +02:00
- 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 18:08:06 +02:00
- ls -la $HOME/.trash/