summaryrefslogtreecommitdiff
path: root/lib/tasks
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2016-07-18 14:11:36 +0200
committerYorick Peterse <yorickpeterse@gmail.com>2016-07-19 13:21:09 +0200
commit499cdf1d19343c985b5a0f21f2333a1b45900b13 (patch)
tree1326ee22c5dd49d8c77398c18de95668fe1aeabc /lib/tasks
parent240a4aa62ab24a8a7b5545dee6bd2cf00ad7596e (diff)
downloadgitlab-ce-499cdf1d19343c985b5a0f21f2333a1b45900b13.tar.gz
Added Rake task for tracking deploymentsdeployment-tracking
This simply inserts the current GitLab version in the "deployments" measurement. Fixes gitlab-com/infrastructure#98
Diffstat (limited to 'lib/tasks')
-rw-r--r--lib/tasks/gitlab/track_deployment.rake9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/tasks/gitlab/track_deployment.rake b/lib/tasks/gitlab/track_deployment.rake
new file mode 100644
index 00000000000..84aa2e8507a
--- /dev/null
+++ b/lib/tasks/gitlab/track_deployment.rake
@@ -0,0 +1,9 @@
+namespace :gitlab do
+ desc 'GitLab | Tracks a deployment in GitLab Performance Monitoring'
+ task track_deployment: :environment do
+ metric = Gitlab::Metrics::Metric.
+ new('deployments', version: Gitlab::VERSION)
+
+ Gitlab::Metrics.submit_metrics([metric.to_hash])
+ end
+end