Commit d611074e authored by Lin Jen-Shin's avatar Lin Jen-Shin

Merge remote-tracking branch 'upstream/master' into feature/runner-lock-on-project

* upstream/master:
  Add notification_settings:events to schema
  Fixed mobile styling
  Set path for pinned nav cookie
  Fixed placement of close button on merge requests
  using request dot path instead
  Turn note into normal text
  Document environments and deployments
  Tweak grammar
  fix double query string in url
  Broken instructions. git fetch --all --tags doesn't refresh tags
parents aeb24ee8 032e3983
...@@ -257,7 +257,7 @@ $ -> ...@@ -257,7 +257,7 @@ $ ->
# Sidenav pinning # Sidenav pinning
if $(window).width() < 1440 and $.cookie('pin_nav') is 'true' if $(window).width() < 1440 and $.cookie('pin_nav') is 'true'
$.cookie('pin_nav', 'false') $.cookie('pin_nav', 'false', { path: '/' })
$('.page-with-sidebar') $('.page-with-sidebar')
.toggleClass('page-sidebar-collapsed page-sidebar-expanded') .toggleClass('page-sidebar-collapsed page-sidebar-expanded')
.removeClass('page-sidebar-pinned') .removeClass('page-sidebar-pinned')
...@@ -271,7 +271,7 @@ $ -> ...@@ -271,7 +271,7 @@ $ ->
$(this).toggleClass 'is-active' $(this).toggleClass 'is-active'
if $.cookie('pin_nav') is 'true' if $.cookie('pin_nav') is 'true'
$.cookie 'pin_nav', 'false' $.cookie 'pin_nav', 'false', { path: '/' }
$('.page-with-sidebar') $('.page-with-sidebar')
.removeClass('page-sidebar-pinned') .removeClass('page-sidebar-pinned')
.toggleClass('page-sidebar-collapsed page-sidebar-expanded') .toggleClass('page-sidebar-collapsed page-sidebar-expanded')
...@@ -279,6 +279,6 @@ $ -> ...@@ -279,6 +279,6 @@ $ ->
.removeClass('header-pinned-nav') .removeClass('header-pinned-nav')
.toggleClass('header-collapsed header-expanded') .toggleClass('header-collapsed header-expanded')
else else
$.cookie 'pin_nav', 'true' $.cookie 'pin_nav', 'true', { path: '/' }
$('.page-with-sidebar').addClass('page-sidebar-pinned') $('.page-with-sidebar').addClass('page-sidebar-pinned')
$('.navbar-fixed-top').addClass('header-pinned-nav') $('.navbar-fixed-top').addClass('header-pinned-nav')
...@@ -219,3 +219,16 @@ ...@@ -219,3 +219,16 @@
float: left; float: left;
} }
} }
.note-form-actions {
@media (max-width: $screen-xs-max) {
.btn {
float: none;
width: 100%;
&:not(:last-child) {
margin-bottom: 10px;
}
}
}
}
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
Explore Projects Explore Projects
.nav-controls .nav-controls
= form_tag request.original_url, method: :get, class: 'project-filter-form', id: 'project-filter-form' do |f| = form_tag request.path, method: :get, class: 'project-filter-form', id: 'project-filter-form' do |f|
= search_field_tag :filter_projects, params[:filter_projects], placeholder: 'Filter by name...', class: 'project-filter-form-field form-control input-short projects-list-filter', spellcheck: false, id: 'project-filter-form-field', tabindex: "2" = search_field_tag :filter_projects, params[:filter_projects], placeholder: 'Filter by name...', class: 'project-filter-form-field form-control input-short projects-list-filter', spellcheck: false, id: 'project-filter-form-field', tabindex: "2"
= render 'shared/projects/dropdown' = render 'shared/projects/dropdown'
- if current_user.can_create_project? - if current_user.can_create_project?
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
= link_to "#shared", 'data-toggle' => 'tab' do = link_to "#shared", 'data-toggle' => 'tab' do
Shared Projects Shared Projects
.nav-controls .nav-controls
= form_tag request.original_url, method: :get, class: 'project-filter-form', id: 'project-filter-form' do |f| = form_tag request.path, method: :get, class: 'project-filter-form', id: 'project-filter-form' do |f|
= search_field_tag :filter_projects, nil, placeholder: 'Filter by name', class: 'projects-list-filter form-control', spellcheck: false = search_field_tag :filter_projects, nil, placeholder: 'Filter by name', class: 'projects-list-filter form-control', spellcheck: false
= render 'shared/projects/dropdown' = render 'shared/projects/dropdown'
- if can? current_user, :create_projects, @group - if can? current_user, :create_projects, @group
......
- content_for :note_actions do - content_for :note_actions do
- if can?(current_user, :update_merge_request, @merge_request) - if can?(current_user, :update_merge_request, @merge_request)
- if @merge_request.open? - if @merge_request.open?
= link_to 'Close merge request', merge_request_path(@merge_request, merge_request: {state_event: :close }), method: :put, class: "btn btn-nr btn-comment btn-grouped btn-close close-mr-link js-note-target-close", title: "Close merge request", data: {original_text: "Close merge request", alternative_text: "Comment & close merge request"} = link_to 'Close merge request', merge_request_path(@merge_request, merge_request: {state_event: :close }), method: :put, class: "btn btn-nr btn-comment btn-close close-mr-link js-note-target-close", title: "Close merge request", data: {original_text: "Close merge request", alternative_text: "Comment & close merge request"}
- if @merge_request.closed? - if @merge_request.closed?
= link_to 'Reopen merge request', merge_request_path(@merge_request, merge_request: {state_event: :reopen }), method: :put, class: "btn btn-nr btn-comment btn-grouped btn-reopen reopen-mr-link js-note-target-reopen", title: "Reopen merge request", data: {original_text: "Reopen merge request", alternative_text: "Comment & reopen merge request"} = link_to 'Reopen merge request', merge_request_path(@merge_request, merge_request: {state_event: :reopen }), method: :put, class: "btn btn-nr btn-comment btn-reopen reopen-mr-link js-note-target-reopen", title: "Reopen merge request", data: {original_text: "Reopen merge request", alternative_text: "Comment & reopen merge request"}
#notes= render "projects/notes/notes_with_form" #notes= render "projects/notes/notes_with_form"
...@@ -710,6 +710,7 @@ ActiveRecord::Schema.define(version: 20160620115026) do ...@@ -710,6 +710,7 @@ ActiveRecord::Schema.define(version: 20160620115026) do
t.integer "level", default: 0, null: false t.integer "level", default: 0, null: false
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.text "events"
end end
add_index "notification_settings", ["source_id", "source_type"], name: "index_notification_settings_on_source_id_and_source_type", using: :btree add_index "notification_settings", ["source_id", "source_type"], name: "index_notification_settings_on_source_id_and_source_type", using: :btree
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
- [Get started with GitLab CI](quick_start/README.md) - [Get started with GitLab CI](quick_start/README.md)
- [CI examples for various languages](examples/README.md) - [CI examples for various languages](examples/README.md)
- [Learn how to enable or disable GitLab CI](enable_or_disable_ci.md) - [Learn how to enable or disable GitLab CI](enable_or_disable_ci.md)
- [Environments and deployments](environments.md)
- [Learn how `.gitlab-ci.yml` works](yaml/README.md) - [Learn how `.gitlab-ci.yml` works](yaml/README.md)
- [Configure a Runner, the application that runs your builds](runners/README.md) - [Configure a Runner, the application that runs your builds](runners/README.md)
- [Use Docker images with GitLab Runner](docker/using_docker_images.md) - [Use Docker images with GitLab Runner](docker/using_docker_images.md)
......
# Introduction to environments and deployments
>**Note:**
Introduced in GitLab 8.9.
## Environments
Environments are places where code gets deployed, such as staging or production.
CI/CD [Pipelines] usually have one or more [jobs] that deploy to an environment.
Defining environments in a project's `.gitlab-ci.yml` lets developers track
[deployments] to these environments.
## Deployments
Deployments are created when [jobs] deploy versions of code to [environments].
## Defining environments
You can create and delete environments manually in the web interface, but we
recommend that you define your environments in `.gitlab-ci.yml` first, which
will automatically create environments for you after the first deploy.
The `environment` is just a hint for GitLab that this job actually deploys to
this environment. Each time the job succeeds, a deployment is recorded,
remembering the git SHA and environment.
Add something like this to your `.gitlab-ci.yml`:
```
production:
stage: deploy
script: dpl...
environment: production
```
See full [documentation](yaml/README.md#environment).
## Seeing environment status
You can find the environment list under **Pipelines > Environments** for your
project. You'll see the git SHA and date of the last deployment to each
environment defined.
>**Note:**
Only deploys that happen after your `.gitlab-ci.yml` is properly configured will
show up in the environments and deployments lists.
## Seeing deployment history
Clicking on an environment will show the history of deployments.
>**Note:**
Only deploys that happen after your `.gitlab-ci.yml` is properly configured will
show up in the environments and deployments lists.
[Pipelines]: quick_start/README.md
[jobs]: yaml/README.md#jobs
[environments]: #environments
[deployments]: #deployments
...@@ -530,14 +530,18 @@ The above script will: ...@@ -530,14 +530,18 @@ The above script will:
### environment ### environment
>**Note:** >**Note:**
Introduced in GitLab v8.9.0. Introduced in GitLab 8.9.
`environment` is used to define that job does deployment to specific environment. `environment` is used to define that a job deploys to a specific environment.
This allows to easily track all deployments to your environments straight from GitLab. This allows easy tracking of all deployments to your environments straight from
GitLab.
If `environment` is specified and no environment under that name does exist a new one will be created automatically. If `environment` is specified and no environment under that name exists, a new
one will be created automatically.
The `environment` name must contain only letters, digits, '-' and '_'. The `environment` name must contain only letters, digits, '-' and '_'. Common
names are `qa`, `staging`, and `production`, but you can use whatever name works
with your workflow.
--- ---
...@@ -550,7 +554,8 @@ deploy to production: ...@@ -550,7 +554,8 @@ deploy to production:
environment: production environment: production
``` ```
The `deploy to production` job will be marked as doing deployment to `production` environment. The `deploy to production` job will be marked as doing deployment to
`production` environment.
### artifacts ### artifacts
......
...@@ -45,7 +45,7 @@ sudo -u git -H git checkout 8-7-stable-ee ...@@ -45,7 +45,7 @@ sudo -u git -H git checkout 8-7-stable-ee
```bash ```bash
cd /home/git/gitlab-shell cd /home/git/gitlab-shell
sudo -u git -H git fetch --all --tags sudo -u git -H git fetch --tags
sudo -u git -H git checkout v2.7.2 sudo -u git -H git checkout v2.7.2
``` ```
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment