目前,我正在使用 Azure DevOps Server 来管理我的项目。 在此之前我使用的是 GitHub。
Github 有一个发布功能表单,我们可以在其中下载任何先前版本的源代码。正如这里 Release list preview
所以, 有谁知道如何在 azure DevOps 中创建项目的源代码 zip 哪个存储在服务器上以及何时需要?我可以像Github一样下载该版本源代码的zip。
任何类似的东西,我都可以将完整的源代码存储为该版本的 zip 文件。 这样以后每当我需要项目的源代码时我都可以随时获取。
最佳答案
您需要关联 Azure 管道才能release artifacts and artifact sources
- A release is a collection of artifacts in your DevOps CI/CD processes.
- An artifact is a deployable component of your application.
Azure Pipelines can deploy artifacts that are produced by a wide range of artifact sources, and stored in different types of artifact repositories.
这可以包括使用 Archive Files task ,以便生成与 GitHub 相同的“源代码 (zip)
”。
示例( from here ,作者 Mauricio Díaz Orlich ),根据您的情况进行调整:
- task: ArchiveFiles@2
displayName: 'Compress Files'
inputs:
rootFolderOrFile: '$(Build.BinariesDirectory)'
includeRootFolder: false
archiveType: '7z'
sevenZipCompression: 'maximum'
archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.BuildNumber).zip'
replaceExistingArchive: true
关于azure - 在 Azure DevOps Server 上创建构建 zip,例如 github,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68870763/