Commit Graph

1045 Commits

Author SHA1 Message Date
Drew Blessing 1910fd05ae Rename Licenses API to License Templates API 2016-06-27 14:42:05 -05:00
Marc Siegfriedt 6587feba65 gitlab-org/gitlab-ce#17818 - add api call for issues by group
rely only on IssuesFinder
docs and changelog
2016-06-23 16:31:48 +00:00
Grzegorz Bizon dd08202a24 Fix builds API response not including commit data 2016-06-21 14:26:57 +02:00
Jacob Schatz 0d287b06a6 Merge branch '17521-gitlab-ci-yml-templates' into 'master'
GitLab CI Yaml template dropdown

## What does this MR do?
Make it possible to select a dropdown for an easy start with GitLab CI.

## What are the relevant issue numbers?
Closes #17521

## TODO
- [ ] Backend
  - [x] CHANGELOG item
  - [x] Fix rubocop failure
  - [x] API Support
  - [x] New tests
  - [x] Add disclaimer to the top of the gitlab-ci.yml
- [ ] Frontend
  - [x] New tests

See merge request !4411
2016-06-21 10:56:41 +00:00
Rémy Coutable f90c8c624d Merge branch 'feature/runner-lock-on-project' into 'master'
Make it possible to lock runner on a specific project

Make it possible to lock runner on a specific project.

![Screen_Shot_2016-06-20_at_4.03.08_PM](/uploads/186378643a20106ff0b67b6fd8bd7f28/Screen_Shot_2016-06-20_at_4.03.08_PM.png)

----

![Screen_Shot_2016-06-20_at_9.54.52_PM](/uploads/c479abdffaf19f383bb6b5a42bdd6cc3/Screen_Shot_2016-06-20_at_9.54.52_PM.png)

----

![Screen_Shot_2016-06-20_at_9.56.26_PM](/uploads/6ad838679b0c28a1fe2e20e9224387ea/Screen_Shot_2016-06-20_at_9.56.26_PM.png)

Closes #3407

See merge request !4093
2016-06-21 10:08:42 +00:00
Z.J. van de Weg bbfd62bc34 fixup! override content method 2016-06-20 14:48:28 -05:00
Z.J. van de Weg 483dc62eaa Incorporate review 2016-06-20 14:48:28 -05:00
Z.J. van de Weg 620d014aef Implement backend gitlab ci dropdown
This commit builds on the groundwork in
ee008e300b1ec0abcc90e6a30816ec0754cea0dd, which refactored the backend
so the same code could be used for new dropdowns. In this commit its
used for templates for the `.gitlab-ci.yml` files.
2016-06-20 14:48:28 -05:00
ZJ van de Weg 27bf7ae59e Refactor Gitlab::Gitignores 2016-06-20 14:48:28 -05:00
Lin Jen-Shin aeb24ee872 Merge remote-tracking branch 'upstream/master' into feature/runner-lock-on-project
* upstream/master: (353 commits)
  Put some admin settings in dropdown
  Add styleguide on configuration settings documentation
  Remove Duplicated keys add UNIQUE index to fingerprint
  Avoid autoload issue such as 'Mail::Parsers::AddressStruct'
  Move appearance settings as sub tab to application settings
  use rails root join
  fixed a couple of errors spotted in production
  Fix RangeError exceptions when referring to issues or merge requests outside of max database values
  Fix bug in `WikiLinkFilter`.
  Grammar and typographic changes to artifacts documentation
  Tweak grammar
  Small frontend code fixes and restore 8a2d88f commit
  Warn about admin privilege to disable GitHub Webhooks
  Listing GH Webhooks doesn't stop import process for non GH admin users
  fixup! updated docs for api endpoint award emoji
  Update CHANGELOG
  Ensure Todos counters doesn't count Todos for projects pending delete
  Add endpoints for award emoji on notes
  Sort API endpoints and implement feedback
  Add endpoints for Award Emoji
  ...
