Skip to content

Added an endpoint to get gocd server version details (#2202)#2239

Merged
ketan merged 1 commit intogocd:masterfrom
GaneshSPatil:gocd-server-version
May 31, 2016
Merged

Added an endpoint to get gocd server version details (#2202)#2239
ketan merged 1 commit intogocd:masterfrom
GaneshSPatil:gocd-server-version

Conversation

@GaneshSPatil
Copy link
Contributor

No description provided.

/api/feeds/**=ROLE_SUPERVISOR
/api/support=ROLE_SUPERVISOR
/api/pipelines.xml=ROLE_USER
/api/server_version=ROLE_USER
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You probably mean to say IS_AUTHENTICATED_ANONYMOUSLY so that anonymous users can call this too?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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' },
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please indent this code properly. The consistent way to test this is like this

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I mean this

expect(actual_response).to eq(expected_response([john], ApiV1::UsersRepresenter))

@GaneshSPatil GaneshSPatil changed the title Added an endpoint to get gocd server version details Added an endpoint to get gocd server version details (#2202) May 31, 2016

ENV["GO_VERSION"] = GO_VERSION
ENV["RELEASE_REVISION"] = "#{RELEASE_REVISION}"
ENV["GIT_SHA"] = GIT_SHA
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a variable called RELEASE_VCS_REV what's the difference between that and GIT_SHA?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zabil
can you tell me where we have used RELEASE_VCS_REV?

@GaneshSPatil GaneshSPatil force-pushed the gocd-server-version branch from 1c41044 to e96d66e Compare May 31, 2016 05:08
@ketan ketan added this to the Release 16.6 milestone May 31, 2016
@ketan ketan merged commit e43774e into gocd:master May 31, 2016
@ketan ketan removed the in progress label May 31, 2016
@ketan
Copy link
Member

ketan commented May 31, 2016

/cc @timoa

@timoa
Copy link

timoa commented May 31, 2016

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 ;)

@GaneshSPatil GaneshSPatil deleted the gocd-server-version branch June 6, 2016 03:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants