285 Commits
Author SHA1 Message Date
Lin Jen-Shin b988644ad8 Use scope rather than class method 2016-07-07 18:56:02 +08:00
Lin Jen-Shin b5a2319764 Explicitly set to nil when artifacts don't exist:
Feedback from:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4964#note_12867273
2016-07-04 22:56:23 +08:00
Lin Jen-Shin 596f46881f Merge remote-tracking branch 'upstream/master' into save-artifacts_sizes
* upstream/master: (175 commits)
  Document Repository#keep_around
  Don't garbage collect commits that have related DB records like comments
  Update CHANGELOG
  Update RedCloth to 4.3.2 for CVE-2012-6684
  Fix typo in Merge Requests API documentation
  Downgrade to Redis 3.2.2 due to massive memory leak with Sidekiq
  Enable Style/EmptyLines cop, remove redundant ones
  Update CHANGELOG
  Cache results from jQuery selectors to retrieve namespace name
  Fix import button when import fail due the namespace already been taken
  Fix snippets comments not displayed
  Fix emoji paths in relative root configurations
  Exclude requesters from Project#members, Group#members and User#members
  Upgrade Thin from 1.6.1 to 1.7.0.
  Many squashed commits
  Cache autocomplete results
  Upgrade Sidekiq from 4.1.2 to 4.1.4.
  Upgrade seed-fu from 2.3.5 to 2.3.6
  use has_many relationship with events
  Support creating a todo on issuables via API
  ...
2016-07-04 19:14:54 +08:00
Douwe Maan 3286dd7a1d Don't garbage collect commits that have related DB records like comments 2016-07-04 00:11:33 -04:00
Lin Jen-Shin 7b06acea1c Use nil for non-existing files rather than 0 2016-07-01 00:00:35 +08:00
Grzegorz Bizon f9c5f18d44 Improve method that tells if build is retryable
This method now should return false if build is not completed. If build
is running then it is not retryable, therefore `Ci::Build#retryable?`
returned wrong value. This commit changes this behavior
2016-06-30 11:06:19 +02:00
Lin Jen-Shin 9d8dca08e4 Use AR callbacks as suggested by:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4964#note_12744656
2016-06-29 17:44:39 +08:00
Lin Jen-Shin 1bc0d732f6 Also remove ci_builds.artifacts_size when erased 2016-06-28 20:37:46 +08:00
Lin Jen-Shin 0a294698db Just save the size in total rather than individual files
Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4964#note_12741046
2016-06-28 11:16:48 +00:00
Lin Jen-Shin fe0c59d2e6 Introduce ci_builds.artifacts_sizes as JSON:
We store the sizes as a hash from path to bytes like:

``` ruby
{'ci_artifacts.txt' => 27,
 'other_artifacts_0.1.2/another-subdirectory/banana_sample.gif' =>
71759,
 'other_artifacts_0.1.2/doc_sample.txt' => 1314,
 'rails_sample.jpg' => 35255,
 'tests_encoding/utf8 test dir ✓/regular_file_2' => 7}
```

So that it's easier to access than reading gzip file again.
2016-06-28 18:14:21 +08:00
James Lopez 31c95aa031 add missing attribute to attr_encrypted so it is fully backwards-compatible 2016-06-28 09:55:19 +02:00
Simon Welsh 0550f2a5e7 Add support for "skip ci" too 2016-06-25 11:38:06 +10:00
Simon Welsh 2fc91c4865 Allow "ci skip" to be in any case 2016-06-25 11:36:36 +10:00
James Lopez f854f6cd02 fixed pipeline notes issue 2016-06-23 12:29:11 +02:00
Grzegorz Bizon 92984783db Rename commit_data in Pipeline to commit 2016-06-21 14:43:37 +02: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
Lin Jen-Shin 4efc1c4a68 Rename according to:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4093#note_12563922

For clarification and consistency
2016-06-20 16:52:05 +08:00
Douwe Maan 9b7fd74805 Merge branch 'feature/project-export' into 'master'
Export project functionality

This is a MR for the export functionality of https://gitlab.com/gitlab-org/gitlab-ce/issues/3050, which adds the ability to export single projects.

- [x] members
- DB data
  - [x] issues
  - [x] issue comments
  - [x] merge requests
  - [x] merge request diff
  - [x] merge request comments
  - [x] labels
  - [x] milestones
  - [x] snippets
  - [x] releases
  - [x] events
  - [x] commit statuses
  - [x] CI builds
- File system data
  - [x] Git repository
  - [x] wiki
  - [x] uploads
  - [ ] ~~CI build traces~~
  - [ ] ~~CI build artifacts~~
  - [ ] ~~LFS objects~~
- DB configuration
  - [x] services
  - [x] web hooks
  - [x] protected branches
  - [x] deploy keys
  - [x] CI variables
  - [x] CI triggers

