Commit Graph

20 Commits

Author SHA1 Message Date
GitLab Bot aa542224bb Add latest changes from gitlab-org/gitlab@master 2019-11-04 15:07:36 +00:00
GitLab Bot 00c78fb814 Add latest changes from gitlab-org/gitlab@master 2019-10-16 15:06:17 +00:00
Stan Hu a40116065e Support Docker OCI images
Docker Distribution v2.7.0 shipped with OCI support, but our container
registry client was not updated to handle the manifest format in the
HTTP `Accept` header.  As a result, API calls to retrieve a manifest
would return with an error, "OCI manifest found, but accept header does
not support OCI manifests". This would result in blank fields in the
container registry page and prevent tags from being deleted.

To fix this, we just need to add
`application/vnd.oci.image.manifest.v1+json` to the `Accept` header and
configure Faraday to parse the response as JSON. The response structure
is the same as the standard Docker Distribution V2 manifest.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/58685

Closes https://gitlab.com/gitlab-org/gitlab-ee/issues/12877
2019-07-25 04:11:38 -07:00
Thong Kuah a2cfc150ce Add # frozen_string_literal to spec/models
Adds `# frozen_string_literal: true` to spec/models ruby files
2019-04-01 14:37:54 +13:00
Gabriel Mazetto 8f178c4222 Prevent new / renamed project from using a repository path that already exists on disk
There are some redundancies in the validation steps, and that is to
preserve current error messages behavior

Also few specs have to be changed in order to fix madness in validation
logic.
2017-08-25 20:06:06 +02:00
Robert Speicher 9513bd18c4 Ensure all project factories use `:repository` trait or `:empty_project` 2017-08-01 14:51:52 -04:00
Grzegorz Bizon b5b6c7b175 Sanitize container repository path in model class 2017-04-13 11:54:02 +02:00
Grzegorz Bizon 046f4086e4 Improve test examples for container repository class 2017-04-10 13:01:10 +02:00
Grzegorz Bizon 5fbeb73a76 Add method that returns a registry repository location 2017-04-10 12:57:19 +02:00
Grzegorz Bizon 163e9f99ab Fix indexes in container repositories table 2017-04-06 17:34:19 +02:00
Grzegorz Bizon cb2ce8452f Remove legacy registry tags when deleting a project 2017-04-04 12:57:38 +02:00
Grzegorz Bizon 0af4cbc572 Simplify container repository build method specs 2017-04-03 13:05:46 +02:00
Grzegorz Bizon fd30b3d497 Ensure root container repository when visiting registry
Root container repository is a images repository that had been created
before 9.1, before we introduced multi-level images support.
2017-04-03 13:03:16 +02:00
Grzegorz Bizon 6fefa79430 Validate uniqueness of container repository name 2017-04-03 11:51:13 +02:00
Grzegorz Bizon 01280a5ad5 Add missing test example for container repository tags 2017-04-03 10:57:12 +02:00
Grzegorz Bizon 60cdd2bcc8 Add specs for container repository factory method 2017-03-31 12:27:05 +02:00
Grzegorz Bizon a7466af3a6 Improve code related to removing container image tags 2017-03-31 11:54:09 +02:00
Grzegorz Bizon f09e3fe851 Add a few pending specs for container repository 2017-03-27 16:04:38 +02:00
Grzegorz Bizon 3e01fed5cb Fix Rubocop offenses in container repository code 2017-03-23 14:57:33 +01:00
Grzegorz Bizon f451173a19 Fix specs for container repository model class 2017-03-23 14:37:17 +01:00