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
ddd2b7d5
Commit
ddd2b7d5
authored
Jan 21, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
37673ee7
46b881de
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
39 additions
and
16 deletions
+39
-16
.gitlab-ci.yml
.gitlab-ci.yml
+6
-6
changelogs/unreleased/api-tags-search.yml
changelogs/unreleased/api-tags-search.yml
+5
-0
doc/api/tags.md
doc/api/tags.md
+3
-0
doc/development/testing_guide/review_apps.md
doc/development/testing_guide/review_apps.md
+8
-8
lib/api/tags.rb
lib/api/tags.rb
+5
-2
spec/requests/api/tags_spec.rb
spec/requests/api/tags_spec.rb
+12
-0
No files found.
.gitlab-ci.yml
View file @
ddd2b7d5
...
@@ -555,12 +555,12 @@ setup-test-env:
...
@@ -555,12 +555,12 @@ setup-test-env:
cache
:
{}
cache
:
{}
dependencies
:
[]
dependencies
:
[]
environment
:
&review-environment
environment
:
&review-environment
name
:
review/
mr-${CI_MERGE_REQUEST_IID
}
name
:
review/
${CI_COMMIT_REF_NAME
}
url
:
https://gitlab-
mr-${CI_MERGE_REQUEST_IID
}.${REVIEW_APPS_DOMAIN}
url
:
https://gitlab-
${CI_ENVIRONMENT_SLUG
}.${REVIEW_APPS_DOMAIN}
only
:
only
:
refs
:
refs
:
-
merge_request
s@gitlab-org/gitlab-ce
-
branche
s@gitlab-org/gitlab-ce
-
merge_request
s@gitlab-org/gitlab-ee
-
branche
s@gitlab-org/gitlab-ee
kubernetes
:
active
kubernetes
:
active
except
:
except
:
refs
:
refs
:
...
@@ -1121,8 +1121,8 @@ review-deploy:
...
@@ -1121,8 +1121,8 @@ review-deploy:
allow_failure
:
true
allow_failure
:
true
variables
:
variables
:
GIT_DEPTH
:
"
1"
GIT_DEPTH
:
"
1"
HOST_SUFFIX
:
"
mr-${CI_MERGE_REQUEST_IID
}"
HOST_SUFFIX
:
"
${CI_ENVIRONMENT_SLUG
}"
DOMAIN
:
"
-
mr-${CI_MERGE_REQUEST_IID
}.${REVIEW_APPS_DOMAIN}"
DOMAIN
:
"
-
${CI_ENVIRONMENT_SLUG
}.${REVIEW_APPS_DOMAIN}"
GITLAB_HELM_CHART_REF
:
"
master"
GITLAB_HELM_CHART_REF
:
"
master"
API_TOKEN
:
"
${GITLAB_BOT_MULTI_PROJECT_PIPELINE_POLLING_TOKEN}"
API_TOKEN
:
"
${GITLAB_BOT_MULTI_PROJECT_PIPELINE_POLLING_TOKEN}"
environment
:
environment
:
...
...
changelogs/unreleased/api-tags-search.yml
0 → 100644
View file @
ddd2b7d5
---
title
:
'
API:
Support
searching
for
tags'
merge_request
:
24385
author
:
Robert Schilling
type
:
added
doc/api/tags.md
View file @
ddd2b7d5
...
@@ -17,6 +17,9 @@ Parameters:
...
@@ -17,6 +17,9 @@ Parameters:
|
`id`
| integer/string| yes | The ID or
[
URL-encoded path of the project
](
README.md#namespaced-path-encoding
)
owned by the authenticated user|
|
`id`
| integer/string| yes | The ID or
[
URL-encoded path of the project
](
README.md#namespaced-path-encoding
)
owned by the authenticated user|
|
`order_by`
| string | no | Return tags ordered by
`name`
or
`updated`
fields. Default is
`updated`
|
|
`order_by`
| string | no | Return tags ordered by
`name`
or
`updated`
fields. Default is
`updated`
|
|
`sort`
| string | no | Return tags sorted in
`asc`
or
`desc`
order. Default is
`desc`
|
|
`sort`
| string | no | Return tags sorted in
`asc`
or
`desc`
order. Default is
`desc`
|
|
`search`
| string | no | Return list of tags matching the search criteria |
> Support for `search` was [introduced](https://gitlab.com/gitlab-org/gitlab-ce/issues/54401) in GitLab 11.8.
```
json
```
json
[
[
...
...
doc/development/testing_guide/review_apps.md
View file @
ddd2b7d5
...
@@ -74,27 +74,27 @@ Note that both jobs first wait for the `review-deploy` job to be finished.
...
@@ -74,27 +74,27 @@ Note that both jobs first wait for the `review-deploy` job to be finished.
### Run a Rails console?
### Run a Rails console?
1.
[
Filter Workloads by your Review App slug
](
https://console.cloud.google.com/kubernetes/workload?project=gitlab-review-apps
)
1.
[
Filter Workloads by your Review App slug
](
https://console.cloud.google.com/kubernetes/workload?project=gitlab-review-apps
)
, e.g.
`review-
mr-24388-314997
`
.
, e.g.
`review-
29951-issu-id2qax
`
.
1.
Find and open the
`task-runner`
Deployment, e.g.
`review-
mr-24388-314997
-task-runner`
.
1.
Find and open the
`task-runner`
Deployment, e.g.
`review-
29951-issu-id2qax
-task-runner`
.
1.
Click on the Pod in the "Managed pods" section, e.g.
`review-
mr-24388-314997
-task-runner-d5455cc8-2lsvz`
.
1.
Click on the Pod in the "Managed pods" section, e.g.
`review-
29951-issu-id2qax
-task-runner-d5455cc8-2lsvz`
.
1.
Click on the
`KUBECTL`
dropdown, then
`Exec`
->
`task-runner`
.
1.
Click on the
`KUBECTL`
dropdown, then
`Exec`
->
`task-runner`
.
1.
Replace
`-c task-runner -- ls`
with
`-- /srv/gitlab/bin/rails c`
from the
1.
Replace
`-c task-runner -- ls`
with
`-- /srv/gitlab/bin/rails c`
from the
default command or
default command or
-
Run
`kubectl exec --namespace review-apps-ce -it review-
mr-24388-314997
-task-runner-d5455cc8-2lsvz -- /srv/gitlab/bin/rails c`
-
Run
`kubectl exec --namespace review-apps-ce -it review-
29951-issu-id2qax
-task-runner-d5455cc8-2lsvz -- /srv/gitlab/bin/rails c`
and
and
-
Replace
`review-apps-ce`
with
`review-apps-ee`
if the Review App
-
Replace
`review-apps-ce`
with
`review-apps-ee`
if the Review App
is running EE, and
is running EE, and
-
Replace
`review-
mr-24388-314997
-task-runner-d5455cc8-2lsvz`
-
Replace
`review-
29951-issu-id2qax
-task-runner-d5455cc8-2lsvz`
with your Pod's name.
with your Pod's name.
### Dig into a Pod's logs?
### Dig into a Pod's logs?
1.
[
Filter Workloads by your Review App slug
](
https://console.cloud.google.com/kubernetes/workload?project=gitlab-review-apps
)
1.
[
Filter Workloads by your Review App slug
](
https://console.cloud.google.com/kubernetes/workload?project=gitlab-review-apps
)
, e.g.
`review-
mr-24388-314997
`
.
, e.g.
`review-
1979-1-mul-dnvlhv
`
.
1.
Find and open the
`migrations`
Deployment, e.g.
1.
Find and open the
`migrations`
Deployment, e.g.
`review-
mr-24388-314997
-migrations.1`
.
`review-
1979-1-mul-dnvlhv
-migrations.1`
.
1.
Click on the Pod in the "Managed pods" section, e.g.
1.
Click on the Pod in the "Managed pods" section, e.g.
`review-
mr-24388-314997
-migrations.1-nqwtx`
.
`review-
1979-1-mul-dnvlhv
-migrations.1-nqwtx`
.
1.
Click on the
`Container logs`
link.
1.
Click on the
`Container logs`
link.
## Frequently Asked Questions
## Frequently Asked Questions
...
...
lib/api/tags.rb
View file @
ddd2b7d5
...
@@ -20,12 +20,15 @@ module API
...
@@ -20,12 +20,15 @@ module API
desc:
'Return tags sorted in updated by `asc` or `desc` order.'
desc:
'Return tags sorted in updated by `asc` or `desc` order.'
optional
:order_by
,
type:
String
,
values:
%w[name updated]
,
default:
'updated'
,
optional
:order_by
,
type:
String
,
values:
%w[name updated]
,
default:
'updated'
,
desc:
'Return tags ordered by `name` or `updated` fields.'
desc:
'Return tags ordered by `name` or `updated` fields.'
optional
:search
,
type:
String
,
desc:
'Return list of tags matching the search criteria'
use
:pagination
use
:pagination
end
end
get
':id/repository/tags'
do
get
':id/repository/tags'
do
tags
=
::
Kaminari
.
paginate_array
(
::
TagsFinder
.
new
(
user_project
.
repository
,
sort:
"
#{
params
[
:order_by
]
}
_
#{
params
[
:sort
]
}
"
).
execute
)
tags
=
::
TagsFinder
.
new
(
user_project
.
repository
,
sort:
"
#{
params
[
:order_by
]
}
_
#{
params
[
:sort
]
}
"
,
search:
params
[
:search
]).
execute
present
paginate
(
tags
),
with:
Entities
::
Tag
,
project:
user_project
present
paginate
(
::
Kaminari
.
paginate_array
(
tags
)
),
with:
Entities
::
Tag
,
project:
user_project
end
end
desc
'Get a single repository tag'
do
desc
'Get a single repository tag'
do
...
...
spec/requests/api/tags_spec.rb
View file @
ddd2b7d5
...
@@ -54,6 +54,18 @@ describe API::Tags do
...
@@ -54,6 +54,18 @@ describe API::Tags do
end
end
end
end
context
'searching'
do
it
'only returns searched tags'
do
get
api
(
"
#{
route
}
"
,
user
),
params:
{
search:
'v1.1.0'
}
expect
(
response
).
to
have_gitlab_http_status
(
200
)
expect
(
response
).
to
include_pagination_headers
expect
(
json_response
).
to
be_an
Array
expect
(
json_response
.
size
).
to
eq
(
1
)
expect
(
json_response
[
0
][
'name'
]).
to
eq
(
'v1.1.0'
)
end
end
shared_examples_for
'repository tags'
do
shared_examples_for
'repository tags'
do
it
'returns the repository tags'
do
it
'returns the repository tags'
do
get
api
(
route
,
current_user
)
get
api
(
route
,
current_user
)
...
...
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