Commit a3fdd76d authored by Olaf Tomalka's avatar Olaf Tomalka

Merge branch 'master' into feature/fork-to-group-api

parents 636db151 1e042ac2
...@@ -248,6 +248,21 @@ bundler:audit: ...@@ -248,6 +248,21 @@ bundler:audit:
script: script:
- "bundle exec bundle-audit check --update --ignore OSVDB-115941" - "bundle exec bundle-audit check --update --ignore OSVDB-115941"
migration paths:
stage: test
<<: *use-db
only:
- master@gitlab-org/gitlab-ce
script:
- git checkout HEAD .
- git fetch --tags
- git checkout v8.5.9
- 'echo test: unix:/var/opt/gitlab/redis/redis.socket > config/resque.yml'
- bundle install --without postgres production --jobs $(nproc) "${FLAGS[@]}" --retry=3
- rake db:drop db:create db:schema:load db:seed_fu
- git checkout $CI_BUILD_REF
- rake db:migrate
coverage: coverage:
stage: post-test stage: post-test
services: [] services: []
...@@ -263,7 +278,6 @@ coverage: ...@@ -263,7 +278,6 @@ coverage:
- coverage/index.html - coverage/index.html
- coverage/assets/ - coverage/assets/
# Notify slack in the end # Notify slack in the end
notify:slack: notify:slack:
......
...@@ -2,6 +2,7 @@ Please view this file on the master branch, on stable branches it's out of date. ...@@ -2,6 +2,7 @@ Please view this file on the master branch, on stable branches it's out of date.
v 8.12.0 (unreleased) v 8.12.0 (unreleased)
- Add ability to fork to a specific namespace using API. (ritave) - Add ability to fork to a specific namespace using API. (ritave)
- Cleanup misalignments in Issue list view !6206
- Prepend blank line to `Closes` message on merge request linked to issue (lukehowell) - Prepend blank line to `Closes` message on merge request linked to issue (lukehowell)
- Filter tags by name !6121 - Filter tags by name !6121
- Make push events have equal vertical spacing. - Make push events have equal vertical spacing.
...@@ -10,6 +11,7 @@ v 8.12.0 (unreleased) ...@@ -10,6 +11,7 @@ v 8.12.0 (unreleased)
- Add font color contrast to external label in admin area (ClemMakesApps) - Add font color contrast to external label in admin area (ClemMakesApps)
- Change logo animation to CSS (ClemMakesApps) - Change logo animation to CSS (ClemMakesApps)
- Instructions for enabling Git packfile bitmaps !6104 - Instructions for enabling Git packfile bitmaps !6104
- Fix pagination on user snippets page
- Change merge_error column from string to text type - Change merge_error column from string to text type
- Reduce contributions calendar data payload (ClemMakesApps) - Reduce contributions calendar data payload (ClemMakesApps)
- Add `web_url` field to issue, merge request, and snippet API objects (Ben Boeckel) - Add `web_url` field to issue, merge request, and snippet API objects (Ben Boeckel)
...@@ -25,6 +27,7 @@ v 8.12.0 (unreleased) ...@@ -25,6 +27,7 @@ v 8.12.0 (unreleased)
- Add white background for no readme container (ClemMakesApps) - Add white background for no readme container (ClemMakesApps)
- API: Expose issue confidentiality flag. (Robert Schilling) - API: Expose issue confidentiality flag. (Robert Schilling)
- Fix markdown anchor icon interaction (ClemMakesApps) - Fix markdown anchor icon interaction (ClemMakesApps)
- Test migration paths from 8.5 until current release !4874
- Optimistic locking for Issues and Merge Requests (title and description overriding prevention) - Optimistic locking for Issues and Merge Requests (title and description overriding prevention)
- Add `wiki_page_events` to project hook APIs (Ben Boeckel) - Add `wiki_page_events` to project hook APIs (Ben Boeckel)
- Remove Gitorious import - Remove Gitorious import
...@@ -83,14 +86,19 @@ v 8.12.0 (unreleased) ...@@ -83,14 +86,19 @@ v 8.12.0 (unreleased)
- Adds response mime type to transaction metric action when it's not HTML - Adds response mime type to transaction metric action when it's not HTML
- Fix hover leading space bug in pipeline graph !5980 - Fix hover leading space bug in pipeline graph !5980
- User can edit closed MR with deleted fork (Katarzyna Kobierska Ula Budziszewska) !5496 - User can edit closed MR with deleted fork (Katarzyna Kobierska Ula Budziszewska) !5496
- Fix repository page ui issues
- Fixed invisible scroll controls on build page on iPhone - Fixed invisible scroll controls on build page on iPhone
- Fix error on raw build trace download for old builds stored in database !4822 - Fix error on raw build trace download for old builds stored in database !4822
- Refactor the triggers page and documentation !6217
- Show values of CI trigger variables only when clicked (Katarzyna Kobierska Ula Budziszewska)
- Use default clone protocol on "check out, review, and merge locally" help page URL
v 8.11.5 (unreleased) v 8.11.5 (unreleased)
- Optimize branch lookups and force a repository reload for Repository#find_branch - Optimize branch lookups and force a repository reload for Repository#find_branch
- Fix member expiration date picker after update - Fix member expiration date picker after update
- Fix suggested colors options for new labels in the admin area. !6138 - Fix suggested colors options for new labels in the admin area. !6138
- Fix GitLab import button - Fix GitLab import button
- Remove gitorious from import_sources
v 8.11.4 v 8.11.4
- Fix resolving conflicts on forks. !6082 - Fix resolving conflicts on forks. !6082
......
...@@ -53,7 +53,7 @@ gem 'browser', '~> 2.2' ...@@ -53,7 +53,7 @@ gem 'browser', '~> 2.2'
# Extracting information from a git repository # Extracting information from a git repository
# Provide access to Gitlab::Git library # Provide access to Gitlab::Git library
gem 'gitlab_git', '~> 10.5' gem 'gitlab_git', '~> 10.6.3'
# LDAP Auth # LDAP Auth
# GitLab fork with several improvements to original library. For full list of changes # GitLab fork with several improvements to original library. For full list of changes
......
...@@ -279,7 +279,7 @@ GEM ...@@ -279,7 +279,7 @@ GEM
diff-lcs (~> 1.1) diff-lcs (~> 1.1)
mime-types (>= 1.16, < 3) mime-types (>= 1.16, < 3)
posix-spawn (~> 0.3) posix-spawn (~> 0.3)
gitlab_git (10.5.0) gitlab_git (10.6.3)
activesupport (~> 4.0) activesupport (~> 4.0)
charlock_holmes (~> 0.7.3) charlock_holmes (~> 0.7.3)
github-linguist (~> 4.7.0) github-linguist (~> 4.7.0)
...@@ -858,7 +858,7 @@ DEPENDENCIES ...@@ -858,7 +858,7 @@ DEPENDENCIES
github-linguist (~> 4.7.0) github-linguist (~> 4.7.0)
github-markup (~> 1.4) github-markup (~> 1.4)
gitlab-flowdock-git-hook (~> 1.0.1) gitlab-flowdock-git-hook (~> 1.0.1)
gitlab_git (~> 10.5) gitlab_git (~> 10.6.3)
gitlab_meta (= 7.0) gitlab_meta (= 7.0)
gitlab_omniauth-ldap (~> 1.2.1) gitlab_omniauth-ldap (~> 1.2.1)
gollum-lib (~> 4.2) gollum-lib (~> 4.2)
......
Vue.http.interceptors.push((request, next) => { Vue.http.interceptors.push((request, next) => {
Vue.activeResources = Vue.activeResources ? Vue.activeResources + 1 : 1; Vue.activeResources = Vue.activeResources ? Vue.activeResources + 1 : 1;
Vue.nextTick(() => { next(function (response) {
setTimeout(() => {
Vue.activeResources--; Vue.activeResources--;
}, 500);
}); });
next();
}); });
...@@ -54,12 +54,14 @@ ...@@ -54,12 +54,14 @@
} }
Build.prototype.getInitialBuildTrace = function() { Build.prototype.getInitialBuildTrace = function() {
var removeRefreshStatuses = ['success', 'failed', 'canceled', 'skipped']
return $.ajax({ return $.ajax({
url: this.build_url, url: this.build_url,
dataType: 'json', dataType: 'json',
success: function(build_data) { success: function(build_data) {
$('.js-build-output').html(build_data.trace_html); $('.js-build-output').html(build_data.trace_html);
if (build_data.status === 'success' || build_data.status === 'failed') { if (removeRefreshStatuses.indexOf(build_data.status) >= 0) {
return $('.js-build-refresh').remove(); return $('.js-build-refresh').remove();
} }
} }
......
$(function(){
$('.reveal-variables').off('click').on('click',function(){
$('.js-build').toggle().niceScroll();
$(this).hide();
});
});
(global => {
global.gl = global.gl || {};
gl.SnippetsList = function() {
var $holder = $('.snippets-list-holder');
$holder.find('.pagination').on('ajax:success', (e, data) => {
$holder.replaceWith(data.html);
});
}
})(window);
...@@ -138,7 +138,7 @@ ...@@ -138,7 +138,7 @@
} }
li a { li a {
padding: 16px 10px 11px; padding: 16px 15px 11px;
} }
/* Small devices (phones, tablets, 768px and lower) */ /* Small devices (phones, tablets, 768px and lower) */
......
...@@ -101,6 +101,7 @@ $gl-icon-color: $gl-placeholder-color; ...@@ -101,6 +101,7 @@ $gl-icon-color: $gl-placeholder-color;
$gl-grayish-blue: #7f8fa4; $gl-grayish-blue: #7f8fa4;
$gl-gray: $gl-text-color; $gl-gray: $gl-text-color;
$gl-gray-dark: #313236; $gl-gray-dark: #313236;
$gl-gray-light: $gl-placeholder-color;
$gl-header-color: $gl-title-color; $gl-header-color: $gl-title-color;
/* /*
......
...@@ -115,6 +115,16 @@ ...@@ -115,6 +115,16 @@
width: 100%; width: 100%;
} }
.js-build-variable {
color: $code-color;
}
.js-build-value {
padding: 2px 4px;
color: $black;
background-color: $white-light;
}
.build-sidebar-header { .build-sidebar-header {
padding: 0 $gl-padding $gl-padding; padding: 0 $gl-padding $gl-padding;
......
...@@ -18,8 +18,7 @@ ...@@ -18,8 +18,7 @@
} }
.commit-row-title { .commit-row-title {
line-height: 1; line-height: 1.35;
margin-bottom: 7px;
.notes_count { .notes_count {
float: right; float: right;
...@@ -43,6 +42,7 @@ ...@@ -43,6 +42,7 @@
border: 1px solid $border-gray-dark; border: 1px solid $border-gray-dark;
border-radius: $border-radius-default; border-radius: $border-radius-default;
margin-left: 5px; margin-left: 5px;
line-height: 1;
&:hover { &:hover {
background-color: darken($gray-light, 10%); background-color: darken($gray-light, 10%);
...@@ -136,7 +136,7 @@ ...@@ -136,7 +136,7 @@
.commit-row-info { .commit-row-info {
color: $gl-gray; color: $gl-gray;
line-height: 1; line-height: 1.35;
a { a {
color: $gl-gray; color: $gl-gray;
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
.issue-check { .issue-check {
float: left; float: left;
padding-right: 8px; padding-right: 16px;
margin-bottom: 10px; margin-bottom: 10px;
min-width: 15px; min-width: 15px;
......
...@@ -15,16 +15,6 @@ ...@@ -15,16 +15,6 @@
vertical-align: top; vertical-align: top;
} }
.last-commit {
max-width: 506px;
.last-commit-content {
@include str-truncated;
width: calc(100% - 140px);
margin-left: 3px;
}
}
.tree-table { .tree-table {
margin-bottom: 0; margin-bottom: 0;
...@@ -36,6 +26,15 @@ ...@@ -36,6 +26,15 @@
line-height: 21px; line-height: 21px;
} }
.last-commit {
@include str-truncated(60%);
}
.commit-history-link-spacer {
margin: 0 10px;
color: $table-border-color;
}
&:hover { &:hover {
td { td {
background-color: $row-hover; background-color: $row-hover;
...@@ -91,11 +90,17 @@ ...@@ -91,11 +90,17 @@
} }
} }
.tree_commit { .tree-time-ago {
color: $gl-gray; min-width: 135px;
color: $gl-gray-light;
}
.tree-commit {
max-width: 320px;
color: $gl-gray-light;
.tree-commit-link { .tree-commit-link {
color: $gl-gray; color: $gl-gray-light;
&:hover { &:hover {
text-decoration: underline; text-decoration: underline;
......
...@@ -90,12 +90,13 @@ ...@@ -90,12 +90,13 @@
- if @build.trigger_request.variables - if @build.trigger_request.variables
%p %p
%span.build-light-text Variables: %button.btn.group.btn-group-justified.reveal-variables Reveal Variables
- @build.trigger_request.variables.each do |key, value| - @build.trigger_request.variables.each do |key, value|
%code .hide.js-build
#{key}=#{value} .js-build-variable= key
.js-build-value= value
.block .block
.title .title
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
%pre.dark#merge-info-1 %pre.dark#merge-info-1
- if @merge_request.for_fork? - if @merge_request.for_fork?
:preserve :preserve
git fetch #{h @merge_request.source_project.http_url_to_repo} #{h @merge_request.source_branch} git fetch #{h default_url_to_repo(@merge_request.source_project)} #{h @merge_request.source_branch}
git checkout -b #{h @merge_request.source_project_path}-#{h @merge_request.source_branch} FETCH_HEAD git checkout -b #{h @merge_request.source_project_path}-#{h @merge_request.source_branch} FETCH_HEAD
- else - else
:preserve :preserve
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
:plain :plain
var row = $("table.table_#{@hex_path} tr.file_#{hexdigest(file_name)}"); var row = $("table.table_#{@hex_path} tr.file_#{hexdigest(file_name)}");
row.find("td.tree_time_ago").html('#{escape_javascript time_ago_with_tooltip(commit.committed_date)}'); row.find("td.tree-time-ago").html('#{escape_javascript time_ago_with_tooltip(commit.committed_date)}');
row.find("td.tree_commit").html('#{escape_javascript render("projects/tree/tree_commit_column", commit: commit)}'); row.find("td.tree-commit").html('#{escape_javascript render("projects/tree/tree_commit_column", commit: commit)}');
- if @more_log_url - if @more_log_url
:plain :plain
......
...@@ -4,6 +4,6 @@ ...@@ -4,6 +4,6 @@
- file_name = blob_item.name - file_name = blob_item.name
= link_to namespace_project_blob_path(@project.namespace, @project, tree_join(@id || @commit.id, blob_item.name)), title: file_name do = link_to namespace_project_blob_path(@project.namespace, @project, tree_join(@id || @commit.id, blob_item.name)), title: file_name do
%span.str-truncated= file_name %span.str-truncated= file_name
%td.tree_time_ago.cgray %td.hidden-xs.tree-commit
%td.tree-time-ago.cgray.text-right
= render 'projects/tree/spinner' = render 'projects/tree/spinner'
\ No newline at end of file
%td.hidden-xs.tree_commit
...@@ -4,20 +4,20 @@ ...@@ -4,20 +4,20 @@
%thead %thead
%tr %tr
%th Name %th Name
%th Last Update %th.hidden-xs
%th.hidden-xs.last-commit .pull-left Last Commit
Last Commit .last-commit.hidden-sm.pull-left
.last-commit-content.hidden-sm &nbsp;
%i.fa.fa-angle-right %i.fa.fa-angle-right
&nbsp; &nbsp;
%small.light %small.light
= link_to @commit.short_id, namespace_project_commit_path(@project.namespace, @project, @commit), class: "monospace" = link_to @commit.short_id, namespace_project_commit_path(@project.namespace, @project, @commit), class: "monospace"
&ndash; &ndash;
= time_ago_with_tooltip(@commit.committed_date) = time_ago_with_tooltip(@commit.committed_date)
&ndash;
= @commit.full_title = @commit.full_title
= link_to 'History', namespace_project_commits_path(@project.namespace, @project, @id), class: 'pull-right' %small.commit-history-link-spacer &#124;
= link_to 'History', namespace_project_commits_path(@project.namespace, @project, @id), class: 'commit-history-link'
%th.text-right Last Update
- if @path.present? - if @path.present?
%tr.tree-item %tr.tree-item
%td.tree-item-file-name %td.tree-item-file-name
......
...@@ -4,6 +4,6 @@ ...@@ -4,6 +4,6 @@
- path = flatten_tree(tree_item) - path = flatten_tree(tree_item)
= link_to namespace_project_tree_path(@project.namespace, @project, tree_join(@id || @commit.id, path)), title: path do = link_to namespace_project_tree_path(@project.namespace, @project, tree_join(@id || @commit.id, path)), title: path do
%span.str-truncated= path %span.str-truncated= path
%td.tree_time_ago.cgray %td.hidden-xs.tree-commit
%td.tree-time-ago.text-right
= render 'projects/tree/spinner' = render 'projects/tree/spinner'
\ No newline at end of file
%td.hidden-xs.tree_commit
...@@ -4,17 +4,26 @@ ...@@ -4,17 +4,26 @@
.col-lg-3 .col-lg-3
%h4.prepend-top-0 %h4.prepend-top-0
= page_title = page_title
%p %p.prepend-top-20
Triggers can force a specific branch or tag to rebuild with an API call. Triggers can force a specific branch or tag to get rebuilt with an API call.
%p.append-bottom-0
= succeed '.' do
Learn more in the
= link_to 'triggers documentation', help_page_path('ci/triggers/README'), target: '_blank'
.col-lg-9 .col-lg-9
%h5.prepend-top-0 .panel.panel-default
Your triggers .panel-heading
%h4.panel-title
Manage your project's triggers
.panel-body
- if @triggers.any? - if @triggers.any?
.table-responsive .table-responsive
%table.table %table.table
%thead %thead
%th Token %th
%th Last used %strong Token
%th
%strong Last used
%th %th
= render partial: 'trigger', collection: @triggers, as: :trigger = render partial: 'trigger', collection: @triggers, as: :trigger
- else - else
...@@ -22,13 +31,28 @@ ...@@ -22,13 +31,28 @@
No triggers have been created yet. Add one using the button below. No triggers have been created yet. Add one using the button below.
= form_for @trigger, url: url_for(controller: 'projects/triggers', action: 'create') do |f| = form_for @trigger, url: url_for(controller: 'projects/triggers', action: 'create') do |f|
= f.submit "Add Trigger", class: 'btn btn-success' = f.submit "Add trigger", class: 'btn btn-success'
.panel-footer
%p
In the following examples, you can see the exact API call you need to
make in order to rebuild a specific
%code ref
(branch or tag) with a trigger token.
%p
All you need to do is replace the
%code TOKEN
and
%code REF_NAME
with the trigger token and the branch or tag name respectively.
%h5.prepend-top-default %h5.prepend-top-default
Use CURL Use cURL
%p.light %p.light
Copy the token above, set your branch or tag name, and that reference will be rebuilt. Copy one of the tokens above, set your branch or tag name, and that
reference will be rebuilt.
%pre %pre
:plain :plain
...@@ -42,13 +66,13 @@ ...@@ -42,13 +66,13 @@
%p.light %p.light
In the In the
%code .gitlab-ci.yml %code .gitlab-ci.yml
of the dependent project, include the following snippet. of another project, include the following snippet.
The project will rebuild at the end of the build. The project will be rebuilt at the end of the build.
%pre %pre
:plain :plain
trigger: trigger_build:
type: deploy stage: deploy
script: script:
- "curl -X POST -F token=TOKEN -F ref=REF_NAME #{builds_trigger_url(@project.id)}" - "curl -X POST -F token=TOKEN -F ref=REF_NAME #{builds_trigger_url(@project.id)}"
%h5.prepend-top-default %h5.prepend-top-default
......
%ul.content-list .snippets-list-holder
%ul.content-list
= render partial: 'shared/snippets/snippet', collection: @snippets = render partial: 'shared/snippets/snippet', collection: @snippets
- if @snippets.empty? - if @snippets.empty?
%li %li
.nothing-here-block Nothing here. .nothing-here-block Nothing here.
= paginate @snippets, theme: 'gitlab' = paginate @snippets, theme: 'gitlab', remote: true
:javascript
gl.SnippetsList();
class DropGitoriousFieldFromApplicationSettings < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
# After the deploy the caches will be cold anyway
DOWNTIME = false
def up
require 'yaml'
import_sources = connection.execute('SELECT import_sources FROM application_settings;')
return unless import_sources.first # support empty databases
yaml = if Gitlab::Database.postgresql?
import_sources.values[0][0]
else
import_sources.first[0]
end
yaml = YAML.safe_load(yaml)
yaml.delete 'gitorious'
# No need for a WHERE clause as there is only one
connection.execute("UPDATE application_settings SET import_sources = #{update_yaml(yaml)}")
end
def down
# noop, gitorious still yields a 404 anyway
end
private
def connection
ActiveRecord::Base.connection
end
def update_yaml(yaml)
connection.quote(YAML.dump(yaml))
end
end
doc/ci/triggers/img/builds_page.png

32.5 KB | W: | H:

doc/ci/triggers/img/builds_page.png

74.4 KB | W: | H:

doc/ci/triggers/img/builds_page.png
doc/ci/triggers/img/builds_page.png
doc/ci/triggers/img/builds_page.png
doc/ci/triggers/img/builds_page.png
  • 2-up
  • Swipe
  • Onion skin
doc/ci/triggers/img/triggers_page.png

12.6 KB | W: | H:

doc/ci/triggers/img/triggers_page.png

11.7 KB | W: | H:

doc/ci/triggers/img/triggers_page.png
doc/ci/triggers/img/triggers_page.png
doc/ci/triggers/img/triggers_page.png
doc/ci/triggers/img/triggers_page.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -6,50 +6,6 @@ GitLab Runner to manage your project's builds. ...@@ -6,50 +6,6 @@ GitLab Runner to manage your project's builds.
If you want a quick introduction to GitLab CI, follow our If you want a quick introduction to GitLab CI, follow our
[quick start guide](../quick_start/README.md). [quick start guide](../quick_start/README.md).
---
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*
- [.gitlab-ci.yml](#gitlab-ci-yml)
- [image and services](#image-and-services)
- [before_script](#before_script)
- [after_script](#after_script)
- [stages](#stages)
- [types](#types)
- [variables](#variables)
- [cache](#cache)
- [cache:key](#cache-key)
- [Jobs](#jobs)
- [script](#script)
- [stage](#stage)
- [only and except](#only-and-except)
- [job variables](#job-variables)
- [tags](#tags)
- [allow_failure](#allow_failure)
- [when](#when)
- [Manual actions](#manual-actions)
- [environment](#environment)
- [artifacts](#artifacts)
- [artifacts:name](#artifacts-name)
- [artifacts:when](#artifacts-when)
- [artifacts:expire_in](#artifacts-expire_in)
- [dependencies](#dependencies)
- [before_script and after_script](#before_script-and-after_script)
- [Git Strategy](#git-strategy)
- [Shallow cloning](#shallow-cloning)
- [Hidden keys](#hidden-keys)
- [Special YAML features](#special-yaml-features)
- [Anchors](#anchors)
- [Validate the .gitlab-ci.yml](#validate-the-gitlab-ci-yml)
- [Skipping builds](#skipping-builds)
- [Examples](#examples)
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
---
## .gitlab-ci.yml ## .gitlab-ci.yml
From version 7.12, GitLab CI uses a [YAML](https://en.wikipedia.org/wiki/YAML) From version 7.12, GitLab CI uses a [YAML](https://en.wikipedia.org/wiki/YAML)
...@@ -183,7 +139,7 @@ Alias for [stages](#stages). ...@@ -183,7 +139,7 @@ Alias for [stages](#stages).
Introduced in GitLab Runner v0.5.0. Introduced in GitLab Runner v0.5.0.
GitLab CI allows you to add variables to `.gitlab-ci.yml` that are set in the GitLab CI allows you to add variables to `.gitlab-ci.yml` that are set in the
build environment. The variables are stored in the git repository and are meant build environment. The variables are stored in the Git repository and are meant
to store non-sensitive project configuration, for example: to store non-sensitive project configuration, for example:
```yaml ```yaml
...@@ -198,6 +154,8 @@ thus allowing to fine tune them. ...@@ -198,6 +154,8 @@ thus allowing to fine tune them.
Variables can be also defined on [job level](#job-variables). Variables can be also defined on [job level](#job-variables).
[Learn more about variables.](../variables/README.md)
### cache ### cache
>**Note:** >**Note:**
...@@ -1086,6 +1044,13 @@ test:mysql: ...@@ -1086,6 +1044,13 @@ test:mysql:
You can see that the hidden keys are conveniently used as templates. You can see that the hidden keys are conveniently used as templates.
## Triggers
Triggers can be used to force a rebuild of a specific branch, tag or commit,
with an API call.
[Read more in the triggers documentation.](../triggers/README.md)
## Validate the .gitlab-ci.yml ## Validate the .gitlab-ci.yml
Each instance of GitLab CI has an embedded debug tool called Lint. Each instance of GitLab CI has an embedded debug tool called Lint.
......
...@@ -28,11 +28,6 @@ module Gitlab ...@@ -28,11 +28,6 @@ module Gitlab
end end
end end
def total_count
@total_count ||= issues_count + merge_requests_count + blobs_count +
notes_count + wiki_blobs_count + commits_count
end
def blobs_count def blobs_count
@blobs_count ||= blobs.count @blobs_count ||= blobs.count
end end
......
...@@ -27,11 +27,6 @@ module Gitlab ...@@ -27,11 +27,6 @@ module Gitlab
end end
end end
def total_count
@total_count ||= projects_count + issues_count + merge_requests_count +
milestones_count
end
def projects_count def projects_count
@projects_count ||= projects.count @projects_count ||= projects.count
end end
...@@ -48,10 +43,6 @@ module Gitlab ...@@ -48,10 +43,6 @@ module Gitlab
@milestones_count ||= milestones.count @milestones_count ||= milestones.count
end end
def empty?
total_count.zero?
end
private private
def projects def projects
......
...@@ -20,10 +20,6 @@ module Gitlab ...@@ -20,10 +20,6 @@ module Gitlab
end end
end end
def total_count
@total_count ||= snippet_titles_count + snippet_blobs_count
end
def snippet_titles_count def snippet_titles_count
@snippet_titles_count ||= snippet_titles.count @snippet_titles_count ||= snippet_titles.count
end end
......
...@@ -164,6 +164,26 @@ describe "Builds" do ...@@ -164,6 +164,26 @@ describe "Builds" do
expect(page).to have_link 'Raw' expect(page).to have_link 'Raw'
end end
end end
describe 'Variables' do
before do
@trigger_request = create :ci_trigger_request_with_variables
@build = create :ci_build, pipeline: @commit, trigger_request: @trigger_request
visit namespace_project_build_path(@project.namespace, @project, @build)
end
it 'shows variable key and value after click', js: true do
expect(page).to have_css('.reveal-variables')
expect(page).not_to have_css('.js-build-variable')
expect(page).not_to have_css('.js-build-value')
click_button 'Reveal Variables'
expect(page).not_to have_css('.reveal-variables')
expect(page).to have_selector('.js-build-variable', text: 'TRIGGER_KEY_1')
expect(page).to have_selector('.js-build-value', text: 'TRIGGER_VALUE_1')
end
end
end end
describe "POST /:project/builds/:id/cancel" do describe "POST /:project/builds/:id/cancel" do
......
...@@ -12,7 +12,7 @@ describe 'Triggers' do ...@@ -12,7 +12,7 @@ describe 'Triggers' do
context 'create a trigger' do context 'create a trigger' do
before do before do
click_on 'Add Trigger' click_on 'Add trigger'
expect(@project.triggers.count).to eq(1) expect(@project.triggers.count).to eq(1)
end end
......
require 'spec_helper'
describe 'Snippets tab on a user profile', feature: true, js: true do
include WaitForAjax
let(:user) { create(:user) }
context 'when the user has snippets' do
before do
create_list(:snippet, 25, :public, author: user)
visit user_path(user)
page.within('.user-profile-nav') { click_link 'Snippets' }
wait_for_ajax
end
it 'is limited to 20 items per page' do
expect(page.all('.snippets-list-holder .snippet-row').count).to eq(20)
end
context 'clicking on the link to the second page' do
before { click_link('2') }
it 'shows the remaining snippets' do
expect(page.all('.snippets-list-holder .snippet-row').count).to eq(5)
end
end
end
end
...@@ -12,12 +12,6 @@ describe Gitlab::SearchResults do ...@@ -12,12 +12,6 @@ describe Gitlab::SearchResults do
let!(:milestone) { create(:milestone, project: project, title: 'foo') } let!(:milestone) { create(:milestone, project: project, title: 'foo') }
let(:results) { described_class.new(user, Project.all, 'foo') } let(:results) { described_class.new(user, Project.all, 'foo') }
describe '#total_count' do
it 'returns the total amount of search hits' do
expect(results.total_count).to eq(4)
end
end
describe '#projects_count' do describe '#projects_count' do
it 'returns the total amount of projects' do it 'returns the total amount of projects' do
expect(results.projects_count).to eq(1) expect(results.projects_count).to eq(1)
...@@ -42,18 +36,6 @@ describe Gitlab::SearchResults do ...@@ -42,18 +36,6 @@ describe Gitlab::SearchResults do
end end
end end
describe '#empty?' do
it 'returns true when there are no search results' do
allow(results).to receive(:total_count).and_return(0)
expect(results.empty?).to eq(true)
end
it 'returns false when there are search results' do
expect(results.empty?).to eq(false)
end
end
describe 'confidential issues' do describe 'confidential issues' do
let(:project_1) { create(:empty_project) } let(:project_1) { create(:empty_project) }
let(:project_2) { create(:empty_project) } let(:project_2) { create(:empty_project) }
......
...@@ -5,12 +5,6 @@ describe Gitlab::SnippetSearchResults do ...@@ -5,12 +5,6 @@ describe Gitlab::SnippetSearchResults do
let(:results) { described_class.new(Snippet.all, 'foo') } let(:results) { described_class.new(Snippet.all, 'foo') }
describe '#total_count' do
it 'returns the total amount of search hits' do
expect(results.total_count).to eq(2)
end
end
describe '#snippet_titles_count' do describe '#snippet_titles_count' do
it 'returns the amount of matched snippet titles' do it 'returns the amount of matched snippet titles' do
expect(results.snippet_titles_count).to eq(1) expect(results.snippet_titles_count).to eq(1)
......
...@@ -59,14 +59,10 @@ describe 'projects/builds/show' do ...@@ -59,14 +59,10 @@ describe 'projects/builds/show' do
end end
it 'shows trigger variables in separate lines' do it 'shows trigger variables in separate lines' do
expect(rendered).to have_css('code', text: variable_regexp('TRIGGER_KEY_1', 'TRIGGER_VALUE_1')) expect(rendered).to have_css('.js-build-variable', visible: false, text: 'TRIGGER_KEY_1')
expect(rendered).to have_css('code', text: variable_regexp('TRIGGER_KEY_2', 'TRIGGER_VALUE_2')) expect(rendered).to have_css('.js-build-variable', visible: false, text: 'TRIGGER_KEY_2')
expect(rendered).to have_css('.js-build-value', visible: false, text: 'TRIGGER_VALUE_1')
expect(rendered).to have_css('.js-build-value', visible: false, text: 'TRIGGER_VALUE_2')
end end
end end
private
def variable_regexp(key, value)
/\A#{Regexp.escape("#{key}=#{value}")}\Z/
end
end end
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