您现在访问的是微软AZURE全球版技术文档网站,若需要访问由世纪互联运营的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.

Azure 和 JenkinsAzure and Jenkins

Jenkins 是一个受欢迎的开源自动化服务器,用于设置软件项目的持续集成和交付 (CI/CD)。Jenkins is a popular open-source automation server used to set up continuous integration and delivery (CI/CD) for your software projects. 可以使用 Azure 资源在 Azure 中托管 Jenkins 部署或扩展现有的 Jenkins 配置。You can host your Jenkins deployment in Azure or extend your existing Jenkins configuration using Azure resources. 此外,Jenkins 插件还可用来简化应用程序在 Azure 中的 CI/CD 过程。Jenkins plugins are also available to simplify CI/CD of your applications to Azure.

本文将介绍如何将 Azure 用于 Jenkins,详细说明可供 Jenkins 用户使用的核心 Azure 功能。This article is an introduction to using Azure with Jenkins, detailing the core Azure features available to Jenkins users. 若要详细了解如何在 Azure 中完成自己的 Jenkins 服务器的入门,请参阅在 Azure 上创建 Jenkins 服务器For more information about getting started with your own Jenkins server in Azure, see Create a Jenkins server on Azure.

在 Azure 中托管 Jenkins 服务器Host your Jenkins servers in Azure

在 Azure 中托管 Jenkins,以集中执行生成自动化,并根据软件项目增长的需要来扩展部署。Host Jenkins in Azure to centralize your build automation and scale your deployment as the needs of your software projects grow. 可以使用以下项在 Azure 中部署 Jenkins:You can deploy Jenkins in Azure using:

使用 Azure Monitor 日志Azure CLI 来监视和管理 Azure Jenkins 部署。Monitor and manage your Azure Jenkins deployment using Azure Monitor logs and the Azure CLI.

按需扩展生成自动化Scale your build automation on demand

将生成代理添加到现有 Jenkins 部署来扩展 Jenkins 生成能力,因为作业和管道的生成数量及复杂性都在增加。Add build agents to your existing Jenkins deployment to scale your Jenkins build capacity as the number of builds and complexity of your jobs and pipelines increase. 你可以通过使用 Azure VM 代理插件在 Azure 虚拟机上运行这些生成代理。You can run these build agents on Azure virtual machines by using the Azure VM Agents plugin. 请参阅我们的教程,了解详细信息。See our tutorial for more details.

配置 Azure 服务主体后,Jenkins 作业和管道可以使用此凭据执行以下操作:Once configured with an Azure service principal, Jenkins jobs and pipelines can use this credential to:

将代码部署到 Azure 服务Deploy your code into Azure services

使用 Jenkins 插件将应用程序作为 Jenkins CI/CD 管道的一部分部署到 Azure。Use Jenkins plugins to deploy your applications to Azure as part of your Jenkins CI/CD pipelines. 通过部署到 Azure 应用服务Azure 容器服务,可以暂存和测试更新,并将其发布到应用程序,而无需管理基础结构。Deploying into Azure App Service and Azure Container Service lets you stage, test, and release updates to your applications without managing the underlying infrastructure.

插件可用于部署到以下服务和环境:Plug-ins are available to deploy to the following services and environments: