gitlab-org--gitlab-foss/spec/models
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
..
ci Rename all `[ci_]commit` to `[ci_]pipeline` in specs and features 2016-06-03 16:22:26 +02:00
concerns UI and copywriting improvements 2016-06-14 13:18:14 +02:00
hooks Codestyle: make sure we have space around operators 2016-05-13 04:46:56 -03:00
members UI and copywriting improvements 2016-06-14 13:18:14 +02:00
project_services Fix broken URI joining for `teamcity_url` with suffixes 2016-06-14 10:07:37 +02:00
ability_spec.rb Refactor Participable 2016-06-01 16:22:35 +02:00
abuse_report_spec.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
appearance_spec.rb
application_setting_spec.rb stub Devise.omniauth_providers to return GitHub even if the gitlab.yml has no omniauth provider enabled 2016-05-12 13:44:46 +03:00
award_emoji_spec.rb Incorportate feedback 2016-06-01 12:10:08 +02:00
blob_spec.rb
broadcast_message_spec.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
build_spec.rb Fix Ci::Build#artifacts_expire_in= when assigning invalid duration 2016-06-14 14:51:09 +02:00
commit_range_spec.rb Fix note validation spec failures 2016-06-01 10:31:46 -07:00
commit_spec.rb Refactor Participable 2016-06-01 16:22:35 +02:00
commit_status_spec.rb Rename all `[ci_]commit` to `[ci_]pipeline` in specs and features 2016-06-03 16:22:26 +02:00
deploy_key_spec.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
deploy_keys_project_spec.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
deployment_spec.rb Add specs for models and services 2016-06-14 13:51:12 +02:00
email_spec.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
environment_spec.rb Add specs for models and services 2016-06-14 13:51:12 +02:00
event_spec.rb Project members with guest role can't access confidential issues 2016-06-13 19:32:00 -03:00
external_issue_spec.rb
forked_project_link_spec.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
generic_commit_status_spec.rb Rename all `[ci_]commit` to `[ci_]pipeline` in specs and features 2016-06-03 16:22:26 +02:00
global_milestone_spec.rb
group_spec.rb UI and copywriting improvements 2016-06-14 13:18:14 +02:00
identity_spec.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
issue_spec.rb Update specs. Add CHANGELOG entry 2016-06-02 09:25:40 -04:00
jira_issue_spec.rb
key_spec.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
label_link_spec.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
label_spec.rb Merge branch 'remove-annotate-gem' into 'master' 2016-05-10 09:08:30 +00:00
legacy_diff_note_spec.rb Improve note factory 2016-05-29 15:03:00 -04:00
member_spec.rb UI and copywriting improvements 2016-06-14 13:18:14 +02:00
merge_request_spec.rb Rename ci_commit -> pipeline 2016-06-10 14:41:38 +02:00
milestone_spec.rb Return a relation with Postgres 2016-05-16 10:25:24 +01:00
namespace_spec.rb Improve test coverage 2016-05-16 18:03:55 -05:00
note_spec.rb Project members with guest role can't access confidential issues 2016-06-13 19:32:00 -03:00
notification_setting_spec.rb Remove notification level from user model 2016-06-10 10:58:13 -03:00
project_group_link_spec.rb
project_security_spec.rb
project_snippet_spec.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
project_spec.rb Merge branch 'environments-and-deployments' into 'master' 2016-06-15 13:48:09 +00:00
project_team_spec.rb UI and copywriting improvements 2016-06-14 13:18:14 +02:00
project_wiki_spec.rb Fix hook data for Wiki Page event 2016-05-31 11:24:58 -03:00
protected_branch_spec.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
release_spec.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
repository_spec.rb Remove main_language and tests 2016-05-25 17:16:42 -04:00
service_spec.rb Cache the presence of an issue_tracker at project level 2016-06-10 15:41:56 +02:00
snippet_spec.rb Refactor Participable 2016-06-01 16:22:35 +02:00
spam_log_spec.rb
todo_spec.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
tree_spec.rb
user_spec.rb Add a blank line between before and it: 2016-06-07 22:34:09 +08:00
wiki_page_spec.rb