Grzegorz Bizon
cf00a808cc
Fix specs for artifacts metadata after changing fixture content
2016-01-14 12:48:16 +01:00
Grzegorz Bizon
cde455c4e6
Add encoding feature tests for builds artifacts browser
2016-01-14 12:48:16 +01:00
Grzegorz Bizon
487b0a026f
Improvements, readability for artifacts browser
2016-01-14 12:48:16 +01:00
Grzegorz Bizon
2be76355ca
Support only valid UTF-8 paths in build artifacts browser
2016-01-14 12:48:16 +01:00
Grzegorz Bizon
ffee05c242
Improve invalid build artifacts metadata path matcher
2016-01-14 12:48:16 +01:00
Grzegorz Bizon
f80d7a868e
Update build model specs
2016-01-14 12:48:16 +01:00
Grzegorz Bizon
94cf759001
Attach download action to artifacts file in ZIP archive
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
Grzegorz Bizon
09a4a5aff8
Render only valid paths in artifacts metadata
...
In this version we will support only relative paths in artifacts
metadata. Support for absolute paths will be introduced later.
2016-01-14 12:48:16 +01:00
Grzegorz Bizon
61fb47a432
Simplify implementation of build artifacts browser (refactoring)
2016-01-14 12:48:15 +01:00
Grzegorz Bizon
387b27813d
Change format of artifacts metadata from text to binary 0.0.1
...
This changes the format of metadata to handle paths, that may contain
whitespace characters, new line characters and non-UTF-8 characters.
Now those paths along with metadata in JSON format are stored as
length-prefixed strings (uint32 prefix).
Metadata file has a custom format:
1. First string field is metadata version field (string)
2. Second string field is metadata errors field (JSON strong)
3. All subsequent fields is pair of path (string) and path metadata
in JSON format.
Path's metadata contains all fields that where possible to extract from
ZIP archive like date of modification, CRC, compressed size,
uncompressed size and comment.
2016-01-14 12:48:15 +01:00
Grzegorz Bizon
09c82c6fdc
Add spinach feature specs for build artifacts browser
2016-01-14 12:48:15 +01:00
Grzegorz Bizon
cfffc9eff2
Update build specs for artifacts browser support
2016-01-14 12:48:15 +01:00
Grzegorz Bizon
e5d2a81b86
Add basic spinach tests for project builds
2016-01-14 12:48:15 +01:00
Grzegorz Bizon
1b1793c253
Show file size in artifacts browser using metadata
2016-01-14 12:48:15 +01:00
Grzegorz Bizon
cd3b8bbd2f
Add method that checks if path exists in StringPath
2016-01-14 12:48:15 +01:00
Grzegorz Bizon
a5e1905d28
Render 404 when artifacts path is invalid
2016-01-14 12:48:15 +01:00
Grzegorz Bizon
f948c00757
Do not depend on universe when checking parent in StringPath
2016-01-14 12:48:15 +01:00
Grzegorz Bizon
a7f99b67a0
Extract artifacts metadata implementation to separate class
2016-01-14 12:48:15 +01:00
Grzegorz Bizon
df41148662
Improve path sanitization in StringPath
2016-01-14 12:48:15 +01:00
Grzegorz Bizon
a3191463b6
Add path sanitization to StringPath
...
[ci skip]
2016-01-14 12:48:15 +01:00
Grzegorz Bizon
3de8a4620a
Parse artifacts metadata stored in JSON format
2016-01-14 12:48:15 +01:00
Grzegorz Bizon
447f56036e
Use metadata stored in artifacats metadata file
2016-01-14 12:48:14 +01:00
Grzegorz Bizon
e3ef0ac8f4
Update artifacts metadata fixture
2016-01-14 12:48:14 +01:00
Grzegorz Bizon
ad5302ba15
Seed db on development with artifacts metadata fixture
2016-01-14 12:48:14 +01:00
Grzegorz Bizon
662f4b9e1d
Add artifacts metadata uploader filed
...
Artifacts metadata field will be used to store a filename of gzipped
file containing metadata definition for given artifacts archive.
2016-01-14 12:48:14 +01:00
Grzegorz Bizon
c177784d5a
Use short method call in StringPath instead block
2016-01-14 12:48:14 +01:00
Grzegorz Bizon
c33b105f11
Make some conditions in Ci::Build more readable
2016-01-14 12:48:14 +01:00
Grzegorz Bizon
ece114e630
Update artifacts download specs
2016-01-14 12:48:14 +01:00
Grzegorz Bizon
5ff7ec42dc
Add method that checks if artifacts browser is supported
...
This is needed because of backward compatibility. Previously artifacts
archive had `.tar.gz` format, but artifacts browser requires ZIP format
now.
2016-01-14 12:48:14 +01:00
Grzegorz Bizon
8eeed761a9
Update specs for CI Build, add artifacts? method
...
`artifacts?` method checks if artifacts archive is available.
2016-01-14 12:48:14 +01:00
Grzegorz Bizon
9e0e9342a4
Rename method that returns url to CI build artifacts download
2016-01-14 12:48:14 +01:00
Grzegorz Bizon
612ab584bf
Mix url_helpers into Ci::Build
2016-01-14 12:48:14 +01:00
Grzegorz Bizon
d8cc9e4ef7
Add button to CI build artifacts browser into build summary
2016-01-14 12:48:14 +01:00
Grzegorz Bizon
87df1df3cd
Seed db with CI build artifacts using a zip archive
2016-01-14 12:48:13 +01:00
Grzegorz Bizon
ebd69c5fc1
Remove artifacts metadata column from database
2016-01-14 12:48:13 +01:00
Grzegorz Bizon
304c39b6dc
Fix rubocop offenses in StringPath specs
2016-01-14 12:48:13 +01:00
Grzegorz Bizon
1cc26e0f0e
Improve performance of StringPath
2016-01-14 12:48:13 +01:00
Grzegorz Bizon
bd4899befe
Disable :format in artifacts browser path
2016-01-14 12:48:13 +01:00
Grzegorz Bizon
b19e958d86
Add support for parent directories in StringPath
...
This support is not completed though, as parent directory that is first
in collection returned by `directories!` is not iterable yet.
2016-01-14 12:48:13 +01:00
Grzegorz Bizon
aae674c3a2
Improve CI build artifacts browser view
2016-01-14 12:48:13 +01:00
Grzegorz Bizon
5a1faf61f6
Add artifacts browser
...
This implementation makes it possible to browse artifacts, it
depends on artifacts metadata.
2016-01-14 12:48:13 +01:00
Grzegorz Bizon
37b2c5dd55
Add support for root path for StringPath
2016-01-14 12:48:13 +01:00
Grzegorz Bizon
d382335dcd
Add implementation of remaining methods in StringPath
2016-01-14 12:48:13 +01:00
Grzegorz Bizon
c184eeb848
Improve StringPath specs (DRY)
2016-01-14 12:48:13 +01:00
Grzegorz Bizon
518b206287
Add parent iteration implementation to StringPath
2016-01-14 12:48:13 +01:00
Grzegorz Bizon
80a71576ba
Use Gitlab::StringPath in CI build artifacts controller
2016-01-14 12:48:13 +01:00
Grzegorz Bizon
73d2c7a553
Add new methods to StringPath
2016-01-14 12:48:12 +01:00
Grzegorz Bizon
f5d5308658
Add implementation of StringPath class
...
`StringPath` class is something similar to Ruby's `Pathname` class,
but does not involve any IO operations. `StringPath` objects require
passing string representation of path, and array of paths that
represents universe to constructor to be intantiated.
2016-01-14 12:48:12 +01:00
Grzegorz Bizon
f091272f19
Move artifacts controller level up
...
This reverts nesting artifacts controller in builds module.
2016-01-14 12:48:12 +01:00