Skip to content

Commit 1696141

Browse files
authored
Clarify some points about cloud build variables
1 parent 380a55c commit 1696141

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

doc/cloudbuild.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,17 +89,23 @@ There are many more MSBuild variables that the build will set within the build.
8989
}
9090
```
9191

92+
Setting both of these fields to `true` means that a few variables will be defined in the cloud build server twice -- one set with the names in the table above and the other (full) set using the `NBGV_` prefix.
93+
9294
### Set cloud build variables from just one project
9395

9496
While each individual MSBuild project has its own version computed, the versions across projects are usually the same so long as you have one `version.json` file at the root of your repo. If you choose to enable setting of cloud build variables in that root version.json file, each project that builds will take a turn setting those cloud build variables. This is perhaps more work than is necessary, and when some projects compute versions differently it can lead to inconsistently defined cloud build variables, based on non-deterministic build ordering of your projects.
9597

96-
You can reduce log message noise and control for non-deterministic cloud build variables by *not* setting the `cloudBuild` options in your root version.json file, and instead defining one inside just *one* project directory that inherits from the base one, like this:
98+
You can reduce log message noise and control for non-deterministic cloud build variables by *not* setting any of the `cloudBuild` options in your root version.json file, and instead defining an additional `version.json` file inside just *one* project directory that inherits from the base one, like this:
9799

98100
```json
99101
{
100102
"inherit": true,
101103
"cloudBuild": {
102-
"setVersionVariables": true
104+
"buildNumber": {
105+
"enabled": true
106+
},
107+
"setVersionVariables": true,
108+
"setAllVariables": true
103109
}
104110
}
105111
```

0 commit comments

Comments
 (0)