Commit Graph
683 Commits
Author SHA1 Message Date
Kamil TrzcinskiandRémy Coutable 858bf727bc Test dependencies defined as symbols 2016-03-23 12:55:23 +01:00
Kamil TrzcinskiandRémy Coutable 8fac12c590 Fix build dependencies, when the dependency is a string 2016-03-23 12:55:23 +01:00
Kamil Trzciński fc6ee35928 Merge branch 'feature-ci-only-except-trigger' into 'master'
CI: Add 'triggers' keyword to 'only' and 'except' lists to allow control over when triggers cause builds to run

Currently, the `only` and `except` keywords in `.gitlab-ci.yml` only accept ref names or the special `branches` and `tags` keywords. However, these are primarily useful when controlling how repository activity affects the creation of builds. In my case, instead of building on every commit, I'd like to use the following logic:

- If the repository is tagged, do a build.
- Any other normal commits should not cause a build.
- If a build is triggered via the API, always create one for the specified ref.

From what I can tell, this isn't possible via the existing YAML syntax. In this MR, I introduce a new keyword `triggers` that goes along with `branches` and `tags`. I can implement the logic above using the following job configuration:

```yaml
only:
  - tags
  - triggers
```

I updated the tests and documentation to reflect this and everything seems to pass.

See merge request !3230
2016-03-22 09:42:40 +00:00
Douwe Maan ae7b2ef62c Merge branch 'master' into issue_12658
# Conflicts:
#	app/models/issue.rb
#	app/views/projects/_home_panel.html.haml
#	app/views/shared/projects/_project.html.haml
#	db/schema.rb
#	spec/models/project_spec.rb
2016-03-21 23:22:21 +01:00
Jacob Schatz 0305dd98b3 Merge branch 'change_css_class_has_tooltip_to_has-tooltip' into 'master'
change the css class has_tooltip to has-tooltip universally

closes #14432 

See merge request !3321
2016-03-21 20:40:14 +00:00
Douwe Maan 7c51d5efec Fix some specs 2016-03-20 22:55:08 +01:00
Arinde Eniola 367818d293 change the css class has_tooltip to has-tooltip universally 2016-03-20 21:37:22 +01:00
Grzegorz Bizon 797af06491 Merge branch 'master' into feature/issue-move
* master:
  Fix bug where wrong commit ID was being used in a merge request diff to show old image
  Remove CHANGELOG item that was added during merge resolution
  Improve the "easy WIP & un-WIP from link" feature
  Fix specs
  \#to_branch_name now uses the iid as postfix
  Add label description in tooltip to labels in issue index and sidebar
  Easily (un)mark merge request as WIP using link
  Use specialized system notes when MR is (un)marked as WIP
  another attempt to fix oauth issue
  attempting to fix omniauth problem

Conflicts:
	app/assets/javascripts/issuable_form.js.coffee
2016-03-20 11:01:08 +01:00
Grzegorz Bizon 6eb3105634 Find referable for each ref found in references rewriter 2016-03-20 10:52:01 +01:00
Grzegorz Bizon 323d328c86 Rename reference unfolder to rewriter, minor refactorings 2016-03-20 10:14:25 +01:00
Douwe Maan 0ce7c1e494 Merge branch 'label-tooltip' into 'master'
Add label description in tooltip to labels in issue index and sidebar

The tooltip can get quite big, but it’s so useful to inform people about what these labels mean
new

![Screen_Shot_2016-03-08_at_11.48.28](/uploads/894baaaa1f789c3a2069a924d541e64b/Screen_Shot_2016-03-08_at_11.48.28.png)

![Screen_Shot_2016-03-08_at_11.48.20](/uploads/efe4fa0960054c4071b8f6bf83024403/Screen_Shot_2016-03-08_at_11.48.20.png)

@JobV writes on Slack:
> yeah I think it’s better than not, but I’d have to try it 😃 
> 
> cautious yes, revert if it’s annoying 😉

See merge request !3124
2016-03-19 18:55:12 +00:00
Grzegorz Bizon 18f25bc942 Update reference unfolder according to recent ability changes
Commit 43d8bdb4f0 introduced additional
checks for permissions to read issue in references extractor.
2016-03-19 18:58:52 +01:00
Grzegorz Bizon 0115ad66d2 Merge branch 'master' into feature/issue-move
* master: (121 commits)
  Dedupe labels in labels selector in Dashboard pages
  Refactor colors and lists
  Add a safeguard in MergeRequest#compute_diverged_commits_count
  Fix an issue when the target branch of a MR had been deleted
  Add avatar to issue and MR pages header
  Cleanup somce css colors
  Re-group scss variables
  Refactor `Todo#target`
  Fixes issue with filter label missing on labels & milestones
  Rename `Todo#to_reference` to `Todo#target_reference`
  Fixed failing tests
  Updated controller with before_action Fixed other issues based on feedback
  Fixes issue on dashboard issues
  Full labels data in JSON
  Fixed issue with labels dropdown getting wrong labels
  Update CHANGELOG
  Use `Note#for_project_snippet?` to skip notes on project snippet
  Use `Commit#short_id` instead of `Commit.truncate_sha`
  Reuse `for_commit?` on conditional validations
  Update schema info comment on todo related files
  ...

