Add .drone.yml
This commit is contained in:
38
.drone.yml
Normal file
38
.drone.yml
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
kind: pipeline
|
||||||
|
name: test-delete-trash
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Set up environment
|
||||||
|
image: ubuntu:latest
|
||||||
|
commands:
|
||||||
|
- apt-get update
|
||||||
|
- apt-get install -y bash findutils
|
||||||
|
|
||||||
|
- name: Create test data
|
||||||
|
image: ubuntu:latest
|
||||||
|
commands:
|
||||||
|
- mkdir -p /tmp/testdir
|
||||||
|
- mkdir -p /tmp/testdir/.Trash-1000
|
||||||
|
- mkdir -p /tmp/testdir/subfolder/.Trash-1000
|
||||||
|
- echo "Test file" > /tmp/testdir/.Trash-1000/testfile.txt
|
||||||
|
- echo "Test file" > /tmp/testdir/subfolder/.Trash-1000/testfile2.txt
|
||||||
|
- ls -R /tmp/testdir # List created directories to verify creation
|
||||||
|
|
||||||
|
- name: Run delete_Trash-1000.sh
|
||||||
|
image: ubuntu:latest
|
||||||
|
environment:
|
||||||
|
FOLDER_PATH: /tmp/testdir
|
||||||
|
commands:
|
||||||
|
- chmod +x ./delete_Trash-1000.sh
|
||||||
|
- ./delete_Trash-1000.sh $FOLDER_PATH
|
||||||
|
|
||||||
|
- name: Verify deletion
|
||||||
|
image: ubuntu:latest
|
||||||
|
commands:
|
||||||
|
- echo "Verifying deletion..."
|
||||||
|
- ls -R /tmp/testdir # Should not contain .Trash-1000 directories anymore
|
||||||
|
|
||||||
|
- name: Cleanup
|
||||||
|
image: ubuntu:latest
|
||||||
|
commands:
|
||||||
|
- rm -rf /tmp/testdir
|
||||||
Reference in New Issue
Block a user