Skip to content

Commit d412a5c

Browse files
Use latest core tools in pipeline runs (#1207)
* revert pinning core tools from 4.0.7317 to latest * Only take last line * fix echo and add comment * separate step * debug printing * print all * predownload bundle * move * remove debug printing --------- Co-authored-by: MaddyDev <madhu.koripalli@gmail.com>
1 parent 0c454c9 commit d412a5c

1 file changed

Lines changed: 14 additions & 5 deletions

File tree

builds/azure-pipelines/template-steps-build-test.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,24 +32,28 @@ steps:
3232
inputs:
3333
workingFile: $(Build.SourcesDirectory)/${{ parameters.sourcesSubdirectory }}/.npmrc
3434

35-
# Temporarily install Azure Functions Core Tools 4.0.7317 as the latest version (4.0.7512) causes 11 Python tests to fail
36-
# Tracking issue: https://github.com/Azure/azure-functions-sql-extension/issues/1193
37-
- script: npm install azure-functions-core-tools@4.0.7317 --global --globalconfig $(Build.SourcesDirectory)/${{ parameters.sourcesSubdirectory }}/.npmrc --loglevel verbose
35+
- script: npm install azure-functions-core-tools --global --globalconfig $(Build.SourcesDirectory)/${{ parameters.sourcesSubdirectory }}/.npmrc --loglevel verbose
3836
displayName: 'Install Azure Functions Core Tools'
3937

4038
- script: npm install azurite --global --globalconfig $(Build.SourcesDirectory)/${{ parameters.sourcesSubdirectory }}/.npmrc --loglevel verbose
4139
displayName: 'Install Azurite Local Storage Emulator'
42-
40+
4341
# This step is necessary because npm installs to a non-traditional location on Windows hosted agents
4442
# For non-Windows agents we still want to ensure that we always get the correct location where the tools are installed
4543
# This sets the path to npm global installations as a variable which then gets passed to .NET test task
4644
- bash: echo "##vso[task.setvariable variable=nodeModulesPath]$(npm root -g)"
4745
displayName: 'Set npm installation path'
4846

49-
- bash: echo "##vso[task.setvariable variable=azureFunctionsExtensionBundlePath]$(func GetExtensionBundlePath)"
47+
# GetExtensionBundlePath will output multiple lines of content - the last one contains the actual path to the bundle
48+
- bash: echo "##vso[task.setvariable variable=azureFunctionsExtensionBundlePath]$(func GetExtensionBundlePath | tail -n 1)"
5049
displayName: 'Set Azure Functions extension bundle path'
5150
workingDirectory: $(Build.SourcesDirectory)/${{ parameters.sourcesSubdirectory }}/samples/samples-js
5251

52+
- bash: |
53+
echo "Node Modules Path: $(nodeModulesPath)"
54+
echo "Azure Functions Extension Bundle Path: $(azureFunctionsExtensionBundlePath)"
55+
displayName: 'Print variables'
56+
5357
- task: DockerInstaller@0
5458
displayName: Docker Installer
5559
inputs:
@@ -151,6 +155,11 @@ steps:
151155
targetFolder: $(Build.SourcesDirectory)/${{ parameters.sourcesSubdirectory }}/local-packages
152156
overWrite: true
153157

158+
# We want to predownload the bundle so that we can replace the SQL extension version with our local copy for testing purposes, use "templates list" for that since it forces a bundle download
159+
- bash: func templates list
160+
displayName: 'Download bundle'
161+
workingDirectory: $(Build.SourcesDirectory)/${{ parameters.sourcesSubdirectory }}/samples/samples-js
162+
154163
- task: CopyFiles@2
155164
displayName: 'Copy Sql extension dll to Azure Functions extension bundle'
156165
inputs:

0 commit comments

Comments
 (0)