Conflicts:
	app/models/issue.rb
	db/schema.rb
	spec/models/issue_spec.rb
2016-03-19 18:50:15 +01:00
Grzegorz Bizon 9b13ce0b7a Improvements in issue move feaure (refactoring)
According to endbosses' suggestions.
2016-03-19 18:46:01 +01:00
Rémy Coutable 9d15814eb0 Fix specs 2016-03-18 20:26:30 +01:00
Douwe Maan 9813eac56b Merge branch 'confidential-issues' into 'master'
Add confidential issues

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/3678

More information: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/227

See merge request !3282
2016-03-18 12:04:56 +00:00
Yorick Peterse 3f0d780c19 Show a notice for diffs that are too large
This builds on the changes introduced in
https://gitlab.com/gitlab-org/gitlab_git/merge_requests/72 and results
in merge requests with large diffs (e.g. due to them containing minified
CSS) loading much faster.
2016-03-18 12:30:46 +01:00
Douglas Barbosa Alexandre f2ba4e3d36 Restrict access to confidential issues on search results 2016-03-17 20:55:59 -03:00
Douglas Barbosa Alexandre 43d8bdb4f0 Restrict access to references for confidential issues 2016-03-17 20:55:59 -03:00
Geoffrey Lalonde 4117c815df adjusted behavior so canceled builds tagged as allowed to fail do not fail build 2016-03-17 07:55:10 -07:00
Grzegorz Bizon 4354bfaba5 Add implementation of reference unfolder using banzai 2016-03-17 07:39:16 +01:00
Grzegorz Bizon fd8394faae Move reference unfolder for GFM to separate class 2016-03-17 07:39:15 +01:00
Grzegorz Bizon 9124ebce98 Use internal reference extractor in banzai unfold pipeline 2016-03-17 07:39:15 +01:00
Grzegorz Bizon 3c493c24c7 Add reference unfold pipeline used when moving issue 2016-03-17 07:39:15 +01:00
Rubén Dávila 7e03b40221 Return an empty Array when there aren't lines to parse. 2016-03-15 19:51:27 -05:00
Jason Roehm 6c1badbd10 add tests for only/except 'triggers' keyword 2016-03-15 09:35:38 -04:00
Douwe Maan a60e09d313 Merge branch 'rs-issue-14220' into 'master'
Be more intelligent about sanitizing links with unsafe protocols

This prevents false matches on relative links like
`[database](database.md)`.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/14220

See merge request !3210
2016-03-15 08:29:04 +00:00
Robert Speicher 41de7b345b Be more intelligent about sanitizing links with unsafe protocols
This prevents false matches on relative links like
`[database](database.md)`.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/14220
2016-03-14 18:05:01 -04:00
Douwe Maan ca3fc2296f Merge branch 'gitlab-ci-yaml-updates' into 'master'
New CI YAML features

This introduces a couple of small `.gitlab-ci.yml` features:

1. Documentation for: Allow to use YAML anchors when parsing the `.gitlab-ci.yml`: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/2958
2. Ignore jobs that start with `.`
3. Allow to pass name of created artifacts archive in `.gitlab-ci.yml`
4. Allow to define on which builds the current one depends on

These are really small changes so it makes not sense to create a separate merge requests for them.

@axil Could you review the documentation part?

The implementation on GitLab Runner side: https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/merge_requests/113.

Fixes: https://gitlab.com/gitlab-org/gitlab-ce/issues/13755 https://gitlab.com/gitlab-org/gitlab-ce/issues/14211 https://gitlab.com/gitlab-org/gitlab-ce/issues/3423

cc @grzesiek @axil @DouweM 


See merge request !3182
2016-03-14 20:06:50 +00:00
Stan Hu 74d7de8196 Revert "Revert "Merge branch 'support-go-subpackages' into 'master' ""
This reverts commit 5a586f364c
2016-03-12 21:05:23 +00:00
Douwe Maan 5a586f364c Revert "Merge branch 'support-go-subpackages' into 'master' "
This reverts merge request !3191
2016-03-12 17:42:51 +00:00
Douwe Maan 826bc72c12 Merge branch 'support-go-subpackages' into 'master'
Support Golang subpackage fetching

Closes #13805

See merge request !3191
2016-03-12 17:38:08 +00:00
Achilleas Pipinellis 8c543e6010 Merge branch 'master' into gitlab-ci-yaml-updates 2016-03-12 19:27:28 +02:00
Stan Hu b23a05d09b Add spec for go-import middleware 2016-03-12 08:10:38 -08:00
Douwe Maan ff62e20607 Merge branch 'fix-gh-pr-import' into 'master'
Fix importing PR's from GitHub when the source repo was removed

Closes #13847 
Closes gitlab-com/support-forum#584

See merge request !3172
2016-03-12 14:07:45 +00:00
Yorick PeterseandRobert Speicher 300332bbf6 Fixed ProjectSearchResults spec to use a Project
This spec was still passing an ID to the #initialize method instead of
a Project instance.
2016-03-11 15:25:23 -05:00
Yorick PeterseandRobert Speicher 42fde69d39 Refactor Gitlab::SnippetSearchResults
This removes the need for plucking snippet IDs into memory.
2016-03-11 15:25:22 -05:00
Yorick PeterseandRobert Speicher 013542965c Refactor Gitlab::SearchResults
Instead of plucking IDs this class now uses ActiveRecord::Relation
objects. Plucking IDs is problematic as searching for projects can lead
to a huge amount of IDs being loaded into memory only to be used as an
argument for another query (instead of just using a sub-query).
2016-03-11 15:25:22 -05:00
Kamil Trzcinski 388f69b0de Merge remote-tracking branch 'origin/master' into gitlab-ci-yaml-updates
# Conflicts:
#	spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
2016-03-11 14:22:49 +01:00
Kamil Trzcinski 9a271d8012 Allow to define on which builds the current one depends on 2016-03-11 14:15:13 +01:00
Kamil Trzcinski d300ecf8d9 Allow to pass name of created artifacts archive in .gitlab-ci.yml 2016-03-11 13:43:57 +01:00
Kamil Trzcinski ad4d3a075f Describe special YAML features: the use of anchors and hidden jobs 2016-03-11 13:41:05 +01:00
Kamil Trzciński 1cdc355a0f Merge branch 'gitlab-ci-yaml-alias' into 'master'
Support YAML alias/anchor usage in .gitlab-ci.yml

This allows to reuse one job as a template for another one:

```
job1: &JOBTMPL
  script: execute-script-for-job

job2: *JOBTMPL

```

This also helps to solve some of the issues in gitlab-org/gitlab-ci#342

See merge request !2958
2016-03-11 12:04:32 +00:00
Douglas Barbosa Alexandre 37b00b16a5 Fix importing PR's from GitHub when the source repo was removed 2016-03-10 19:29:54 -03:00
Jacob Vosmaer a28c84b4ca Improve test descriptions 2016-03-10 12:55:06 +01:00
Jacob Vosmaer 662c4df748 Add tests for ExclusiveLease 2016-03-10 12:52:19 +01:00
Pascal Bach 344d6e6f89 Support YAML alias/anchor usage in .gitlab-ci.yml
This allows to reuse one job as a template for another one:

```
job1: &JOBTMPL
  script: execute-script-for-job

job2: *JOBTMPL

```

This also helps to solve some of the issues in #342

Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
Signed-off-by: Fabio Huser <fabio.huser@siemens.com>
2016-03-08 08:49:32 +01:00
Iuri de SilvioandRémy Coutable 591bf92ce7 Fix bug where Bitbucket closed issues were imported as opened 2016-03-07 19:23:47 +01:00
Douwe Maan 99f08b3f72 Merge branch 'feature/cross-project-labels' into 'master'
Add support for cross project references for labels

## Summary

Support for cross project references for labels.

## Rationale

1.   Cross project label references are currently not supported in GitLab
1.   `to_reference` method signature in `Label` model breaks the abstraction introduced in `Referable`.

      `concerns/referable.rb:  def to_reference(_from_project = nil)`

      Signatures:

      ```
      label.rb:           def to_reference(format = :id)

      commit_range.rb:    def to_reference(from_project = nil)
      commit.rb:          def to_reference(from_project = nil)
      external_issue.rb:  def to_reference(_from_project = nil)
      group.rb:           def to_reference(_from_project = nil)
      issue.rb:           def to_reference(from_project = nil)
      merge_request.rb:   def to_reference(from_project = nil)
      milestone.rb:       def to_reference(from_project = nil)
      project.rb:         def to_reference(_from_project = nil)
      snippet.rb:         def to_reference(from_project = nil)
      user.rb:            def to_reference(_from_project = nil)
      ```

     This MR suggests using `def to_reference(from_project = nil, format: :id)` which makes use of keyword arguments and preserves abstract interface.

1.   We need support for cross project label references when we want to move issue to another project

     It may happen that issue description, system notes or comments contain reference to label and this reference will be invalid after moving issue to another project and will not be displayed correctly unless we have support for cross project references.

     Merge request that needs this feature: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/2831


I think that cross project label references may be useful, (example: `Hey, see our issues for CI in GitLab CE! - gitab-org/gitlab-ce~"CI"`).

cc @JobV @DouweM @rspeicher 

See merge request !2966
2016-03-07 09:16:22 +00:00
Robert Speicher 0c7626f3a5 Merge branch 'rs-frontmatter-pre' into 'master'
Properly display YAML front matter in Markdown

See merge request !3072
2016-03-05 00:17:58 +00:00