summaryrefslogtreecommitdiff
path: root/lib/tasks
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-07-19 12:33:45 +0000
committerRémy Coutable <remy@rymai.me>2016-07-19 12:33:45 +0000
commit1e81ab7c8c02e126b6fd8f6148661d0a342d9937 (patch)
tree0510c9123e2b5437776317d061c60be111b637fc /lib/tasks
parent4db94cb9d779b0a0a3d5681846a68e0fd2d66b21 (diff)
parent499cdf1d19343c985b5a0f21f2333a1b45900b13 (diff)
downloadgitlab-ce-1e81ab7c8c02e126b6fd8f6148661d0a342d9937.tar.gz
Merge branch 'deployment-tracking' into 'master'
Added Rake task for tracking deployments ## What does this MR do? This MR adds a Rake task to track the current version of GitLab in InfluxDB. ## Are there points in the code the reviewer needs to double check? We may want to document this Rake task in some Markdown file, but I'm not sure what the best place for this would be. ## Why was this MR needed? We want to have a more accurate overview of when deployments occurred. ## What are the relevant issue numbers? https://gitlab.com/gitlab-com/infrastructure/issues/98 ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [x] ~~API support added~~ - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [ ] Branch has no merge conflicts with `master` (if you do - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !5320
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