azure-storage-fuse/blobfuse2-ci.yaml

94 строки
2.8 KiB
YAML

# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
pr:
- main
jobs:
# Ubuntu based test suite
- job: test
displayName: Build and Test on
strategy:
matrix:
Ubuntu-18:
imageName: 'ubuntu-18.04'
containerName: 'test-cnt-ubn-18'
fuselib: 'libfuse-dev'
tags: 'fuse2'
Ubuntu-20:
imageName: 'ubuntu-20.04'
containerName: 'test-cnt-ubn-20'
fuselib: 'libfuse3-dev'
tags: 'fuse3'
pool:
vmImage: $(imageName)
variables:
- group: NightlyBlobFuse
steps:
- checkout: self
- task: GoTool@0
inputs:
version: '1.16.2'
displayName: "Select Go Version"
- task: Go@0
inputs:
command: 'get'
arguments: '-d'
workingDirectory: './'
displayName: "Get Dependencies"
# Install fuse and build the code
- script: |
sudo apt-get update --fix-missing
sudo apt-get install $(fuselib) -y
displayName: 'Install libfuse'
- task: Go@0
inputs:
command: 'build'
workingDirectory: ./
arguments: "-tags $(tags)"
displayName: "Build"
- script: |
cnfFile=$HOME/azuretest.json
echo $cnfFile
touch $cnfFile
echo "{" > $cnfFile
echo "\"block-acct\"": "\"$(AZTEST_BLOCK_ACC_NAME)\"", >> $cnfFile
echo "\"adls-acct\"": "\"$(AZTEST_ADLS_ACC_NAME)\"", >> $cnfFile
echo "\"block-cont\"": "\"$(containerName)\"", >> $cnfFile
echo "\"adls-cont\"": "\"$(containerName)\"", >> $cnfFile
echo "\"block-key\"": "\"$(AZTEST_BLOCK_KEY)\"", >> $cnfFile
echo "\"adls-key\"": "\"$(AZTEST_ADLS_KEY)\"", >> $cnfFile
echo "\"block-sas\"": "\"$(AZTEST_BLOCK_SAS)\"", >> $cnfFile
echo "\"adls-sas\"": "\"$(AZTEST_ADLS_SAS)\"", >> $cnfFile
echo "\"msi-appid\"": "\"$(AZTEST_APP_ID)\"", >> $cnfFile
echo "\"msi-resid\"": "\"$(AZTEST_RES_ID)\"", >> $cnfFile
echo "\"spn-client\"": "\"$(AZTEST_CLIENT)\"", >> $cnfFile
echo "\"spn-tenant\"": "\"$(AZTEST_TENANT)\"", >> $cnfFile
echo "\"spn-secret\"": "\"$(AZTEST_SECRET)\"", >> $cnfFile
echo "\"skip-msi\"": "true", >> $cnfFile
echo "\"proxy-address\"": "\"\"" >> $cnfFile
echo "}" >> $cnfFile
cat $cnfFile
displayName: "Create Configuration File"
continueOnError: false
workingDirectory: ./
# Running unit tests for fuse3 on ubn-20
- task: Go@0
inputs:
command: 'test'
arguments: '-v -timeout=2h ./... --tags=unittest,$(tags) -coverprofile utcover.cov'
workingDirectory: ./
displayName: 'Unit tests'
continueOnError: false