代码改变世界

Azure DevOps 管道部署系列之一本地服务器 - 实践

2025-10-06 21:39  tlnshuju  阅读(2)  评论(0)    收藏  举报

Azure一个协助改进 SDLC(软件开发生命周期)的平台。就是DevOps

在本文中,我们将使用 Azure Pipelines 创建自动化部署。

Azure DevOps团队将 Azure Pipelines 定义为“使用 CI/CD 构建、测试和部署,适用于任何语言、平台和云平台”。

在这里,我将解释如何在 Azure DevOps 中创建构建和发布管道,并将代码部署到本地服务器。

1. 创建hello world build pipeline

首先创建一个devops build pipeline,该pipeline 生成一个txt文件,并把它作为artifact发布。

trigger:- main  # Adjust if your default branch is different pool:  name: 'agent01' steps:- script: |    echo "Hello, World!" > helloworld.txt  displayName: 'Create HelloWorld file' - publish: helloworld.txt  artifact: hellowor