Added an endpoint to get gocd server version details (#2202)#2239
Added an endpoint to get gocd server version details (#2202)#2239ketan merged 1 commit intogocd:masterfrom
Conversation
| /api/feeds/**=ROLE_SUPERVISOR | ||
| /api/support=ROLE_SUPERVISOR | ||
| /api/pipelines.xml=ROLE_USER | ||
| /api/server_version=ROLE_USER |
There was a problem hiding this comment.
You probably mean to say IS_AUTHENTICATED_ANONYMOUSLY so that anonymous users can call this too?
There was a problem hiding this comment.
Also how about simply calling this /api/version?
| version_file = Rails.root.join('..', 'vm', 'admin', 'server_version.txt.vm') | ||
| file_content = '{"go_version":"16.6.0", "go_build_number":"235", "git_sha":"69ef4921709a84831913d9fa7e750fbf840f213c"}' | ||
| expected_json = { :_links => { | ||
| :self=>{:href=> 'http://test.host/api/server_version' }, |
There was a problem hiding this comment.
Please indent this code properly. The consistent way to test this is like this
There was a problem hiding this comment.
Sorry, I mean this
|
|
||
| ENV["GO_VERSION"] = GO_VERSION | ||
| ENV["RELEASE_REVISION"] = "#{RELEASE_REVISION}" | ||
| ENV["GIT_SHA"] = GIT_SHA |
There was a problem hiding this comment.
We have a variable called RELEASE_VCS_REV what's the difference between that and GIT_SHA?
There was a problem hiding this comment.
@zabil
can you tell me where we have used RELEASE_VCS_REV?
1c41044 to
e96d66e
Compare
|
/cc @timoa |
|
Thanks @ketan! Good news for the next releases to call this endpoint rather than the login page and search in the HTML the version label in the bottom ;) |
No description provided.