2016-06-20 14:04:14 +00:00
Paco Guzman 11f37a9302 Remove explicit Gitlab::Metrics.action assignments, are already automatic. 2016-06-18 07:33:50 +02:00
Z.J. van de Weg 05a4a586b5 Add endpoints for award emoji on notes
Docs also added.
2016-06-17 21:02:51 +02:00
Z.J. van de Weg 34558315d9 Sort API endpoints and implement feedback 2016-06-17 20:08:16 +02:00
Z.J. van de Weg 3f88221c2d Add endpoints for Award Emoji
This only supports Issues and MergeRequests right now because of the
consistency of the routes those models provide.
2016-06-17 20:07:17 +02:00
Patricio Cano 23457cba44 Added missing mount point for Sidekiq Metrics API, after it got lost on rebase. 2016-06-17 11:49:27 -05:00
Patricio Cano 8ad1884505 Fixed Rubocop error 2016-06-17 11:16:25 -05:00
Lin Jen-Shin 5174d6c146 Merge remote-tracking branch 'upstream/master' into feature/runner-lock-on-project
* upstream/master: (337 commits)
  Update CHANGELOG for !4659
  Center the header logo for all Devise emails
  Add previews for all customized Devise emails
  Customize the Devise `unlock_instructions` email
  Customize the Devise `reset_password_instructions` email
  Customize the Devise `password_change` emails
  Use gitlab-git 10.2.0
  Use Git cached counters on project show page
  Fix indentation scss-lint errors
  Added title attribute to enties in tree view Closes #18353
  Banzai::Filter::ExternalLinkFilter use XPath
  Reduce queries in IssueReferenceFilter
  Use gitlab_git 10.1.4
  Fixed ordering in Project.find_with_namespace
  Fix images in emails
  Banzai::Filter::UploadLinkFilter use XPath
  Turn Group#owners into a has_many association
  Make project_id nullable
  CHANGELOG [ci skip]
  CHANGELOG [ci skip]
  ...
2016-06-17 19:52:55 +08:00
Timothy Andrew 90bba2bc46 Merge remote-tracking branch 'origin/master' into 2979-personal-access-tokens 2016-06-16 08:27:37 +05:30
Timothy Andrew 7ee0898a9e Implement @DouweM's feedback.
- Extract a duplicated `redirect_to`
- Fix a typo: "token", not "certificate"
- Have the "Expires at" datepicker be attached to a text field, not inline
- Have both private tokens and personal access tokens verified in a
  single "authenticate_from_private_token" method, both in the
  application and API. Move relevant logic to
  `User#find_by_personal_access_token`
- Remove unnecessary constants relating to API auth. We don't need a
  separate constant for personal access tokens since the param is the
  same as for private tokens.
2016-06-16 08:24:13 +05:30
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
Patricio Cano 6023dc356a Revert "Added API endpoint for Sidekiq Metrics"
This reverts commit 06e0ef07bc
2016-06-14 16:46:53 +00:00
Patricio Cano 06e0ef07bc Added API endpoint for Sidekiq Metrics 2016-06-14 11:45:45 -05:00
Lin Jen-Shin 9cf45b0586 Return the association and check it in controller instead:
Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4641#note_12444891
2016-06-14 23:11:43 +08:00
Lin Jen-Shin 6c500034f4 Merge branch 'prefer-assign_to' into feature/runner-lock-on-project
* prefer-assign_to:
  Give 409 Conflict whenever the runner was already enabled
  We're checking return value rather than rescuing exceptions
  Prefer Runner#assign_to instead of creating directly
2016-06-14 23:05:33 +08:00
Lin Jen-Shin fd285f71d8 Merge branch 'master' into feature/runner-lock-on-project
* master: (147 commits)
  Update CHANGELOG
  Remove deprecated issues_tracker and issues_tracker_id from project
  Schema doesn’t reflect the changes of the last 3 migrations
  Revert CHANGELOG
  Also rename "find" in the specs
  Change to new Notes styleguide
  Add guide on changing a document's location
  Change logs.md location in README
  Move logs/logs.md to administration/logs.md
  Make "four phase test"
  Only show branches for revert / cherry-pick
  Instrument all Banzai::ReferenceParser classes
  Removed old comment from update_column_in_batches
  Update columns in batches until no rows are left
  Remove counters from Pipeline navigation
  Handle NULL migration errors in migration helpers
  Fix typo causing related branches to Error 500
  Improved SVG sanitizer specs to include smoke tests for clean.
  Refactored SVG sanitizer
  Added SVG sanitizer fix to the changelog
  ...
