Added test for ArtifactFeedPat env var
a2ad40fa
Adam Rush
committed
failed
1 changed file
Publish-AzDOArtifactFeed.ps1
/Build/Publish-AzDOArtifactFeed.ps1-56+76
/Build/Publish-AzDOArtifactFeed.ps1
Add comment 1 Minus  // Available variables which can be used inside of strings.
Add comment 2 Minus  // ${workspaceRoot}: the root folder of the team
Add comment 3 Minus  // ${file}: the current opened file
Add comment 4 Minus  // ${relativeFile}: the current opened file relative to workspaceRoot
Add comment 5 Minus  // ${fileBasename}: the current opened file's basename
Add comment 6 Minus  // ${fileDirname}: the current opened file's dirname
Add comment 7 Minus  // ${fileExtname}: the current opened file's extension
Add comment 8 Minus  // ${cwd}: the current working directory of the spawned process
Add comment 1 Plus  // A task runner that invokes Pester to run all Pester tests under the
Add comment 2 Plus  // current workspace folder.
Add comment 3 Plus  // NOTE: This Test task runner requires an updated version of Pester (>=4.0.3)
Add comment 4 Plus  // in order for the problemMatcher to find failed test information (message, line, file).
Add comment 5 Plus  // If you don't have that version, you can update Pester from the PowerShell Gallery
Add comment 6 Plus  // with this command:
Add comment 7 Plus  //
Add comment 8 Plus  // PS C:\> Update-Module Pester
Add comment 9 Plus  //
Add comment 10 Plus  // If that gives an error like:
Add comment 11 Plus  // "Module 'Pester' was not installed by using Install-Module, so it cannot be updated."
Add comment 12 Plus  // then execute:
Add comment 13 Plus  //
Add comment 14 Plus  // PS C:\> Install-Module Pester -Scope CurrentUser -Force
Add comment 15 Plus  //
Add comment 16 Plus  // NOTE: The Clean, Build and Publish tasks require PSake. PSake can be installed
Add comment 17 Plus  // from the PowerShell Gallery with this command:
Add comment 18 Plus  //
Add comment 19 Plus  // PS C:\> Install-Module PSake -Scope CurrentUser -Force
Add comment 20 Plus  //
Add comment 21 Plus  // Available variables which can be used inside of strings:
Add comment 22 Plus  // ${workspaceFolder} the path of the workspace folder that contains the tasks.json file
Add comment 23 Plus  // ${workspaceFolderBasename} the name of the workspace folder that contains the tasks.json file without any slashes (/)
Add comment 24 Plus  // ${file} the current opened file
Add comment 25 Plus  // ${relativeFile} the current opened file relative to the workspace folder containing the file
Add comment 26 Plus  // ${fileBasename} the current opened file's basename
Add comment 27 Plus  // ${fileBasenameNoExtension} the current opened file's basename without the extension
Add comment 28 Plus  // ${fileDirname} the current opened file's dirname
Add comment 29 Plus  // ${fileExtname} the current opened file's extension
Add comment 30 Plus  // ${cwd} the task runner's current working directory on startup
Add comment 31 Plus  // ${lineNumber} the current selected line number in the active file
Add comment 9 32 {
Add comment 10 Minus   // See https://go.microsoft.com/fwlink/?LinkId=733558
Add comment 11 Minus   // for the documentation about the tasks.json format
Add comment 12 33 "version": "2.0.0",
Add comment 13 Minus  
Add comment 14 Minus   // Start PowerShell
Add comment 15 34 "windows": {
Add comment 16 Minus   "command": "${env:windir}/System32/WindowsPowerShell/v1.0/powershell.exe",
Add comment 35 Plus   "options": {
Add comment 36 Plus   "shell": {
Add comment 37 Plus   "executable": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
Add comment 17 38 "args": [
Add comment 18 39 "-NoProfile",
Add comment 19 40 "-ExecutionPolicy",
Add comment 20 Minus   "Bypass"
Add comment 41 Plus   "Bypass",
Add comment 42 Plus   "-Command"
Add comment 21 43 ]
Add comment 44 Plus   }
Add comment 45 Plus   }
Add comment 22 46 },
Add comment 23 47 "linux": {
Add comment 24 Minus   "command": "/usr/bin/powershell",
Add comment 48 Plus   "options": {
Add comment 49 Plus   "shell": {
Add comment 50 Plus   "executable": "/usr/bin/pwsh",
Add comment 25 51 "args": [
Add comment 26 Minus   "-NoProfile"
Add comment 52 Plus   "-NoProfile",
Add comment 53 Plus   "-Command"
Add comment 27 54 ]
Add comment 55 Plus   }
Add comment 56 Plus   }
Add comment 28 57 },
Add comment 29 58 "osx": {
Add comment 30 Minus   "command": "/usr/local/bin/powershell",
Add comment 59 Plus   "options": {
Add comment 60 Plus   "shell": {
Add comment 61 Plus   "executable": "/usr/local/bin/pwsh",
Add comment 31 62 "args": [
Add comment 32 Minus   "-NoProfile"
Add comment 33 Minus   ]
Add comment 34 Minus   },
Add comment 35 Minus  
Add comment 36 Minus   // Associate with test task runner
Add comment 37 Minus   "tasks": [{
Add comment 38 Minus   "taskName": "Analyze",
Add comment 39 Minus  
Add comment 40 Minus   "suppressTaskName": true,
Add comment 41 Minus   "showOutput": "always",
Add comment 42 Minus   "args": [
Add comment 43 Minus   "Write-Host 'Running Analyze Task...'; & .\\Build\\build.ps1 -Task Analyze;",
Add comment 44 Minus   "Write-Host \"`nCompleted Analyze task in task runner.\""
Add comment 63 Plus   "-NoProfile",
Add comment 64 Plus   "-Command"
Add comment 45 65 ]
Add comment 66 Plus   }
Add comment 67 Plus   }
Add comment 46 68 },
Add comment 69 Plus   "tasks": [
Add comment 47 70 {
Add comment 48 Minus   "taskName": "Test",
Add comment 49 Minus   "suppressTaskName": true,
Add comment 50 Minus   "isTestCommand": true,
Add comment 51 Minus   "showOutput": "always",
Add comment 52 Minus   "args": [
Add comment 53 Minus   "Write-Host 'Running Test Task...'; & .\\Build\\build.ps1 -Task Test;",
Add comment 54 Minus   "Write-Host \"`nCompleted Test task in task runner.\""
Add comment 55 Minus   ],
Add comment 56 Minus   "problemMatcher": [{
Add comment 57 Minus   "owner": "powershell",
Add comment 58 Minus   "fileLocation": ["absolute"],
Add comment 59 Minus   "severity": "error",
Add comment 60 Minus   "pattern": [{
Add comment 61 Minus   "regexp": "^\\s*(\\[-\\]\\s*.*?)(\\d+)ms\\s*$",
Add comment 62 Minus   "message": 1
Add comment 71 Plus   "label": "Clean",
Add comment 72 Plus   "type": "shell",
Add comment 73 Plus   "command": ".\\Build\\build.ps1 -taskList Clean"
Add comment 63 74 },
Add comment 64 75 {
Add comment 65 Minus   "regexp": "^\\s+at\\s+[^,]+,\\s*(.*?):\\s+line\\s+(\\d+)$",
Add comment 66 Minus   "file": 1,
Add comment 67 Minus   "line": 2
Add comment 76 Plus   "label": "Build",
Add comment 77 Plus   "type": "shell",
Add comment 78 Plus   "command": ".\\Build\\build.ps1 -taskList Build",
Add comment 79 Plus   "group": {
Add comment 80 Plus   "kind": "build",
Add comment 81 Plus   "isDefault": true
Add comment 68 82 }
Add comment 83 Plus   },
Add comment 84 Plus   {
Add comment 85 Plus   "label": "Test",
Add comment 86 Plus   "type": "shell",
Add comment 87 Plus   "command": ".\\Build\\build.ps1 -taskList Test",
Add comment 88 Plus   "group": {
Add comment 89 Plus   "kind": "test",
Add comment 90 Plus   "isDefault": true
Add comment 91 Plus   },
Add comment 92 Plus   "problemMatcher": [
Add comment 93 Plus   "$pester"
Add comment 69 94 ]
Add comment 70 Minus   }]
Add comment 71 95 },
Add comment 72 96 {
Add comment 73 Minus   "taskName": "Build",
Add comment 74 Minus   "suppressTaskName": true,
Add comment 75 Minus   "isBuildCommand": true,
Add comment 76 Minus   "args": [
Add comment 77 Minus   "Write-Host 'Running Build Task...'; & .\\Build\\build.ps1 -Task Build;",
Add comment 78 Minus   "Write-Host \"`nCompleted Build task in task runner.\""
Add comment 79 Minus   ]
Add comment 97 Plus   "label": "Publish",
Add comment 98 Plus   "type": "shell",
Add comment 99 Plus   "command": ".\\Build\\build.ps1 -taskList Publish"
Add comment 80 100 }
Add comment 81 101 ]
Add comment 82 102 }