gitlab-org--gitlab-foss/config
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
..
environments Customize ActionMailer preview path 2016-05-25 16:56:06 -04:00
initializers Merge branch '18451-track-new-redis-connections' into 'master' 2016-06-15 09:56:42 +00:00
locales Implement new UI for pagination 2016-01-20 21:27:01 -05:00
application.rb Attempt to fix the user page. 2016-06-01 19:42:49 -06:00
aws.yml.example Add a note that changing example configuration files requires changing omnibus-gitlab. 2015-06-11 15:11:37 +02:00
boot.rb Enable the Rubocop DeprecatedClassMethods cop 2016-05-08 15:33:34 -06:00
database.yml.env Improving the "Environment variables" administration doc 2016-02-01 19:10:46 +01:00
database.yml.mysql set the collation to utf8_general_ci 2014-08-13 14:45:23 +01:00
database.yml.postgresql Remove 'socket' example PostgreSQL parameter 2014-07-01 18:27:50 +02:00
dependency_decisions.yml Add LGPLv2 to license whiltelist 2016-06-07 10:14:18 -07:00
environment.rb Rails update to 4.2.4 2015-11-25 18:18:44 +02:00
gitlab.teatro.yml Remove wall_enabled field from Project 2016-05-08 15:47:42 -04:00
gitlab.yml.example Move keep to ArtifactsController 2016-06-13 11:03:30 +01:00
license_finder.yml Resolve feedback. 2016-06-06 13:39:36 -06:00
mail_room.yml Don't require Gitlab::Redis in mail_room.yml if it's already defined 2016-06-10 13:44:45 +02:00
newrelic.yml Revert "Remove newrelic gem. Closes #12860" 2016-02-23 07:25:37 -08:00
resque.yml.example Add a note that changing example configuration files requires changing omnibus-gitlab. 2015-06-11 15:11:37 +02:00
routes.rb Merge branch 'environments-and-deployments' into 'master' 2016-06-15 13:48:09 +00:00
secrets.yml.example Groundwork for merging CI into CE 2015-08-25 18:42:46 -07:00
sidekiq.yml.example bug found by Charles Sibbald at Sky . Calls with patricio and Jacob confirmed this 2016-02-18 18:58:51 +00:00
unicorn.rb.example Fix typos and grammar 2016-02-10 12:43:19 +02:00
unicorn.rb.example.development Increase unicorn timeout to 60 seconds 2014-09-23 17:11:16 +03:00