69 Commits
Author SHA1 Message Date
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 de54335958 Prefer Ci::Build#erase_artifacts! 2016-06-28 20:32:32 +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
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
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
Kamil TrzcinskiandPhil Hughes 421be01dab Improve design based on review 2016-06-13 11:09:19 +01:00
Kamil TrzcinskiandPhil Hughes 86800bf51a Support expiration date in CI API when uploading artifacts 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
Kamil Trzcinski c43279a8d9 Fix expose of TriggerRequest 2016-06-10 13:58:33 +02:00
Kamil Trzcinski 4663ae064d Fix CI TriggerRequest entity 2016-06-09 17:57:07 +02:00
Lin Jen-Shin 781d35c191 Prefer attributes_for_keys so that it ignores nils
Also add a test for setting locked.
2016-06-09 16:00:24 +08:00
Lin Jen-Shin 1c302d566b WIP, try to add views for locked runners 2016-06-09 16:00:24 +08:00
Grzegorz Bizon bf9cc351c2 Add minor corrections related to config of runner 2016-05-19 22:01:53 +02:00
Grzegorz Bizon 0fd100d28d Improve setting default runner attrs when using API 2016-05-19 22:01:53 +02:00
Grzegorz Bizon b8cf2a340b Set run untagged option when registering a runner 2016-05-19 22:01:53 +02:00
Rémy Coutable 5589dcf8db Fix a few places where autoloading would fail
- Fix naming of API::CommitStatuses
- Ensure we use require_dependency instead of require
- Ensure the namespace is right in lib/api/api.rb, otherwise, we
  might require Grape::API::Helpers which defines the `#params` method.
  This is to avoid requiring a file multiple times and getting an "Already
  initialized constant" error.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-05-10 11:51:19 +02:00
Tomasz Maczukin a84d0204bf Fix Build#append_trace method usage when trace file doesn't exists yet 2016-04-20 11:54:06 +02:00
Tomasz Maczukin 4019b0d872 Fix some typos in documentation
[ci skip]
2016-04-20 11:54:06 +02:00
Tomasz Maczukin 0725c28069 Add documentation of incremental trace update API
[ci skip]
2016-04-20 11:54:05 +02:00
Tomasz Maczukin dd29283a88 Make sure that appending is done on a valid length 2016-04-20 11:53:44 +02:00
Tomasz Maczukin 360bd831bf Add range checking 2016-04-20 11:53:43 +02:00
Tomasz Maczukin 38a1378e63 Add incremental build trace update API 2016-04-20 11:53:39 +02:00
Grzegorz BizonandGrzegorz Bizon 13f92521c2 Move build eraseable API to proper API context 2016-02-19 17:24:59 +01:00
Grzegorz BizonandGrzegorz Bizon df313634d0 Do not allow to modify build if it has been erased 2016-02-19 17:24:59 +01:00
Grzegorz BizonandGrzegorz Bizon 21152d7d51 Use DELETE verb for erasing a build content
Also added API specs for that
2016-02-19 17:24:59 +01:00
Grzegorz BizonandGrzegorz Bizon 6ca99bd899 And CI API endpoint where user can erase a build 2016-02-19 17:24:59 +01:00
Robert Speicher 40403c78ef Merge branch 'fix-ci-runners-version-update' into 'master'
Fix CI runner version not being properly updated when asked for a build

Due to broken implementation of attribute_for_keys the runner information was not updated correctly.

This MR adds test to check that such scenario will never happen again.

See merge request !2618
2016-01-27 20:50:24 +00:00
Kamil Trzcinski 95d2f0fb51 Fix CI runner version not being properly updated when asking for a build
Due to broken implementation of attribute_for_keys the runner information was not updated correctly.

This MR adds test to check that such scenario will never happen again.
2016-01-27 12:04:54 +01:00
Kamil Trzcinski 5ea32ba498 Fix hot reloading for CI API 2016-01-26 19:05:04 +01:00
Kamil Trzcinski 1ce766367e Change dependencies.builds to depends_on_builds 2016-01-15 15:35:33 +01: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
Grzegorz Bizon 154b8ceba4 Refactor build artifacts upload API endpoint 2016-01-14 12:48:17 +01:00
Grzegorz Bizon 0b946029a1 Update build artifacts API
We do not want to allow runners to upload a metadata file. This needs to
be generated by Workhorse only.
2016-01-14 12:48:16 +01:00
Grzegorz Bizon e8995f9fd5 Modify artifacts upload API endpoint, add artifacts metadata 2016-01-14 12:48:16 +01:00
Grzegorz Bizon 3e6950481a Use method that creates runners registration token
`runners_registration_token` now creates a new token if it is blank.
2015-12-23 11:45:17 +01:00
Grzegorz Bizon 2ec93abed7 Merge branch 'master' into ci/persist-registration-token
* master: (66 commits)
  Fix runners admin view
  Fix migrations
  Rename mention of gitlab-git-http-server to gitlab-workhorse
  Bump Redis requirement to 2.8 for Sidekiq 4 requirements
  Fix wording on runner setup page
  add details on how to change saml button label
  Fix tests
  Move awards back to gray panel and few improvements to sidebar
  Few UI improvements to new sidebar implementation
  Fix tests for new issuable sidebar
  Update changelog
  Implement new sidebar for merge request page
  Make edit link on issuable sidebar works
  Redesign issue page for new sidebar
  Move awards css to separate file
  Implement issuable sidebar partial
  Update CHANGELOG
  Clarify cache behavior
  Run builds from projects with enabled CI
  Use Gitlab::Git instead of Ci::Git
  ...

Conflicts:
	db/schema.rb
2015-12-14 12:26:40 +01:00
Kamil Trzcinski 513d551c8f Fix after column rename 2015-12-11 18:02:10 +01:00
Kamil Trzcinski 64bfd9d71a Remove ci_ prefix from all ci related things 2015-12-11 18:02:09 +01:00
Kamil Trzcinski 8cdd54cc06 Add runners token 2015-12-11 18:02:09 +01:00
Kamil Trzcinski e80e3f5372 Migrate CI::Project to Project 2015-12-11 18:02:09 +01:00
Grzegorz Bizon 6b0c0d5bcc Ensure that runners registration token is present 2015-12-11 14:43:44 +01:00
Grzegorz Bizon e2e43a114b Use new runners registration token to register CI runners 2015-12-11 10:39:39 +01:00
Kamil Trzcinski 2988e1fbf5 Migrate CI::Services and CI::WebHooks to Services and WebHooks 2015-12-10 16:04:08 +01:00
Kamil Trzcinski 11728b50f9 Expose artifacts path 2015-11-23 13:05:22 +01:00
Kamil Trzcinski eef129bd4a Final fixes 2015-11-10 22:21:15 +01:00
Kamil Trzcinski db3213fc1c Use normal file upload mechanism to upload artifacts 2015-11-10 12:51:51 +01:00
Kamil Trzcinski d0e3e823a2 Implement Build Artifacts
- Offloads uploading to GitLab Workhorse
- Use /authorize request for fast uploading
- Added backup recipes for artifacts
- Support download acceleration using X-Sendfile
2015-11-10 12:51:50 +01:00
Jacob Vosmaer e032a7288f Spread out runner contacted_at updates 2015-11-02 16:02:47 +01:00
Jason Lee 3d613fe1e8 Fix API::APIHelpers -> API::Helpers;
Rails Autoload find file to require is use , APIHelpers -> api_helpers.rb, not helpers.rb;
2015-10-23 11:42:57 +08:00