Commit Graph

63 Commits

Author SHA1 Message Date
Douwe Maan 16f7243fef
Revert "[Rails5] Set request.format for artifacts_controller"
This reverts commit c48e7dc263.

# Conflicts:
#	app/controllers/projects/artifacts_controller.rb
2018-12-03 12:29:01 +01:00
Kamil Trzciński 5da2f42dc9 backport: Always proxy reports downloads
This makes to always proxy reports
2018-11-07 21:49:45 +01:00
Matija Čupić 22d1ec661d Disable artifact validation for download action 2018-10-16 13:01:48 +00:00
Matija Čupić 48c911b75e CE Resolve "Refactor code quality similar to JUnit tests" 2018-10-02 17:01:26 +00:00
gfyoung 12ee2753c1 Enable even more frozen string in app/controllers
Enables frozen string for some vestigial files as
well as the following:

* app/controllers/projects/**/*.rb
* app/controllers/sherlock/**/*.rb
* app/controllers/snippets/**/*.rb
* app/controllers/users/**/*.rb

Partially addresses #47424.
2018-09-25 22:43:49 -07:00
Yorick Peterse 2039c8280d
Disable existing offenses for the CodeReuse cops
This whitelists all existing offenses for the various CodeReuse cops, of
which most are triggered by the CodeReuse/ActiveRecord cop.
2018-09-11 17:32:00 +02:00
blackst0ne c48e7dc263 [Rails5] Set request.format for artifacts_controller
Since Rails 5 request.format gets set by extension if it's not explicitly
set.
That means artifacts_controller#file no longer works as expected.
This commit explicitly sets request.format for artifacts_controller#file.
2018-06-16 21:46:31 +11:00
Grzegorz Bizon 6ca02a4150 Merge branch 'zj-multiple-artifacts-ee' into 'master'
Multiple artifacts ee

See merge request gitlab-org/gitlab-ee!3276
2018-02-28 20:44:09 +01:00
Kamil Trzciński e0401df121 Merge commit '11c67e7c2f992299ff5918ce67995b73d1e0be6d' into object-storage-ee-to-ce-backport 2018-02-28 20:35:22 +01:00
Douwe Maan bc76062774 Merge branch 'jej/lfs-object-storage' into 'master'
Can migrate LFS objects to S3 style object storage

Closes #2841

See merge request !2760
2018-02-28 20:29:37 +01:00
Zeger-Jan van de Weg e4d07f12b6
Test against public projects 2017-10-05 12:41:22 +02:00
Zeger-Jan van de Weg 8cbfe3aea6
Redirect to pages daemon 2017-10-03 12:34:24 +02:00
Grzegorz Bizon 3b874414c0 Do not use artifacts metadata to access single artifact 2017-09-05 12:34:49 +02:00
Douwe Maan fe13f11041 Create and use project path helpers that only need a project, no namespace 2017-07-05 11:11:59 -05:00
Sean McGivern 04251829ba Merge branch 'dm-collapsed-blob' into 'master'
Consistent diff and blob size limit names

See merge request !11776
2017-06-01 09:10:53 +00:00
Douwe Maan aed0387f97 Consistent diff and blob size limit names 2017-05-29 17:02:02 -05:00
Lin Jen-Shin 71777a4a18 Rename BuildsController to JobsController
Rename other URL generators

admin_builds_path -> admin_jobs_path

Fix tests and more renaming

Fix more tests

Also change build_id to job_id in the controller
2017-05-17 20:17:30 +08:00
Douwe Maan 0f58eb6bde Add artifact file page that uses the blob viewer 2017-05-04 08:50:12 -05:00
Douwe Maan df36f1f47b Add breadcrumb, build header and pipelines submenu to artifacts browser 2017-05-03 16:32:36 -05:00
Lin Jen-Shin b17df0507b Extract ref_name and path in before_action, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5142#note_14469768
2016-08-26 13:10:03 +08:00
Lin Jen-Shin dd8afbf05d Just use instance variable instead, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5142#note_14400736
2016-08-25 15:04:15 +08:00
Lin Jen-Shin e65bc0f175 Path could also have slashes! Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5142#note_14347729
2016-08-24 16:02:56 +08:00
Lin Jen-Shin 17d0406546 Not sure why I missed this renaming 2016-08-18 19:30:20 +08:00
Lin Jen-Shin e8b03baf6b Use path rather than URL because it should work for http 302:
Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5142#note_14035941
2016-08-18 15:31:20 +08:00
Lin Jen-Shin 4fbe044b74 Use switch case in a helper, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5142#note_13988401
2016-08-17 17:38:38 +08:00
Lin Jen-Shin f86a507745 Rename to latest_succeeded, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5142#note_13908017
2016-08-16 22:10:10 +08:00
Lin Jen-Shin 73bbaffbfc Use URL helper, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5142#note_13880889
2016-08-16 01:03:08 +08:00
Lin Jen-Shin 85ceb8b72f Rename latest_success* to latest_successful:
Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5142#note_13164642
2016-07-19 17:51:45 +08:00
Lin Jen-Shin 3be2c3f566 Merge branch 'master' into artifacts-from-ref-and-build-name
* master: (335 commits)
  Disable transaction when adding index for Ci::Pipeline
  added changelog
  allow empty repos on import/export
  Modify test for Build tabs
  Add tests to project builds for pending tab
  Remove unused .js-running-count class
  Add test for new pending tab and update tests for running tab
  Add Pending Tab to Admin Builds
  added changelog
  limit project expor retry to only 3
  use method in validates statement
  Fix spec to set import_url before attempting to create import_data
  Allow a project import URL to be blank to prevent false positives preventing settings from being saved
  Refactor gitlab_ci_yaml_processor variables tests
  Fix CI yaml example
  Align cancel and retry buttons
  Remove deploy to production button
  Remove irrelevant comments
  Fix gitlab_ci_yaml_processor_spec.rb
  Fix AddWhenAndYamlVariablesToCiBuilds migration
  ...
