-
Notifications
You must be signed in to change notification settings - Fork 271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
environment variables are not picked up by task. #1015
Comments
Hi @sostrich, I suppose the |
Hi, thanks for your help! This is not the best solution for us, since we have many dockerfiles which we all have to change. Still, I guess it is an option if the v1 version of the task ever gets removed. when you say "not effect on this task as expected", do you mean it is expected behaviour that the env variable does not affect the task? Is there a reason why this is intended behaviour? |
This issue has had no activity in 90 days. Please comment if it is not actually stale |
@sostrich fixed, thanks. The |
Please check our current Issues to see if someone already reported this https://github.com/Microsoft/azure-pipelines-task-lib/issues
Environment
azure-pipelines-task-lib version: The one used by Azure Devops 2022.01
Issue Description
Some ADOS tasks (like PublishCodeCoverageResults@2) cannot be influenced by environment variables, because they pass env variables (e.g. here) and then task-lib does not pick up other existing environment variables.
Expected behaviour
Existing environment variables should not be lost when other, unrelated environment variables are passed explicitly by ADOS tasks.
Actual behaviour
The existing environment variables are lost as soon as any env variables are passed.
Steps to reproduce
e.g. ADOS task PublishCodeCoverageResults@2 is affected. It fails when run in a container that does not have the ICU libs, and outputs the message:
"Process terminated. Couldn't find a valid ICU package installed on the system. Please install libicu (or icu-libs) using your package manager and try again. Alternatively you can set the configuration flag System.Globalization.Invariant to true if you want to run with no globalization support. Please see https://aka.ms/dotnet-missing-libicu for more information."
But when the System.Globalization.Invariant flag is set to true via an environment variable, you still get the error.
Logs
Starting: PublishCodeCoverageResults
Task : Publish code coverage results v2
Description : Publish any of the code coverage results from a build
Version : 2.225.0
Author : Microsoft Corporation
Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/test/publish-code-coverage-results
Found 1 result(s) matching pattern: /__w/7/s/target/coverage/platform-quarkus-projects/jacoco.xml
/__w/7/s/target/coverage/platform-quarkus-projects/jacoco.xml
/__w/_tasks/PublishCodeCoverageResults_2a7ebc54-c13e-490e-81a5-d7561ab7cd97/2.225.0/node_modules/coveragepublisher/CoveragePublisher/linux-x64/CoveragePublisher.Console /__w/7/s/target/path_to_coverage_report --reportDirectory /__w/_temp/3089be52-7065-4c58-98f9-02471876dfa4
Process terminated. Couldn't find a valid ICU package installed on the system. Please install libicu (or icu-libs) using your package manager and try again. Alternatively you can set the configuration flag System.Globalization.Invariant to true if you want to run with no globalization support. Please see https://aka.ms/dotnet-missing-libicu for more information.
at System.Environment.FailFast(System.String)
at System.Globalization.GlobalizationMode+Settings..cctor()
at System.Globalization.CultureData.CreateCultureWithInvariantData()
at System.Globalization.CultureData.get_Invariant()
at System.Globalization.CultureInfo..cctor()
at System.Globalization.CultureInfo.get_InvariantCulture()
at CommandLine.ParserSettings..ctor()
at CommandLine.Parser+<>c.<.cctor>b__20_0()
at System.Lazy
1[[System.__Canon, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].ViaFactory(System.Threading.LazyThreadSafetyMode) at System.Lazy
1[[System.__Canon, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].ExecutionAndPublication(System.LazyHelper, Boolean)at System.Lazy`1[[System.__Canon, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].CreateValue()
at CommandLine.Parser.get_Default()
at Microsoft.Azure.Pipelines.CoveragePublisher.ArgumentsProcessor.ProcessCommandLineArgs(System.String[])
at Microsoft.Azure.Pipelines.CoveragePublisher.Program.Main(System.String[])
Finishing: PublishCodeCoverageResults
The text was updated successfully, but these errors were encountered: