diff options
author | dotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com> | 2019-08-09 13:41:14 -0400 |
---|---|---|
committer | Stephen Toub <stoub@microsoft.com> | 2019-08-09 13:41:14 -0400 |
commit | 834a6dd911633ff7f62d526de91b779030a6487c (patch) | |
tree | 594d67a1295f133040daf878b38d1828da41c7d2 /eng/common/pipeline-logging-functions.sh | |
parent | 212d38daf678091f8947fcbf4a4459b47497f532 (diff) | |
download | coreclr-834a6dd911633ff7f62d526de91b779030a6487c.tar.gz coreclr-834a6dd911633ff7f62d526de91b779030a6487c.tar.bz2 coreclr-834a6dd911633ff7f62d526de91b779030a6487c.zip |
Update dependencies from https://github.com/dotnet/arcade build 20190808.13 (#26099)
- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19408.13
- Microsoft.DotNet.Build.Tasks.Feed - 2.2.0-beta.19408.13
- Microsoft.DotNet.Build.Tasks.Packaging - 1.0.0-beta.19408.13
- Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19408.13
Diffstat (limited to 'eng/common/pipeline-logging-functions.sh')
-rwxr-xr-x[-rw-r--r--] | eng/common/pipeline-logging-functions.sh | 82 |
1 files changed, 76 insertions, 6 deletions
diff --git a/eng/common/pipeline-logging-functions.sh b/eng/common/pipeline-logging-functions.sh index 6098f9a543..1c560a5061 100644..100755 --- a/eng/common/pipeline-logging-functions.sh +++ b/eng/common/pipeline-logging-functions.sh @@ -39,11 +39,11 @@ function Write-PipelineTaskError { return fi - message_type="error" - sourcepath='' - linenumber='' - columnnumber='' - error_code='' + local message_type="error" + local sourcepath='' + local linenumber='' + local columnnumber='' + local error_code='' while [[ $# -gt 0 ]]; do opt="$(echo "${1/#--/-}" | awk '{print tolower($0)}')" @@ -76,7 +76,7 @@ function Write-PipelineTaskError { shift done - message="##vso[task.logissue" + local message="##vso[task.logissue" message="$message type=$message_type" @@ -100,3 +100,73 @@ function Write-PipelineTaskError { echo "$message" } +function Write-PipelineSetVariable { + if [[ "$ci" != true ]]; then + return + fi + + local name='' + local value='' + local secret=false + local as_output=false + local is_multi_job_variable=true + + while [[ $# -gt 0 ]]; do + opt="$(echo "${1/#--/-}" | awk '{print tolower($0)}')" + case "$opt" in + -name|-n) + name=$2 + shift + ;; + -value|-v) + value=$2 + shift + ;; + -secret|-s) + secret=true + ;; + -as_output|-a) + as_output=true + ;; + -is_multi_job_variable|-i) + is_multi_job_variable=$2 + shift + ;; + esac + shift + done + + value=${value/;/%3B} + value=${value/\\r/%0D} + value=${value/\\n/%0A} + value=${value/]/%5D} + + local message="##vso[task.setvariable variable=$name;isSecret=$secret;isOutput=$is_multi_job_variable]$value" + + if [[ "$as_output" == true ]]; then + $message + else + echo "$message" + fi +} + +function Write-PipelinePrependPath { + local prepend_path='' + + while [[ $# -gt 0 ]]; do + opt="$(echo "${1/#--/-}" | awk '{print tolower($0)}')" + case "$opt" in + -path|-p) + prepend_path=$2 + shift + ;; + esac + shift + done + + export PATH="$prepend_path:$PATH" + + if [[ "$ci" == true ]]; then + echo "##vso[task.prependpath]$prepend_path" + fi +}
\ No newline at end of file |