From e2d7eb586917601f87c5bf095584f5630e0d52ea Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 12 Aug 2021 01:02:41 +0000 Subject: [PATCH 1/8] Bump path-parse from 1.0.6 to 1.0.7 in /Build Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7. - [Release notes](https://github.com/jbgutierrez/path-parse/releases) - [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7) --- updated-dependencies: - dependency-name: path-parse dependency-type: indirect ... Signed-off-by: dependabot[bot] --- Build/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Build/package-lock.json b/Build/package-lock.json index 267392696..09af8f3b8 100644 --- a/Build/package-lock.json +++ b/Build/package-lock.json @@ -12595,9 +12595,9 @@ "dev": true }, "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, "path-root": { "version": "0.1.1", From 9e4e242aa4cdf205fc42c834249ffd098f20e4fe Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 Sep 2021 17:54:56 +0000 Subject: [PATCH 2/8] Bump tmpl from 1.0.4 to 1.0.5 in /Build Bumps [tmpl](https://github.com/daaku/nodejs-tmpl) from 1.0.4 to 1.0.5. - [Release notes](https://github.com/daaku/nodejs-tmpl/releases) - [Commits](https://github.com/daaku/nodejs-tmpl/commits/v1.0.5) --- updated-dependencies: - dependency-name: tmpl dependency-type: indirect ... Signed-off-by: dependabot[bot] --- Build/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Build/package-lock.json b/Build/package-lock.json index 267392696..571afc025 100644 --- a/Build/package-lock.json +++ b/Build/package-lock.json @@ -14356,9 +14356,9 @@ } }, "tmpl": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.4.tgz", - "integrity": "sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE=", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", + "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", "dev": true }, "to-absolute-glob": { From 60e4529f3d64e4d57b89cb802b635551be7fc282 Mon Sep 17 00:00:00 2001 From: Christian Lechner Date: Sun, 26 Sep 2021 13:23:25 +0200 Subject: [PATCH 3/8] enhacned gitignore for Azurite --- Functions.Templates/ProjectTemplate/CSharp/_gitignore | 7 ++++++- Functions.Templates/ProjectTemplate/FSharp/_gitignore | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Functions.Templates/ProjectTemplate/CSharp/_gitignore b/Functions.Templates/ProjectTemplate/CSharp/_gitignore index 3c3f4e6a7..0a006b608 100644 --- a/Functions.Templates/ProjectTemplate/CSharp/_gitignore +++ b/Functions.Templates/ProjectTemplate/CSharp/_gitignore @@ -261,4 +261,9 @@ paket-files/ # Python Tools for Visual Studio (PTVS) __pycache__/ -*.pyc \ No newline at end of file +*.pyc + +# Azurite artifacts +__blobstorage__ +__queuestorage__ +__azurite_db*__.json \ No newline at end of file diff --git a/Functions.Templates/ProjectTemplate/FSharp/_gitignore b/Functions.Templates/ProjectTemplate/FSharp/_gitignore index 3c3f4e6a7..0a006b608 100644 --- a/Functions.Templates/ProjectTemplate/FSharp/_gitignore +++ b/Functions.Templates/ProjectTemplate/FSharp/_gitignore @@ -261,4 +261,9 @@ paket-files/ # Python Tools for Visual Studio (PTVS) __pycache__/ -*.pyc \ No newline at end of file +*.pyc + +# Azurite artifacts +__blobstorage__ +__queuestorage__ +__azurite_db*__.json \ No newline at end of file From 9a3e293a520acaa733cc432cad04dafd5cf4fb12 Mon Sep 17 00:00:00 2001 From: Tuomas Hietanen Date: Mon, 20 Sep 2021 13:03:05 +0100 Subject: [PATCH 4/8] Update TimerTriggerFSharp.fs --- .../Templates/TimerTrigger-FSharp/TimerTriggerFSharp.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Functions.Templates/Templates/TimerTrigger-FSharp/TimerTriggerFSharp.fs b/Functions.Templates/Templates/TimerTrigger-FSharp/TimerTriggerFSharp.fs index bcc1fa95a..ffad274f1 100644 --- a/Functions.Templates/Templates/TimerTrigger-FSharp/TimerTriggerFSharp.fs +++ b/Functions.Templates/Templates/TimerTrigger-FSharp/TimerTriggerFSharp.fs @@ -6,7 +6,7 @@ open Microsoft.Azure.WebJobs.Host open Microsoft.Extensions.Logging module TimerTriggerFSharp = - [] + [] let run([]myTimer: TimerInfo, log: ILogger) = let msg = sprintf "F# Time trigger function executed at: %A" DateTime.Now log.LogInformation msg From db17f18df0786f8ce0c8c8b65d01ec01711d8a56 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 22 Oct 2021 19:19:08 +0000 Subject: [PATCH 5/8] Bump axios from 0.21.1 to 0.21.2 in /Build Bumps [axios](https://github.com/axios/axios) from 0.21.1 to 0.21.2. - [Release notes](https://github.com/axios/axios/releases) - [Changelog](https://github.com/axios/axios/blob/master/CHANGELOG.md) - [Commits](https://github.com/axios/axios/compare/v0.21.1...v0.21.2) --- updated-dependencies: - dependency-name: axios dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Build/package-lock.json | 14 +++++++------- Build/package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Build/package-lock.json b/Build/package-lock.json index f2d37d055..58beb86af 100644 --- a/Build/package-lock.json +++ b/Build/package-lock.json @@ -2431,17 +2431,17 @@ "dev": true }, "axios": { - "version": "0.21.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz", - "integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==", + "version": "0.21.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.2.tgz", + "integrity": "sha512-87otirqUw3e8CzHTMO+/9kh/FSgXt/eVDvipijwDtEuwbkySWZ9SBm6VEubmJ/kLKEoLQV/POhxXFb66bfekfg==", "requires": { - "follow-redirects": "^1.10.0" + "follow-redirects": "^1.14.0" }, "dependencies": { "follow-redirects": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.1.tgz", - "integrity": "sha512-SSG5xmZh1mkPGyKzjZP8zLjltIfpW32Y5QpdNJyjcfGxK3qo3NDDkZOZSFiGn1A6SclQxY9GzEwAHQ3dmYRWpg==" + "version": "1.14.4", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.4.tgz", + "integrity": "sha512-zwGkiSXC1MUJG/qmeIFH2HBJx9u0V46QGUe3YR1fXG8bXQxq7fLj0RjLZQ5nubr9qNJUZrH+xUcwXEoXNpfS+g==" } } }, diff --git a/Build/package.json b/Build/package.json index cc9b8db6f..83ebb0a24 100644 --- a/Build/package.json +++ b/Build/package.json @@ -27,7 +27,7 @@ "@nestjs/swagger": "^4.6.1", "applicationinsights": "^1.3.1", "async-file": "^2.0.2", - "axios": "^0.21.1", + "axios": "^0.21.2", "cache-manager": "^2.9.0", "cookie-parser": "^1.4.4", "cookie-session": "^1.3.3", From 369d693f83ea244a6fade13953dcb8e83b45b854 Mon Sep 17 00:00:00 2001 From: soninaren Date: Thu, 16 Dec 2021 18:40:29 -0800 Subject: [PATCH 6/8] updating upload script to handle preview bundle --- azure-pipelines.yml | 54 +++++++++++++++------------------------------ 1 file changed, 18 insertions(+), 36 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index bb7aa7dc1..b511773f2 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -24,22 +24,6 @@ steps: inputs: versionSpec: '10.x' displayName: 'Install Node.js' - -- task: OneLocBuild@2 - enabled: true - inputs: - locProj: 'Build\Localize\LocProject.json' - outDir: '$(Build.Repository.LocalPath)' - packageSourceAuth: 'patAuth' - patVariable: '$(ONELOCBUILD)' - continueOnError: true - -- task: CopyFiles@2 - enabled: true - displayName: 'Copy Loc files to publish directories' - inputs: - SourceFolder: $(System.DefaultWorkingDirectory)/loc - TargetFolder: $(Build.ArtifactStagingDirectory) - task: PublishBuildArtifacts@1 enabled: true @@ -77,41 +61,28 @@ steps: inputs: targetType: 'inline' script: | - function GenerateIndexJson($ctx, $bundleVersion, $fileRelativePath, $rootPath) + function GenerateIndexJson($ctx, $templateVersion, $fileRelativePath, $rootPath) { $filePath = Join-Path -Path $rootPath -ChildPath $fileRelativePath - + $json = @" { - "version": "$bundleVersion", + "version": "$templateVersion", "commitId" : "$(Build.SourceVersion)" } "@ + Write-Host $filePath New-Item -Path $filePath -Force $json | Out-File -FilePath $filePath -Encoding ascii $blobName = "ExtensionBundleTemplates\build\" + $fileRelativePath Set-AzureStorageBlobContent -Container "public" -File $filePath -Blob $blobName -Context $ctx -Force } - - # get the build version - $BundleV1Template = "1.0." + $env:devops_buildNumber - $BundleV2Template = "2.0." + $env:devops_buildNumber - $BundleV3Template = "3.0." + $env:devops_buildNumber - + $rootPath = $pwd - + # Storage Context $ctx = New-AzureStorageContext -StorageAccountName "$(ACCOUNT_NAME)" -SasToken "$(ACCOUNT_KEY)" - - $fileName = "v1\latest\version.json" - GenerateIndexJson $ctx $BundleV1Template $fileName $rootPath - - $fileName = "v2\latest\version.json" - GenerateIndexJson $ctx $BundleV2Template $fileName $rootPath - - $fileName = "v3\latest\version.json" - GenerateIndexJson $ctx $BundleV3Template $fileName $rootPath $files= Get-ChildItem -Recurse -Path "$(System.ArtifactsDirectory)" foreach($file in $files) @@ -131,9 +102,20 @@ steps: $blobName = "ExtensionBundleTemplates\" + $file.Name Write-Host "Uploading file:$fileFullName" Set-AzureStorageBlobContent -Container "public" -File $fileFullName -Blob $blobName -Context $ctx + + # upload version.file + $name = $file.Name + $bundleIdLength = $name.IndexOf(".Templates.") + 10 + $bundleId = $name.Substring(0,$bundleIdLength) + + $path = $bundleId + "\latest\version.json" + + $templateVersion = $fileName.Substring($bundleIdLength+1, 8) + + GenerateIndexJson $ctx $templateVersion $path $rootPath + } } - condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master')) - task: PublishBuildArtifacts@1 inputs: From 6a0418788a91d3ef17914d806391303a89856617 Mon Sep 17 00:00:00 2001 From: soninaren Date: Thu, 16 Dec 2021 23:56:46 -0800 Subject: [PATCH 7/8] Adding loc build steps back --- azure-pipelines.yml | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b511773f2..bb5a05115 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -24,6 +24,22 @@ steps: inputs: versionSpec: '10.x' displayName: 'Install Node.js' + +- task: OneLocBuild@2 + enabled: true + inputs: + locProj: 'Build\Localize\LocProject.json' + outDir: '$(Build.Repository.LocalPath)' + packageSourceAuth: 'patAuth' + patVariable: '$(ONELOCBUILD)' + continueOnError: true + +- task: CopyFiles@2 + enabled: true + displayName: 'Copy Loc files to publish directories' + inputs: + SourceFolder: $(System.DefaultWorkingDirectory)/loc + TargetFolder: $(Build.ArtifactStagingDirectory) - task: PublishBuildArtifacts@1 enabled: true @@ -64,7 +80,7 @@ steps: function GenerateIndexJson($ctx, $templateVersion, $fileRelativePath, $rootPath) { $filePath = Join-Path -Path $rootPath -ChildPath $fileRelativePath - + $json = @" { "version": "$templateVersion", @@ -78,12 +94,12 @@ steps: $blobName = "ExtensionBundleTemplates\build\" + $fileRelativePath Set-AzureStorageBlobContent -Container "public" -File $filePath -Blob $blobName -Context $ctx -Force } - + $rootPath = $pwd - + # Storage Context $ctx = New-AzureStorageContext -StorageAccountName "$(ACCOUNT_NAME)" -SasToken "$(ACCOUNT_KEY)" - + $files= Get-ChildItem -Recurse -Path "$(System.ArtifactsDirectory)" foreach($file in $files) { @@ -116,6 +132,7 @@ steps: } } + condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master')) - task: PublishBuildArtifacts@1 inputs: From a8efc52ed6d7f9124237ca22f5f49ea01a45485c Mon Sep 17 00:00:00 2001 From: soninaren Date: Fri, 17 Dec 2021 00:36:21 -0800 Subject: [PATCH 8/8] fixing template version in version file --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index bb5a05115..d1f14978a 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -126,7 +126,7 @@ steps: $path = $bundleId + "\latest\version.json" - $templateVersion = $fileName.Substring($bundleIdLength+1, 8) + $templateVersion = $name.Substring($bundleIdLength+1, 8) GenerateIndexJson $ctx $templateVersion $path $rootPath