jenkins 是否以某种方式 运行 powershell 步骤与 -noprofile 参数?
Is jenkins somehow running powershell step with the -noprofile param?
我想自定义 jenkins 运行的 PS 个会话的配置文件
我将我的个人资料复制到几乎所有可能的位置,然后 运行 在管道中确认它在那里并且它的内容是正确的:
powershell 'cat $PsHome\Profile.ps1'
在配置文件中我设置了一些别名和环境变量
在 powershell 步骤中,如果我检查别名列表和环境变量,我看不到我的配置文件包含的更改:
powershell 'ls alias:'
powershell 'ls env:'
看起来 jenkins 不是 运行 带有 -noprofile 的 powershell: https://github.com/jenkinsci/powershell-plugin/blob/d3e8aec4074bdfa5f5032c71a3e6ba4a3c6c8340/src/main/java/hudson/plugins/powershell/PowerShell.java
为什么我的配置文件没有被执行?
管道作业中的 powershell
命令并非来自 PowerShell 插件,正如您的 post 所假设的那样。
PowerShell 插件仅用于在自由式作业和 doesn't support pipelines.
上添加执行 PowerShell 步骤
Does this plugin support pipelines?
No, but there is a powershell step provided by the Pipeline: Nodes and Processes plugin
他们遇到了相反的情况,配置文件总是被加载,问题是如何在需要时避免它们。一个新的 PR mas 最近合并到 integrate a switch to choose whether profiles should be loaded or not
管道作业的 powershell 实现来自管道:节点和进程插件 (a.k.a。workflow-durable-task-step-plugin) and currently, it doesn't include a parameter to enable disable loading Profiles.
相关文件是 here and here,以防您能理解它们并使用附加参数创建新的 PR。
GitLab 中的项目似乎禁用了 Issues,因此 reporting/requesting 不可能。
我想自定义 jenkins 运行的 PS 个会话的配置文件
我将我的个人资料复制到几乎所有可能的位置,然后 运行 在管道中确认它在那里并且它的内容是正确的:
powershell 'cat $PsHome\Profile.ps1'
在配置文件中我设置了一些别名和环境变量
在 powershell 步骤中,如果我检查别名列表和环境变量,我看不到我的配置文件包含的更改:
powershell 'ls alias:'
powershell 'ls env:'
看起来 jenkins 不是 运行 带有 -noprofile 的 powershell: https://github.com/jenkinsci/powershell-plugin/blob/d3e8aec4074bdfa5f5032c71a3e6ba4a3c6c8340/src/main/java/hudson/plugins/powershell/PowerShell.java
为什么我的配置文件没有被执行?
管道作业中的 powershell
命令并非来自 PowerShell 插件,正如您的 post 所假设的那样。
PowerShell 插件仅用于在自由式作业和 doesn't support pipelines.
上添加执行 PowerShell 步骤Does this plugin support pipelines? No, but there is a powershell step provided by the Pipeline: Nodes and Processes plugin
他们遇到了相反的情况,配置文件总是被加载,问题是如何在需要时避免它们。一个新的 PR mas 最近合并到 integrate a switch to choose whether profiles should be loaded or not
管道作业的 powershell 实现来自管道:节点和进程插件 (a.k.a。workflow-durable-task-step-plugin) and currently, it doesn't include a parameter to enable disable loading Profiles.
相关文件是 here and here,以防您能理解它们并使用附加参数创建新的 PR。
GitLab 中的项目似乎禁用了 Issues,因此 reporting/requesting 不可能。