The Go documentation appears to be incorrect in the area of at least one built-in Go environment variable passed to the scripts.
For example, the 2.0 docs (we use Go 2.0) say the source repository revision number is in GO_REVISION. We were scratching our heads as to why this was not working until we modified our Windows command file to dump out all environment variables, and discovered it's actually GO_REVISION_SVN.
First question - the 2.3 docs have not changed - has the behavior changed to match the documentation?
Second question - are there any other such mismatches in built-in enviroment variables I haven't found yet?
http://www.thoughtworks-studios.com/go/2.3/help/admin_set_environment_variables.html
Comments
2 comments
Hi Steve,
If a name is specified for a material, the name is appended to the environment variable GO_REVISION. example: The variable is GO_REVISION_SVN if svn is the material name. If there are multiple materials, the destination directory name is appended to the variable.
The documentation does not fully capture this info. Thanks for reporting this. We will fix it in the next release.
Also, all environment variables set by Go for a job are printed in the console output for the job.
To answer your second question, the documentation does not fully capture info on two other variables. Here is the correct usage.
GO_DEPENDENCY_LABEL_$(name) : This variable is used to indicate the label of the upstream pipeline. $(name) will be the name of the pipeline dependency material if a name is specified. $(name) will be the name of the upstream pipeline otherwise.
GO_DEPENDENCY_LOCATOR_$(name) : This variable is used to indicate the locator of the upstream pipeline. $(name) will be the name of the pipeline dependency material if a name is specified. $(name) will be the name of the upstream pipeline otherwise.
Thanks, Santosh, just what I needed.
/Steve
Please sign in to leave a comment.