简体   繁体   中英

Does execution of build/release pipeline create a new base folder with the path containing agent number or build/release number?

  1. Does each build pipeline execution create a new base folder under which all code is downloaded, artifacts created?
  2. Does each release pipeline execution create a new base folder under which all artifacts are downloaded?
  3. In build pipeline example below, what is the 1 in the path below? Is it the build number or is it the agent number?
  4. In release pipeline example below, what is the r1 in the path below? Is it the release number or is it the agent number?

Build pipeline - Build.SourcesDirectory/System.DefaultWorkingDirectory/Build.Repository.LocalPath: The local path on the agent where your source code files are downloaded. For example: c:\agent_work\1\s

Release pipeline - System.ArtifactsDirectory/System.DefaultWorkingDirectory/Agent.ReleaseDirectory: The directory to which artifacts are downloaded during deployment of a release. Example: C:\agent_work\r1\a

Does each build pipeline execution create a new base folder under which all code is downloaded, artifacts created?

With self-hosted agents, no. The first run of a build will create a folder for that build pipeline at {DRIVE_LETTER}:\{PATH_TO}\{BUILD_AGENT_WORK_DIR}\{BUILD_NUMBER} (on Windows). This folder will be re-used for subsequent pipeline builds. In Azure DevOps Services agents, it may wind up being the case that you never build twice on the same agent/host, so the folders will be created each build. See the docs for System.DefaultWorkingDirectory at: https://docs.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml


Does each release pipeline execution create a new base folder under which all artifacts are downloaded?

No. The base folder is created on the first run and recycled for subsequent runs, similarly to the way builds create folders. These will be found at {DRIVE_LETTER}:\{PATH_TO}\{DEPLOYMENT_AGENT_WORK_DIR}\r{RELEASE_NUMBER} .


In build pipeline example below, what is the 1 in the path below? Is it the build number or is it the agent number?

Build number.


In release pipeline example below, what is the r1 in the path below? Is it the release number or is it the agent number?

Release number.

NOTE: The re-use of the folders during the build/release depends on the job being processed by the same agent. In Azure Devops Services (as opposed to Azure DevOps Server), this may never happen depending how short-lived agent hosts are. There may or may not be any affinity between your pipelines and build agents.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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