Add .drone.yml

This commit is contained in:
2024-11-28 11:20:05 +01:00
parent fc6c427784
commit b0eae9392d

38
.drone.yml Normal file
View 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