I can see information about the latest commit deployed to a deployment on dokku or localhost
So that I am more aware of which commit is deployed on running code
Discussion
In this issue, we bring over some code from proj-courses into this code base; code that provides transparency about what version of the code is running in any given deployment.
In the proj-courses code base, we've implemented a feature where you can get the SHA and the commit message for the latest commit that was deployed either on localhost or on dokku. You access it by going to the endpoint /api/systemInfo.
Here's what it looks like:
Note that this only works if all of the code is deployed correctly in the code base, and if the following has been done on the dokku deployment (here, courses-qa is the name of the dokku app)
dokku git:set courses-qa keep-git-dir true
After setting that, you will need to do a dokku ps:rebuild appname for it to take effect.
If that's not set, you'll see something like this:
Also, you need to set the env variable: SOURCE_REPO to the correct repo. This should be done rather than changing the value https://github.com/ucsb-cs156/proj-happycows in the code!
Note: Join the channel #help-git-commit-id-maven-plugin on slack for advice on how to complete this story.
User Story
Discussion
In this issue, we bring over some code from proj-courses into this code base; code that provides transparency about what version of the code is running in any given deployment.
In the proj-courses code base, we've implemented a feature where you can get the SHA and the commit message for the latest commit that was deployed either on localhost or on dokku. You access it by going to the endpoint /api/systemInfo.
Here's what it looks like:
Note that this only works if all of the code is deployed correctly in the code base, and if the following has been done on the dokku deployment (here,
courses-qa
is the name of the dokku app)After setting that, you will need to do a
dokku ps:rebuild appname
for it to take effect.If that's not set, you'll see something like this:
Also, you need to set the env variable: SOURCE_REPO to the correct repo. This should be done rather than changing the value https://github.com/ucsb-cs156/proj-happycows in the code!
For the changes you need to make to the code, refer to this PR from proj-courses:
https://github.com/ucsb-cs156/proj-courses/pull/85
Acceptance Criteria
Implementation Todos
See: https://github.com/ucsb-cs156/proj-courses/pull/85 for hints on how to proceed.