2016-07-18 21:34:48 +08:00
Lin Jen-Shin 78c37bdd77 Use find_by, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5142#note_13125486
2016-07-18 13:39:53 +08:00
Lin Jen-Shin 53a9dee6cb Introduce Project#latest_success_builds_for:
So it's more accessible for views to access the names of jobs.
Only filter Build#name from where we really need to download it.
2016-07-15 02:22:29 +08:00
Lin Jen-Shin d7bbee7593 Update routes based on feedback from:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5142#note_13058785

And note that job/build_name could contain `/`
2016-07-14 16:45:46 +08:00
Lin Jen-Shin bb5f06718c Rename to ref_name so it's aligning with API 2016-07-13 18:19:29 +08:00
Lin Jen-Shin 57c72cb0df Could be faster when params[:path] is missing 2016-07-12 23:26:30 +08:00
Lin Jen-Shin e383254070 Add all the tests and fix stuffs along the way:
It turns out they are different:

    builds.success.latest.first

and

    builds.latest.success.first

If we put success first, that latest would also filter via success,
and which is what we want here.
2016-07-12 23:15:08 +08:00
Lin Jen-Shin 2b728ed3da Just give regular 404, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5094#note_12984211
2016-07-11 20:04:46 +08:00
Lin Jen-Shin 1f733a95c7 Remove redundant return 2016-07-11 19:06:40 +08:00
Lin Jen-Shin df5b78676e Using plain if/else is much easier to understand 2016-07-11 19:06:14 +08:00
Lin Jen-Shin ef833a2205 Give latest succeeded one, don't give pending/running ones 2016-07-11 18:51:23 +08:00
Lin Jen-Shin f601ec54fc Introduce Projects::ArtifactsController#search:
So we redirect from ref and build_name to the particular build, namely:

* /u/r/artifacts/ref/build_name/* -> /u/r/builds/:build_id/artifacts/*

For:

* download
* browse
* file
2016-07-11 18:17:32 +08:00
Lin Jen-Shin 28e324ae67 Use Gitlab-Workhorse-Send-Data to send entry:
Closes #19224, Closes #19128

Also requires this MR to work:
https://gitlab.com/gitlab-org/gitlab-workhorse/merge_requests/53
2016-07-05 22:58:38 +08:00
Kamil Trzcinski 7e9273dd94 Test controllers if they allow to keep artifacts 2016-06-13 11:07:23 +01:00
Kamil Trzcinski c59947112f Validate existence of artifacts in ArtifactsController, render 404 if not found 2016-06-13 11:03:30 +01:00
Kamil Trzcinski ffe8dbde9b Move keep to ArtifactsController 2016-06-13 11:03:30 +01:00
Tomasz Maczukin 1f608ac461
Remove 'unscoped' from project builds selection 2016-06-04 00:02:40 +02:00
Kamil Trzcinski 055afab5c7 Make the CI permission model simpler
This MR simplifies CI permission model:
- read_build: allows to read a list of builds, artifacts and trace
- update_build: allows to cancel and retry builds
- create_build: allows to create builds from gitlab-ci.yml (not yet implemented)
- admin_build: allows to manage triggers, runners and variables
- read_commit_status: allows to read a list of commit statuses (including the overall of builds)
- create_commit_status: allows to create a new commit status using API

Remove all extra methods to manage permission.
Made all controllers to use explicitly the new permissions.
2016-02-02 09:18:08 +01:00
Grzegorz Bizon 6b2f38f39a Fix nonexistent method in artifacts controller 2016-01-15 13:48:29 +01:00
Grzegorz Bizon 6b0a43aff3 Improve readability of artifacts browser `Entry` related code 2016-01-14 12:48:17 +01:00
Grzegorz Bizon 487b0a026f Improvements, readability for artifacts browser 2016-01-14 12:48:16 +01:00
Grzegorz Bizon e9c2628220 Check if file exists in metadata in download action 2016-01-14 12:48:16 +01:00