Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
445cdb75
Commit
445cdb75
authored
Nov 09, 2015
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move tmp artifacts to shared/artifacts/tmp/. Check for GitLab-Workhorse now
parent
97f58bae
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
4 additions
and
8 deletions
+4
-8
.gitignore
.gitignore
+0
-2
app/uploaders/artifact_uploader.rb
app/uploaders/artifact_uploader.rb
+2
-2
doc/install/installation.md
doc/install/installation.md
+0
-2
lib/api/helpers.rb
lib/api/helpers.rb
+1
-1
shared/artifacts/tmp/cache/.gitkeep
shared/artifacts/tmp/cache/.gitkeep
+0
-0
shared/artifacts/tmp/uploads/.gitkeep
shared/artifacts/tmp/uploads/.gitkeep
+0
-0
spec/requests/ci/api/builds_spec.rb
spec/requests/ci/api/builds_spec.rb
+1
-1
No files found.
.gitignore
View file @
445cdb75
...
@@ -38,8 +38,6 @@ public/assets/
...
@@ -38,8 +38,6 @@ public/assets/
public/uploads.*
public/uploads.*
public/uploads/
public/uploads/
shared/artifacts/
shared/artifacts/
shared/tmp/artifacts-uploads/
shared/tmp/artifacts-cache/
rails_best_practices_output.html
rails_best_practices_output.html
/tags
/tags
tmp/
tmp/
...
...
app/uploaders/artifact_uploader.rb
View file @
445cdb75
...
@@ -9,11 +9,11 @@ class ArtifactUploader < CarrierWave::Uploader::Base
...
@@ -9,11 +9,11 @@ class ArtifactUploader < CarrierWave::Uploader::Base
end
end
def
self
.
artifacts_upload_path
def
self
.
artifacts_upload_path
File
.
expand_path
(
'shared/
tmp/artifacts-
uploads/'
,
Rails
.
root
)
File
.
expand_path
(
'shared/
artifacts/tmp/
uploads/'
,
Rails
.
root
)
end
end
def
self
.
artifacts_cache_path
def
self
.
artifacts_cache_path
File
.
expand_path
(
'shared/
tmp/artifacts-
cache/'
,
Rails
.
root
)
File
.
expand_path
(
'shared/
artifacts/tmp/
cache/'
,
Rails
.
root
)
end
end
def
initialize
(
build
,
field
)
def
initialize
(
build
,
field
)
...
...
doc/install/installation.md
View file @
445cdb75
...
@@ -248,8 +248,6 @@ We recommend using a PostgreSQL database. For MySQL check [MySQL setup guide](da
...
@@ -248,8 +248,6 @@ We recommend using a PostgreSQL database. For MySQL check [MySQL setup guide](da
# Change the permissions of the directory where CI artifacts are stored
# Change the permissions of the directory where CI artifacts are stored
sudo chmod -R u+rwX shared/artifacts/
sudo chmod -R u+rwX shared/artifacts/
sudo chmod -R u+rwX shared/tmp/artifacts-uploads/
sudo chmod -R u+rwX shared/tmp/artifacts-cache/
# Copy the example Unicorn config
# Copy the example Unicorn config
sudo -u git -H cp config/unicorn.rb.example config/unicorn.rb
sudo -u git -H cp config/unicorn.rb.example config/unicorn.rb
...
...
lib/api/helpers.rb
View file @
445cdb75
...
@@ -134,7 +134,7 @@ module API
...
@@ -134,7 +134,7 @@ module API
end
end
def
require_gitlab_workhorse!
def
require_gitlab_workhorse!
unless
headers
[
'Gitlab-Git-Http-Server'
].
present?
||
headers
[
'GitLab-Git-HTTP-Server
'
].
present?
unless
env
[
'HTTP_GITLAB_WORKHORSE
'
].
present?
forbidden!
(
'Request should be executed via GitLab Workhorse'
)
forbidden!
(
'Request should be executed via GitLab Workhorse'
)
end
end
end
end
...
...
shared/
tmp/artifacts-
cache/.gitkeep
→
shared/
artifacts/tmp/
cache/.gitkeep
View file @
445cdb75
File moved
shared/
tmp/artifacts-
uploads/.gitkeep
→
shared/
artifacts/tmp/
uploads/.gitkeep
View file @
445cdb75
File moved
spec/requests/ci/api/builds_spec.rb
View file @
445cdb75
...
@@ -132,7 +132,7 @@ describe Ci::API::API do
...
@@ -132,7 +132,7 @@ describe Ci::API::API do
let
(
:post_url
)
{
ci_api
(
"/builds/
#{
build
.
id
}
/artifacts"
)
}
let
(
:post_url
)
{
ci_api
(
"/builds/
#{
build
.
id
}
/artifacts"
)
}
let
(
:delete_url
)
{
ci_api
(
"/builds/
#{
build
.
id
}
/artifacts"
)
}
let
(
:delete_url
)
{
ci_api
(
"/builds/
#{
build
.
id
}
/artifacts"
)
}
let
(
:get_url
)
{
ci_api
(
"/builds/
#{
build
.
id
}
/artifacts"
)
}
let
(
:get_url
)
{
ci_api
(
"/builds/
#{
build
.
id
}
/artifacts"
)
}
let
(
:headers
)
{
{
"Git
lab-Git-Http-Server
"
=>
"1.0"
}
}
let
(
:headers
)
{
{
"Git
Lab-Workhorse
"
=>
"1.0"
}
}
let
(
:headers_with_token
)
{
headers
.
merge
(
Ci
::
API
::
Helpers
::
BUILD_TOKEN_HEADER
=>
build
.
project
.
token
)
}
let
(
:headers_with_token
)
{
headers
.
merge
(
Ci
::
API
::
Helpers
::
BUILD_TOKEN_HEADER
=>
build
.
project
.
token
)
}
describe
"POST /builds/:id/artifacts/authorize"
do
describe
"POST /builds/:id/artifacts/authorize"
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment