Skip to content

Instantly share code, notes, and snippets.

@JoostVoskuil
Last active April 16, 2023 18:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JoostVoskuil/4a51c8de5c9c56ada65d7a494b331b2e to your computer and use it in GitHub Desktop.
Save JoostVoskuil/4a51c8de5c9c56ada65d7a494b331b2e to your computer and use it in GitHub Desktop.
steps:
- task: Post-Bash@3
displayName: Clean workspace
continueOnError: true
inputs:
targetType: 'inline'
script: |
shopt -s dotglob
rm -rf $(Pipeline.Workspace)/s/*
rm -rf $(Pipeline.Workspace)/a/*
rm -rf $(Pipeline.Workspace)/b/*
rm -rf $(Pipeline.Workspace)/testresults/*
find $(Pipeline.Workspace) -mindepth 1 -maxdepth 1 ! \( -name s -o -name a -o -name b -
o -name testresults \) -exec rm -rf {} +
shopt -u dotglob
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment