Commit Graph
11480 Commits
Author SHA1 Message Date
Josh Frye 2d3655cd14 sanitize user supplied input. 2016-01-16 10:49:51 -05:00
Josh Frye c70ed7f2cd Autofill abuse message text with user url. Closes #2838 2016-01-16 10:47:12 -05:00
Robert Speicher 8a028cf3a2 Merge branch 'fix-autocomplete-new-issues' into 'master'
Fix autocomplete for new issues/MRs/snippets

Fixes gitlab-org/gitlab-ce#8067

See merge request !2446
2016-01-15 20:57:56 +00:00
Jacob Schatz d04eadf822 Merge branch 'fix-alignment-issue' into 'master'
Fix alignment issues after a fix on titles weight

Fixes #8102. Fixes #3956. This fixes an alignment regression introduced by !2422. Sorry about that! :/

## Commit title alignment fixed

![Screen_Shot_2016-01-14_at_16.10.01](/uploads/8fdc08dca379bc551f5872de910c7149/Screen_Shot_2016-01-14_at_16.10.01.png)

**The fact that the first row has a smaller height than the other rows was not introduced by !2422 (I've checked by reverting 818607f0 on `master`).**

## Tags name in list

![Screen_Shot_2016-01-14_at_16.10.09](/uploads/fba3978037677bb8855f374b5f38dde0/Screen_Shot_2016-01-14_at_16.10.09.png)

See merge request !2431
2016-01-15 16:34:48 +00:00
Douwe Maan c19795dff5 Merge branch 'ci/build_dependencies' into 'master'
Let the CI runner know about builds that this build depends on

This allows us to implement artifacts passing: runner will download artifacts from all prior builds. It will happen automatically, and always, as long as artifacts are enabled.

## The changes:

This MR exposes list of prior builds in CI::API::Builds.

**The API response when asking for builds**

```json
{
  "id": 48584,
  "ref": "0.1.1",
  "tag": true,
  "sha": "d63117656af6ff57d99e50cc270f854691f335ad",
  "status": "success",
  "name": "pages",
  "token": "9dd60b4f1a439d1765357446c1084c",
  "stage": "test",
  "project_id": 479,
  "project_name": "test",
  "commands": "echo commands",
  "repo_url": "http://gitlab-ci-token:token@gitlab.example/group/test.git",
  "before_sha": "0000000000000000000000000000000000000000",
  "allow_git_fetch": false,
  "options": {
    "image": "docker:image",
    "artifacts": {
      "paths": [
        "public"
      ]
    },
    "cache": {
      "paths": [
        "vendor"
      ]
    }
  },
  "timeout": 3600,
  "variables": [
    {
      "key": "CI_BUILD_TAG",
      "value": "0.1.1",
      "public": true
    }
  ],
  "dependencies": {
    "builds": [
      {
        "id": 48584,
        "ref": "0.1.1",
        "tag": true,
        "sha": "d63117656af6ff57d99e50cc270f854691f335ad",
        "status": "success",
        "name": "build",
        "token": "9dd60b4f1a439d1765357446c1084c",
        "stage": "build",
        "project_id": 479,
        "project_name": "test",
        "artifacts_file": {
          "filename": "artifacts.zip",
          "size": 0
        }
      }
    ]
  }
}
```

## How it will work?

**Example:**
```
build:
  type: build
  script:
  - echo TEST > test_file
  artifacts:
    untracked: true

rspec:
  type: test
  script:
  - test-my-project

staging:
  type: deploy
  script:
  - scp test_file root@server.com:
```

**The flow:**
1. We run `build`. The `build` creates a file `test_file`. This file gets archived and send us build artifacts.
2. We run `rspec`. The `rspec` downloads build artifacts from `build`. Uses the `test_file`.
3. We run `staging`. The `staging` downloads build artifacts from `build` and `rspec`, but since the `rspec` doesn't have build artifacts we skip that build. Deploys the `test_file`.

This partially implements the https://gitlab.com/gitlab-org/gitlab-ce/issues/3423.

In the next release we will introduce option to configure what artifacts are received.

/cc @grzesiek @DouweM @sytse @rspeicher


See merge request !2437
2016-01-15 15:54:35 +00:00
Douwe Maan 57d8faf662 Merge branch 'feature/allow-artifacts-for-reporters' into 'master'
Allow access to artifacts for users with reporter role

This is originally introduced by @ajohnsn in this merge request: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/2259

I've added and refactored specs, original commit by @ajohnsn has been cherry picked here.

See merge request !2448
2016-01-15 15:53:34 +00:00
Rémy Coutable ef3d5a2712 Replace strong by span for .item-title elements 2016-01-15 15:46:01 +01:00
Drew Blessing 4bc7d6e3c1 Merge branch 'issue_7975' into 'master'
Consider that URL can end with '/' before redirecting.

Closes #7975

See merge request !2416
2016-01-15 14:02:55 +00:00
Grzegorz Bizon 6b2f38f39a Fix nonexistent method in artifacts controller 2016-01-15 13:48:29 +01:00
Andrew JohnsonandGrzegorz Bizon f66f9e95bf Give reporters the ability to download artifacts.
Also fix a few places where page_404 should be render_404.
2016-01-15 12:01:19 +01:00
Yorick Peterse f7240e03a6 Fix autocomplete for new issues/MRs/snippets 2016-01-15 11:29:53 +01:00
Rémy Coutable 9e053decfc Remove unnecessary class 2016-01-15 11:14:33 +01:00
Rémy Coutable a69271374d Streamline item titles to use a single class, and add back strong tags 2016-01-15 11:10:55 +01:00
Robert Speicher f093d8ccb4 Merge branch 'deleting-a-note-after-editing-another-results-in-a-javascript-error' into 'master'
Fix javascript error with deleting messages in issue or merge request

Elements searched for by jQuery no longer existed in the DOM.
Javascript was also unnecessarily complex, for using jQuery

Fixes #8109

See merge request !2442
2016-01-15 04:27:24 +00:00
Jacob Schatz daf60957d9 Fix javascript error with deleting messages in issue or merge request
Elements searched for by jQuery no longer existed in the DOM.
Javascript was also unnecessarily complex, for using jQuery
Fixes #8109
2016-01-14 19:09:46 -05:00
Robert Speicher 6fd92ad4a9 Prefer custom WOFF2 fonts if the browser supports them
[ci skip]
2016-01-14 17:33:54 -05:00
Kamil Trzciński 948bb655f3 Merge branch 'ci/api-triggers' into 'master'
Add triggers API

References #4264

See merge request !2286
2016-01-14 21:56:00 +00:00
Dmitriy Zaporozhets 0192903b23 Merge branch 'fixes-new-layout' into 'master'
Fixes new layout

* fix empty project page
* fix commit -> builds page missing margin

See merge request !2440
2016-01-14 21:42:05 +00:00
Tomasz Maczukin 768721dc58 Merge branch 'master' into ci/api-triggers
* master: (150 commits)
  fixes margin and padding
  Update mailroom/postfix documentation [ci skip]
  Fix css mess around git clone panel. Align it properly
  Fix missing padding for user/group pages
  Fix parse_gollum_tags matcher
  Update documentation on Banzai::Filter::GollumTagsFilter
  Add tests for the wiki pipeline
  Refactoring Banzai::Filter::GollumTagsFilter
  Make sure the .git is at the end on Gitlab::GithubImport::WikiFormatter
  Remove GollumTagsPipeline
  Refactoring Gitlab::GithubImport::Importer
  Remove unnecessary brackets on WIKI_SLUG_ID route constraints
  Move js function to removing accents to vendor/assets/javascripts
  Update CHANGELOG
  Use the WikiPipeline when rendering the wiki markdown content
  Add Banzai::Filter::GollumTagsFilter for parsing Gollum's tags in HTML
  Relax constraints for wiki slug
  Import GitHub wiki into GitLab
  Move Ci::Build#available_statuses to AVAILABLE_STATUSES constant in CommitStatus
  Revert changes to how the notes are paginated in the API
  ...

Conflicts:
	doc/api/README.md
	lib/api/entities.rb
2016-01-14 21:58:17 +01:00
Dmitriy Zaporozhets cd2ddaaa45 add missing padding for commit -> builds page
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-01-14 21:47:12 +01:00
Dmitriy Zaporozhets cc52018988 Fix layout for empty project
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-01-14 21:44:20 +01:00
Jacob Schatz 7b18b6ad6e fixes margin and padding 2016-01-14 15:10:33 -05:00
Kamil Trzcinski ac652d82f1 Let the CI runner know about builds that this build depends on
This allows us to implement artifacts passing: runner will download artifacts from all prior builds
2016-01-14 19:45:55 +01:00
Robert Speicher 65eae647a6 Merge branch 'backport-ee' into 'master'
Backport two commits from EE

Backport part of https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/110

See merge request !2424
2016-01-14 18:39:49 +00:00
Robert Speicher 14695798fb Merge branch 'rs-fix-cross-reference' into 'master'
Fix cross-project reference clipboard text

See https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/2339

See merge request !2420
2016-01-14 18:07:57 +00:00
Dmitriy Zaporozhets 62b2fcc0f3 Merge branch 'ui-fixes' into 'master'
Various UI fixes

* Fix missing padding for user/group pages
* Fix align of clone panel

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>

See merge request !2433
2016-01-14 17:09:33 +00:00
Dmitriy Zaporozhets f8707e26ad Fix css mess around git clone panel. Align it properly
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-01-14 17:42:15 +01:00
Douwe Maan ba42b03348 Merge branch 'ci/api-builds' into 'master'
Add builds API

References #4264

See merge request !2207
2016-01-14 16:29:15 +00:00
Dmitriy Zaporozhets 49c310e45c Fix missing padding for user/group pages
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-01-14 16:42:25 +01:00
Dmitriy Zaporozhets 0430c00cf0 Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce 2016-01-14 16:19:38 +01:00
Dmitriy Zaporozhets fc9a2a3e70 Merge remote-tracking branch 'origin/rs-autosize' 2016-01-14 16:19:16 +01:00
Douwe Maan b6454fef56 Merge branch 'import-gh-wiki' into 'master'
Import GitHub wiki into GitLab

Closes #2834 

GitHub doesn’t apply any constraints to theirs wiki slug allowing chars like ,, :, *, etc, we need to remove our constraints or some wiki pages will not be available after they are imported.

Some wikis use the Gollum's tags to link its internal/external resources like: images, urls, wiki pages, etc. So, to avoid that wiki links/images displays completely broken after they were imported, we added a new `WikiPipeline`, that for now will parse only simple links, and image tags.

##### Before `WikiPipeline`:

![Screenshot_2016-01-11_20.14.48](/uploads/46fd5dbb5acfc70aa8ecca3050b675e4/Screenshot_2016-01-11_20.14.48.png)

##### After `WikiPipeline`:

![Screenshot_2016-01-11_20.15.56](/uploads/b1d94aa852f385f867a7868c358b4257/Screenshot_2016-01-11_20.15.56.png)

See merge request !2324
2016-01-14 15:08:42 +00:00
Rémy Coutable d00725a175 Fix alignment issues after a fix on titles weight 2016-01-14 16:05:47 +01:00
Douwe Maan b6ae2def2c Merge branch 'unsubscribe-from-thread-from-email-footer' into 'master'
Unsubscribe from thread through link in email footer

Closes #3437 

![Screenshot_from_2015-12-11_15-35-06](/uploads/cfb3d8737d4757f527995411f103d0ce/Screenshot_from_2015-12-11_15-35-06.png)

![Screenshot_from_2015-12-11_15-35-56](/uploads/9b7121be7ce4b05e5995ca6d38c5bea4/Screenshot_from_2015-12-11_15-35-56.png)

See merge request !2068
2016-01-14 14:38:55 +00:00
Dmitriy Zaporozhets 33ccee239e Merge branch 'new-buttons-everywhere' into 'master'
Standartize buttons and fields size

Fixes #8069 and #8070

See merge request !2428
2016-01-14 14:19:32 +00:00
Douglas Barbosa Alexandre 928c94807e Move js function to removing accents to vendor/assets/javascripts 2016-01-14 12:09:31 -02:00
Douglas Barbosa Alexandre 4872b319c8 Use the WikiPipeline when rendering the wiki markdown content 2016-01-14 12:09:31 -02:00
Douglas Barbosa Alexandre a6a5990ee5 Add Banzai::Filter::GollumTagsFilter for parsing Gollum's tags in HTML 2016-01-14 12:09:31 -02:00
Douglas Barbosa Alexandre aac6598482 Relax constraints for wiki slug
Since GitHub doesn’t apply these constraints to theirs wiki slug
allowing characters like `,`, `:`, `*`, etc, we need to relax our
constraints or some wiki pages will not be available after they were
imported.

For an example the Devise project have a wiki page with the following
slug: “How To: Add sign_in, sign_out, and sign_up links to your layout
template”
2016-01-14 12:09:31 -02:00
Tomasz Maczukin 2c7d9cfa7d Move Ci::Build#available_statuses to AVAILABLE_STATUSES constant in CommitStatus 2016-01-14 14:59:04 +01:00
Dmitriy Zaporozhets e47f0e563d Merge branch 'closing-mr-bug-fix' into 'master'
fixes bug with commenting on merge requests



See merge request !2415
2016-01-14 13:14:50 +00:00
Dmitriy Zaporozhets 620d8b68a1 Merge branch 'remove-gray-bg'
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-01-14 14:09:49 +01:00
Dmitriy Zaporozhets f414928a54 Standartize buttons and fields size
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-01-14 13:59:28 +01:00
Grzegorz Bizon f03da18e3a Merge branch 'ci/view-build-artifacts' into 'master'
Add browser for build artifacts

Discussion in #3426, closes #3426.

See merge request !2123
2016-01-14 12:57:33 +00:00
Tomasz Maczukin 405b82af23 Merge branch 'master' into ci/api-builds
* master: (51 commits)
  Fix version
  Fix specs and rubocop warnings
  Improve the consistency of commit titles, branch names, tag names, issue/MR titles, on their respective project pages
  fixed LDAP activation on login to use new ldap_blocked state
  Fix Admin/Users view to position buttons without spacing magic
  Update to Go 1.5.3
  Fix the undefinded variable error in Project's safe_import_url method
  Update CHANGELOG [ci skip]
  Add some cosmetic changes to variables API documentation [ci skip]
  Fix misaligned edit button in milestone collection partial
  Update button styles for Milestones#show
  Modify builds API documentation style [ci skip]
  Modify :ci_variable factory
  Ensure the API doesn't return notes that the current user shouldn't see
  Add 'Build' prefix to Variables entry name in API docs index
  Fix some typos
  Add spec for Note#cross_reference_not_visible_for?
  Remove (invalid) timestamp formatting
  Move `BroadcastMessage#status` to a helper since it's presentational
  Update CHANGELOG
  ...

Conflicts:
	doc/api/README.md
	lib/api/api.rb
	lib/api/entities.rb
2016-01-14 13:30:18 +01:00
Tomasz Maczukin af3b97cdde Merge branch 'master' into ci/api-triggers
* master:
  Fix version
  Improve the consistency of commit titles, branch names, tag names, issue/MR titles, on their respective project pages
  Update CHANGELOG [ci skip]
  Add some cosmetic changes to variables API documentation [ci skip]
  Modify builds API documentation style [ci skip]
  Modify :ci_variable factory
  Add 'Build' prefix to Variables entry name in API docs index
  Fix some typos
  Add some fixes after review
  Remove blank line
  Update ./doc/api
  Change :variable_id to :key as resource ID in API
  Fix a typo in method description
  Add create feature to variables API
  Add missing 'not_found' checks in variables API
  Add delete feature to variables API
  Add update feature for variables API
  Add features for list and show details of variables in API

Conflicts:
	doc/api/README.md
	lib/api/entities.rb
2016-01-14 13:09:54 +01:00
Douwe Maan f981da44ab Merge branch 'ci/api-variables' into 'master'
Add variables API

References #4264 

See merge request !2264
2016-01-14 12:05:53 +00:00
Grzegorz Bizon be764a3a20 Minor improvements in build arfifacts browser
Added also a `Gitlab::Ci::Build::Artifacts::Metadata::ParserError`
exception class.
2016-01-14 12:48:17 +01:00
Grzegorz Bizon 6b0a43aff3 Improve readability of artifacts browser Entry related code 2016-01-14 12:48:17 +01:00
Grzegorz Bizon 6d7a77074f Add specs for endpoint meant to be accelerated by workhorse 2016-01-14 12:48:16 +01:00