See merge request !3114
2016-06-17 15:35:27 +00: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
Kamil Trzcinski d63673d6df Make sure that artifacts_file is nullified after removing artifacts 2016-06-17 12:58:26 +02:00
Lin Jen-Shin 4852acef92 Use FIXME instead, feedback from:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4093/diffs#note_12501400
2016-06-16 23:20:13 +08:00
James Lopez 778d72664f Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into feature/project-export
# Conflicts:
#	app/models/ci/pipeline.rb
2016-06-16 13:04:00 +02:00
James Lopez 452c076a34 Revert "squashed merge and fixed conflicts"
This reverts commit 13e37a3ee5.
2016-06-16 12:59:07 +02:00
James Lopez 13e37a3ee5 squashed merge and fixed conflicts 2016-06-16 12:12:28 +02:00
Grzegorz Bizon d8670e114a Merge branch 'master' into fix/status-of-pipeline-without-builds
* master: (198 commits)
  Set inverse_of for Project/Services relation
  Fix admin hooks spec
  Prevent default disabled buttons and links.
  Add index on `requested_at` to the `members` table
  Rearrange order of tabs
  Fix admin active tab tests
  Show created_at in table column
  Nest li elements directly under ul
  Move builds tab to admin overview
  Add monitoring link with subtabs
  Add sub links to overview
  Add counter for abuse reports
  Remove admin layout-nav counters
  Move admin nav to horizontal layout nav
  Eager load project relations in IssueParser
  Use validate and required for environment and project
  Award Emoji can't be awarded on system notes backend
  Get rid of Gitlab::ShellEnv
  Update CHANGELOG.
  Fix project star tooltip on the fly.
  ...

Conflicts:
	app/services/ci/create_builds_service.rb
2016-06-15 20:14:25 +02:00
Grzegorz Bizon 2d495fce52 Remove reduntant method for building pipeline builds 2016-06-15 14:12:25 +02:00
Grzegorz Bizon 6ff146340f Improve creating builds by combining two loops 2016-06-15 10:22:20 +02:00
Grzegorz Bizon a76cbe5292 Add note for short circuit eval when building builds 2016-06-15 10:11:09 +02:00
Grzegorz Bizon bf990fcda4 Return false in create_builds if not builds created
This fixes compatibility with trigger request create service.
2016-06-15 09:35:11 +02:00
Kamil Trzcinski 14a02a6a95 Improve design after review 2016-06-14 18:34:48 +02: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 f74f423860 Give 409 Conflict whenever the runner was already enabled 2016-06-14 22:25:11 +08: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
Kamil Trzcinski 6209b60c96 Properly create a new deployment after build success 2016-06-14 14:44:09 +02:00
Grzegorz Bizon cf292a3f1d Improve code clarity in pipeline create service 2016-06-14 14:22:46 +02:00
Grzegorz Bizon ab9a8643d8 Merge branch 'master' into fix/status-of-pipeline-without-builds
* master: (538 commits)
  Fix broken URI joining for `teamcity_url` with suffixes
  Factorize duplicated code into a method in BambooService and update specs
  Fix broken URI joining for `bamboo_url` with suffixes
  Honor credentials on calling Bamboo CI trigger
  Update CHANGELOG
  Use Issue.visible_to_user in Notes.search to avoid query duplication
  Project members with guest role can't access confidential issues
  Allow users to create confidential issues in private projects
  Update CHANGELOG
  Remove deprecated issues_tracker and issues_tracker_id from project
  Schema doesn’t reflect the changes of the last 3 migrations
  Apply reviewer notes: update CHANGELOG, adjust code formatting
  Move issue rendering tests into separate contexts
  Move change description to proper release and fix typo
  Add more information into RSS fead for issues
  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
  ...

Conflicts:
	app/services/ci/create_builds_service.rb
	app/services/ci/create_pipeline_service.rb
	app/services/create_commit_builds_service.rb
	spec/models/ci/commit_spec.rb
	spec/services/ci/create_builds_service_spec.rb
	spec/services/create_commit_builds_service_spec.rb
2016-06-14 13:44:03 +02:00
Kamil Trzcinski 3656a6edf3 Make retry action on pipeline to save a user 2016-06-14 13:04:10 +02:00
Lin Jen-Shin 1b03c5807f We're checking return value rather than rescuing exceptions 2016-06-14 17:28:11 +08:00
Lin Jen-Shin cbd6ca6985 Rename specific_for to available_for:
Feedback from:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4093#note_12413950
2016-06-14 16:07:57 +08:00
Kamil TrzcinskiandPhil Hughes 421be01dab Improve design based on review 2016-06-13 11:09:19 +01:00
Kamil TrzcinskiandPhil Hughes fab1c4a81b Show the artifacts expiration prompt in Build Artifacts widget 2016-06-13 11:05:26 +01:00
Kamil TrzcinskiandPhil Hughes ee7c5539f3 Add artifacts_expire_in method for Ci::Build 2016-06-13 11:03:30 +01:00
Kamil TrzcinskiandPhil Hughes ffe8dbde9b Move keep to ArtifactsController 2016-06-13 11:03:30 +01:00
Kamil TrzcinskiandPhil Hughes aea4041ce9 Allow to expire build artifacts 2016-06-13 11:01:19 +01:00
James Lopez 069bc26418 refactored loads of things due to commits to pipeline change 2016-06-13 10:55:54 +02:00
James Lopez e2c95c07a4 Merge branches 'feature/project-export' and 'master' of gitlab.com:gitlab-org/gitlab-ce into feature/project-export 2016-06-13 09:22:33 +02:00
Kamil Trzcinski 907c0e6796 Added initial version of deployments 2016-06-10 23:36:54 +02:00
Kamil Trzcinski cf7da039be commit status 2016-06-10 22:38:40 +02:00