2016-06-14 23:05:26 +08:00
Lin Jen-Shin 1b8f52d920 Avoid enabling locked runners. Give 403 in this case 2016-06-14 22:58:38 +08:00
Lin Jen-Shin f74f423860 Give 409 Conflict whenever the runner was already enabled 2016-06-14 22:25:11 +08:00
Douwe Maan 9413d1c2e9 Merge branch 'master' into 13948-access-request-to-projects-and-groups
# Conflicts:
#	app/views/layouts/nav/_project.html.haml
2016-06-14 16:23:16 +02:00
Kamil Trzcinski 006b650988 Merge remote-tracking branch 'origin/master' into environments-and-deployments
# Conflicts:
#	db/schema.rb
2016-06-14 16:19:29 +02:00
Rémy Coutable 515205d3c1 UI and copywriting improvements
+ Move 'Edit Project/Group' out of membership-related partial
+ Show the access request buttons only to logged-in users
+ Put the request access buttons out of in a more visible button
+ Improve the copy in the #remove_member_message helper

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-06-14 13:18:14 +02:00
Rémy Coutable d26f81239a Add request access for groups
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-06-14 13:07:26 +02:00
Kamil Trzcinski 7d9e8b04c0 Merge remote-tracking branch 'origin/master' into environments-and-deployments 2016-06-14 12:41:18 +02:00
Kamil Trzcinski 1b62b86fdd Merge remote-tracking branch 'origin/master' into artifacts-expire-date 2016-06-14 11:38:44 +02:00
Kamil Trzcinski 60e0137c86 Fix specs 2016-06-14 11:38:34 +02:00
Lin Jen-Shin 5f887344c0 Prefer Runner#assign_to instead of creating directly 2016-06-14 16:36:54 +08:00
Timothy Andrew d0bcba1105 Merge remote-tracking branch 'origin/master' into 2979-personal-access-tokens 2016-06-14 09:06:53 +05:30
Douwe Maan 1cbd5c6686 Merge branch 'gitlab-auth-method-names' into 'master'
Improve Gitlab::Auth method names

Auth.find was a very generic name for a very specific method.
Auth.find_in_gitlab_or_ldap was inaccurate in GitLab EE where it also
looks in Kerberos.


See merge request !4589
2016-06-13 18:05:53 +00:00
Kamil Trzcinski 421be01dab Improve design based on review 2016-06-13 11:09:19 +01:00
Kamil Trzcinski 6013768fec Added keep artifacts API endpoint 2016-06-13 11:07:23 +01:00
Stan Hu a85dde9182 Fix Error 500 when using closes_issues API with an external issue tracker
Closes #18484
2016-06-11 19:50:08 -07:00
Kamil Trzcinski 907c0e6796 Added initial version of deployments 2016-06-10 23:36:54 +02:00
Robert Speicher 37be2007f9 Merge branch 'workhorse-helpers' into 'master'
Add workhorse controller and API helpers

Adds `send_git_blob` and `send_git_archive` controller and API helpers to reduce duplication and make Workhorse easier for a developer to work with.

See merge request !4486
2016-06-10 16:21:26 +00:00
Jacob Vosmaer 0e896ffe4e Improve Gitlab::Auth method names
Auth.find was a very generic name for a very specific method.
Auth.find_in_gitlab_or_ldap was inaccurate in GitLab EE where it also
looks in Kerberos.
2016-06-10 14:51:16 +02:00
Rémy Coutable 6dff7c1771 Improve initial implementation of the 'only_allow_merge_if_build_succeeds.rb' feature
Based on the feedback from reviewers.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-06-10 14:36:57 +02:00
Rui Anderson 07dbd6b388 Allow or not merge MR with failed build
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-06-10 14:36:54 +02:00
Douwe Maan 701e2df7e5 Satisfy Rubocop 2016-06-10 12:29:15 +02:00
Douwe Maan 16bd4e5668 Merge branch 'master' into workhorse-helpers 2016-06-10 12:28:04 +02:00
Timothy Andrew 1779d68bfe Merge remote-tracking branch 'origin/master' into 2979-personal-access-tokens 2016-06-09 14:40:14 +05:30
Lin Jen-Shin 1c302d566b WIP, try to add views for locked runners 2016-06-09 16:00:24 +08:00
Sean McGivern 40b6d9064a Allow custom text on 'almost there' page
Add a new application setting, after_sign_up_text. This is text to be
rendered as Markdown and shown on the 'almost there' page after a user
signs up, but before they've confirmed their account.

Tweak the styles for that page so that centered lists look reasonable.
2016-06-08 19:08:53 +01:00