gitlab-org--gitlab-foss/spec/services
Rémy Coutable be09845914 Merge branch 'environments-and-deployments' into 'master'
Add environments and deployments

This MR is a continuation of https://gitlab.com/gitlab-org/gitlab-ce/issues/17009.

The current implementation is as follow:
1. We have two new tables: `environments` and `deployments`.
2. We have a new tab: `Environments` under `Pipelines` where you can see all you environments and add a new one.
3. We add a new option to `.gitlab-ci.yml` to track where we should create a deployment for environment.
4. If environment in `.gitlab-ci.yml` is specified it will create a deployment. **If environment does not exist it will be created.** (this got changed)
5. The deployment is always successful and shows the time of the action, in that case a build that presumably should do deployment. In the future we could extend deployment with statuses: success, failure. We could extend deployments with information that this is partial or full deployment.
6. User have to create environments that he will track first.
7. User can remove environments.
8. User can retry/rollback past deployment (in that case we retry past build). The new build when succeeds it will create a new deployment.
9. Currently environment have only one parameter: `name`. In the future it should have: `variables`, `credentials` and possibly `runners` and maybe other resources.
10. Currently deployment have this parameters: `sha`, `ref`, `deployable (in this case a build)`, `user (who triggered a deployment)`, `created_at`.

The `.gitlab-ci.yml`:
```
deploy to production:
  stage: deploy
  script: dpl travis...
  environment: production
```

What needs to be done:
- [x] Write initial implementation
- [x] Improve implementation (@ayufan)
- [x] Write tests (@ayufan)
- [x] Improve UX of the forms (cc @markpundsack) - reviewed by @markpundsack
- [x] Improve implementation of the views (cc @jschatz1) - done by @iamphill 
- [x] Write .gitlab-ci.yml documentation for `environments` - done by @ayufan
- [ ] Write user documentation (@ayufan and @markpundsack)

See merge request !4605
2016-06-15 13:48:09 +00:00
..
auth Fix rubocop offenses 2016-05-31 15:38:42 +02:00
ci Rename all [ci_]commit to [ci_]pipeline in specs and features 2016-06-03 16:22:26 +02:00
groups Update tests for the current_application_settings request store changes 2016-05-27 19:05:52 -07:00
issues Fix spec 2016-06-03 17:14:23 -05:00
merge_requests Rename all [ci_]commit to [ci_]pipeline in specs and features 2016-06-03 16:22:26 +02:00
milestones Tag service specs 2015-12-09 11:55:49 +01:00
notes Fix latests concerns 2016-05-18 08:47:15 -05:00
projects Project members with guest role can't access confidential issues 2016-06-13 19:32:00 -03:00
create_commit_builds_service_spec.rb Fix remaining test offenses 2016-06-07 13:14:37 +02:00
create_deployment_service_spec.rb Make project_id and environment_id nullable 2016-06-15 13:00:13 +02:00
create_release_service_spec.rb Tag service specs 2015-12-09 11:55:49 +01:00
create_snippet_service_spec.rb Fix more specs 2016-03-20 23:09:33 +01:00
create_tag_service_spec.rb Use a similar approach to branch creation for tag creation 2016-05-04 17:19:13 +02:00
delete_tag_service_spec.rb Delete tags via rugged 2016-04-15 16:05:04 +02:00
delete_user_service_spec.rb Specs for the DeleteUserService 2016-03-15 22:19:51 +01:00
destroy_group_service_spec.rb Tag service specs 2015-12-09 11:55:49 +01:00
event_create_service_spec.rb Tag service specs 2015-12-09 11:55:49 +01:00
git_hooks_service_spec.rb Tag service specs 2015-12-09 11:55:49 +01:00
git_push_service_spec.rb Remove main_language and tests 2016-05-25 17:16:42 -04:00
git_tag_push_service_spec.rb Refactor GitTagPushService and fig tags_push system event hook 2016-04-19 11:00:30 +02:00
notification_service_spec.rb Project members with guest role can't access confidential issues 2016-06-13 19:32:00 -03:00
repair_ldap_blocked_user_service_spec.rb Code style fixes and some code simplified 2016-01-08 16:26:04 -02:00
search_service_spec.rb Tag service specs 2015-12-09 11:55:49 +01:00
system_hooks_service_spec.rb Merge branch 'add_username_to_user_system_hooks' of https://github.com/tbeadle/gitlabhq 2016-01-13 10:12:30 +01:00
system_note_service_spec.rb Rename all [ci_]commit to [ci_]pipeline in specs and features 2016-06-03 16:22:26 +02:00
test_hook_service_spec.rb Tag service specs 2015-12-09 11:55:49 +01:00
todo_service_spec.rb Merge branch 'manual-todos-issuable-sidebar' into 'master' 2016-06-14 22:01:43 +00:00
update_release_service_spec.rb Tag service specs 2015-12-09 11:55:49 +01:00
update_snippet_service_spec.rb Fix more specs 2016-03-20 23:09:33 +01:00