简体   繁体   English

Azure 在 Jenkins 中找不到 CLI

[英]Azure CLI not found in Jenkins

I have install azure cli plugins in jenkins after that i setup Azure Service Principal and got Successfully verified the Microsoft Azure Service Principal after that i create a new job and added az version to check az is installed or not in it and got failed error below is the screenshot of that error我已经在 jenkins 中安装了 azure cli 插件,之后我设置了 Azure 服务主体并成功验证了 Microsoft Azure 服务主体之后我创建了一个新作业并添加了 az 版本以检查 az 是否安装在其中并且失败错误如下该错误的屏幕截图

Note:- My Jenkins is having v2.332.1 and installed in AKS Cluster as a Helm chat my jenkins is running注意:- 我的 Jenkins 有 v2.332.1 并作为 Helm 聊天安装在 AKS 集群中我的 jenkins 正在运行

在此处输入图像描述

Here is the screenshot of plugin installed这是插件安装的截图在此处输入图像描述

Here is the my job new create in freestylejob这是我在 freestylejob 中新创建的工作在此处输入图像描述

Please help out with this issue请帮忙解决这个问题

You need to install azure cli in the Jenkins Host as well.您还需要在 Jenkins 主机中安装 azure cli。

from https://plugins.jenkins.io/azure-cli/ - Prerequisites来自https://plugins.jenkins.io/azure-cli/ - 先决条件

To use this plugin, first you need to have an Azure Service Principal in your Jenkins instance.要使用这个插件,首先你需要在你的 Jenkins 实例中有一个 Azure 服务主体。

1.Create an Azure Service Principal through Azure CLI or Azure portal. 1.通过 Azure CLI 或 Azure 门户创建一个 Azure Service Principal。

2.Open Jenkins dashboard, go to Credentials, add a new Microsoft Azure Service Principal with the credential information you just created. 2.打开Jenkins dashboard,go到Credentials,添加一个新的Microsoft Azure Service Principal,里面有你刚才创建的凭证信息。

3.Install Azure CLI in the Jenkins Host 3.在Jenkins主机安装Azure CLI

from your description, I can see you have 1,2 steps completed and possibly 3 is missing.根据您的描述,我可以看到您完成了 1,2 个步骤,可能缺少 3 个步骤。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM