Commit graph

21 commits

Author SHA1 Message Date
Z.J. van de Weg
3ebd29b538 Futher rename the CI variables 2017-03-16 08:49:01 +01:00
Douwe Maan
eacae00516 Enable Style/MultilineHashBraceLayout 2017-02-23 09:32:22 -06:00
Grzegorz Bizon
3ba6518512 Prefer using project.add_developer in specs 2017-02-15 11:12:07 +01:00
Grzegorz Bizon
1be454e712 Fix envs and deploys specs related to build retry 2017-02-13 15:12:08 +01:00
Kamil Trzcinski
19300a1a3d Merge remote-tracking branch 'origin/master' into 22191-delete-dynamic-envs-mr 2016-10-18 17:48:27 +02:00
Kamil Trzcinski
e988072207 Fix environments specs 2016-10-17 21:06:10 +02:00
Kamil Trzcinski
4a369185d7 Work on specs 2016-10-17 17:10:26 +02:00
Nick Thomas
bfb20200e9 Add a be_like_time matcher and use it in specs
The amount of precision times have in databases is variable, so we need
tolerances when comparing in specs. It's better to have the tolerance defined
in one place than several.
2016-10-17 14:44:20 +01:00
Grzegorz Bizon
3726dc4bb7 Check if project exists before creating deployment 2016-10-14 10:19:16 +02:00
Timothy Andrew
cc3adcd4bf Fix CreateDeploymentService spec.
1. The spec tests that if:

  - The merge request is merged
  - The target branch is deployed to production
  - The `first_deployed_to_production_at` metric is `nil` (for some reason)
  - The target branch is deployed to production again
  - The `first_deployed_to_production_at` metric stays as `nil` (and is
    not overwritten).

2. Failure only on MySQL due to some datetime weirdness.
2016-09-21 09:17:00 +05:30
Timothy Andrew
0a2649ce69 Fix build. 2016-09-21 02:59:17 +05:30
Timothy Andrew
e109166db2 Fix spec failures. 2016-09-20 16:53:12 +05:30
Timothy Andrew
fa890604aa Merge remote-tracking branch 'origin/master' into 21170-cycle-analytics 2016-09-20 14:48:13 +05:30
Kamil Trzcinski
4939911e96 Fix specs failures 2016-09-19 12:44:10 +02:00
Kamil Trzcinski
6b97968745 Update support for dynamic environments 2016-09-19 10:07:13 +02:00
Kamil Trzcinski
e1b3ab5af2 Verify expandability of variables defined as part of environment 2016-09-19 10:07:13 +02:00
Timothy Andrew
8f6208513a Test all cycle analytics pre-calculation code.
All the code that pre-calculates metrics for use in the cycle analytics
page.

- Ci::Pipeline -> build start/finish
- Ci::Pipeline#merge_requests
- Issue -> record default metrics after save
- MergeRequest -> record default metrics after save
- Deployment -> Update "first_deployed_to_production_at" for MR metrics
- Git Push -> Update "first commit mention" for issue metrics
- Merge request create/update/refresh -> Update "merge requests closing issues"
2016-09-19 13:12:06 +05:30
Kamil Trzcinski
72818f2c15 Fix creation of deployment on build that is retried, redeployed or rollback 2016-07-16 11:50:59 +02:00
Kamil Trzcinski
14433b341d Make project_id and environment_id nullable
This is done to make belongs_to with required to properly validate association.
Otherwise `ActiveRecord::StatementInvalid` is raised.
2016-06-15 13:00:13 +02:00
Kamil Trzcinski
6209b60c96 Properly create a new deployment after build success 2016-06-14 14:44:09 +02:00
Kamil Trzcinski
3ade826065 Add specs for models and services 2016-06-14 13:51:12 +02:00