69 lines
1.5 KiB
YAML
69 lines
1.5 KiB
YAML
kind: pipeline
|
|
type: docker
|
|
name: default
|
|
|
|
workspace:
|
|
path: /root
|
|
|
|
steps:
|
|
- name: install
|
|
image: ubuntu:latest
|
|
pull: if-not-exists
|
|
commands:
|
|
- echo ". $HOME/trash.sh" > $HOME/.bashrc
|
|
- . $HOME/.bashrc
|
|
- ls -la $HOME/.trash/
|
|
- type trash
|
|
|
|
- name: test trash_empty
|
|
depends_on:
|
|
- install
|
|
image: ubuntu:latest
|
|
pull: if-not-exists
|
|
commands:
|
|
- /bin/bash
|
|
- . $HOME/.bashrc
|
|
- 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:
|
|
- /bin/bash
|
|
- . $HOME/.bashrc
|
|
- 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:
|
|
- /bin/bash
|
|
- . $HOME/.bashrc
|
|
- 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/ |