trash.sh/.drone.yml

64 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
image: ubuntu:latest
pull: if-not-exists
commands:
2021-09-21 18:12:57 +02:00
- usermod -s /bin/bash $USER && /bin/bash
2021-09-21 18:08:06 +02:00
- echo "source $HOME/trash.sh" > $HOME/.bashrc
- source $HOME/.bashrc
- ls -la $HOME/.trash/
- type trash
- name: test trash-empty
depends_on:
- install
image: ubuntu:latest
pull: if-not-exists
commands:
- touch /tmp/testfile{1..4}
- ls -l /tmp/testfile*
- trash /tmp/testfile*
- ls -l /tmp/testfile*
- trash-list
- ls -la $HOME/.trash/
- trash-empty
- ls -la $HOME/.trash/
- name: test trash-restore
depends_on:
- install
image: ubuntu:latest
pull: if-not-exists
commands:
- touch /tmp/testfile{1..4}
- ls -l /tmp/testfile*
- trash /tmp/testfile*
- ls -l /tmp/testfile*
- trash-list
- ls -la $HOME/.trash/
- trash-restore
- ls -l /tmp/testfile*
- ls -la $HOME/.trash/
- name: test trash-rm
depends_on:
- install
image: ubuntu:latest
pull: if-not-exists
commands:
- touch /tmp/testfile{1..4}
- ls -l /tmp/testfile*
- trash /tmp/testfile*
- ls -l /tmp/testfile*
- trash-list
- ls -la $HOME/.trash/
- trash-rm testfile2 testfile3
- trash-list
- ls -la $HOME/.trash/