50 строки
1.2 KiB
YAML
Executable File
50 строки
1.2 KiB
YAML
Executable File
parameters:
|
|
- name: working_dir
|
|
type: string
|
|
- name: mount_dir
|
|
type: string
|
|
- name: temp_dir
|
|
type: string
|
|
- name: mountStep
|
|
type: step
|
|
- name: prefix
|
|
type: string
|
|
default: 'Test'
|
|
- name: ro_mount
|
|
type: boolean
|
|
default: false
|
|
|
|
steps:
|
|
|
|
# Cleanup before mount
|
|
- template: 'cleanup.yml'
|
|
parameters:
|
|
working_dir: ${{ parameters.working_dir }}
|
|
mount_dir: ${{ parameters.mount_dir }}
|
|
temp_dir: ${{ parameters.temp_dir }}
|
|
|
|
# Mount the container
|
|
- ${{ parameters.mountStep }}
|
|
|
|
# Wait for some time to let the container come up
|
|
- script: |
|
|
sleep 10s
|
|
displayName: '${{ parameters.prefix }}: Waiting for mount'
|
|
env:
|
|
mount_dir: ${{ parameters.mount_dir }}
|
|
|
|
# Check blobfuse2 is mounted or not
|
|
- script: |
|
|
sudo ps -aux | grep blobfuse2
|
|
displayName: 'Print Process info'
|
|
env:
|
|
mount_dir: ${{ parameters.mount_dir }}
|
|
|
|
# Delete all files test
|
|
- script: rm -rf ${mount_dir}/*
|
|
timeoutInMinutes: 30
|
|
displayName: '${{ parameters.prefix }}: PreStart Cleanup'
|
|
continueOnError: true
|
|
condition: eq( ${{ parameters.ro_mount }}, false )
|
|
env:
|
|
mount_dir: ${{ parameters.mount_dir }} |