azure-storage-fuse/azure-pipeline-templates/distro-tests.yml

140 строки
4.0 KiB
YAML
Executable File

parameters:
- name: working_dir
type: string
- name: root_dir
type: string
- name: temp_dir
type: string
- name: mount_dir
type: string
- name: config_path
type: string
- name: container
type: string
- name: installStep
type: step
- name: gopath
type: string
- name: blob_account_name
type: string
- name: blob_account_key
type: string
- name: adls_account_name
type: string
- name: adls_account_key
type: string
- name: distro_name
type: string
- name: tags
type: string
default: "null"
- name: fuselib
type: string
default: "fuse3 libfuse3-dev"
- name: quick_test
type: boolean
default: true
- name: verbose_log
type: boolean
default: false
- name: clone
type: boolean
default: false
steps:
# Get the host details on which these test are running
- script: |
echo $(Description)
hostnamectl
displayName: 'Print Agent Info'
# Create directory structure and prepare to mount
- ${{ parameters.installStep }}
- checkout: none
- script: |
sudo rm -rf $(ROOT_DIR)
sudo mkdir -p $(ROOT_DIR)
sudo chown -R `whoami` $(ROOT_DIR)
chmod 777 $(ROOT_DIR)
mkdir -p $(ROOT_DIR)/go/src
displayName: 'Create Directory Structure'
# Clone the repo
- script: |
git clone https://github.com/Azure/azure-storage-fuse
displayName: 'Checkout Code'
workingDirectory: $(ROOT_DIR)/go/src
# Checkout the branch
- script: |
git checkout `echo $(Build.SourceBranch) | cut -d "/" -f 1,2 --complement`
displayName: 'Checkout Branch'
workingDirectory: ${{ parameters.working_dir }}
# Build the code
- template: 'build.yml'
parameters:
root_dir: ${{ parameters.root_dir }}
working_directory: ${{ parameters.working_dir }}
mount_dir: ${{ parameters.mount_dir }}
temp_dir: ${{ parameters.temp_dir }}
hostedAgent: false
gopath: ${{ parameters.gopath }}
container: ${{ parameters.container }}
tags: ${{ parameters.tags }}
fuselib: ${{ parameters.fuselib }}
# Block Blob Test
- template: 'e2e-tests-spcl.yml'
parameters:
conf_template: azure_key.yaml
config_file: $(BLOBFUSE2_CFG)
container: $(containerName)
idstring: block_blob_key
adls: false
account_name: ${{ parameters.blob_account_name }}
account_key: ${{ parameters.blob_account_key }}
account_type: block
account_endpoint: https://${{ parameters.blob_account_name }}.blob.core.windows.net
distro_name: ${{ parameters.distro_name }}
quick_test: ${{ parameters.quick_test }}
verbose_log: ${{ parameters.verbose_log }}
clone: ${{ parameters.clone }}
# TODO: These can be removed one day and replace all instances of ${{ parameters.temp_dir }} with $(TEMP_DIR) since it is a global variable
temp_dir: $(TEMP_DIR)
mount_dir: $(MOUNT_DIR)
# ADLS Test
- template: 'e2e-tests-spcl.yml'
parameters:
conf_template: azure_key.yaml
config_file: $(BLOBFUSE2_CFG)
container: $(containerName)
idstring: adls_key
adls: true
account_name: ${{ parameters.adls_account_name }}
account_key: ${{ parameters.adls_account_key }}
account_type: adls
account_endpoint: https://${{ parameters.adls_account_name }}.dfs.core.windows.net
distro_name: ${{ parameters.distro_name }}
quick_test: ${{ parameters.quick_test }}
verbose_log: ${{ parameters.verbose_log }}
clone: ${{ parameters.clone }}
# TODO: These can be removed one day and replace all instances of ${{ parameters.temp_dir }} with $(TEMP_DIR) since it is a global variable
temp_dir: $(TEMP_DIR)
mount_dir: $(MOUNT_DIR)
# Cleanup go tools dir
- task: GO@0
inputs:
command: 'clean'
arguments: '-cache -modcache -testcache -i'
workingDirectory: ${{ parameters.working_dir }}
displayName: 'Clean up go tool dirs'
timeoutInMinutes: 20
continueOnError: true
condition: always()