Last active
August 29, 2015 14:18
-
-
Save brianr/d7e61965fca488636da8 to your computer and use it in GitHub Desktop.
RQL queries for deploys
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- select all deploys | |
select * from deploy; | |
-- select main columns for all deploys of a specific revision | |
select id, timestamp, environment, comment from deploy | |
where revision = 'some git sha here' | |
-- deploys of 'production' by revision, and when they were first and last deployed | |
-- ordered by most recent deploy first | |
select revision, count(*), min(timestamp), max(timestamp) | |
from deploy | |
where environment = 'production' | |
group by 1 | |
order by 4 desc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment