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
7d19df2d
Commit
7d19df2d
authored
Feb 04, 2020
by
GitLab Bot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add latest changes from gitlab-org/gitlab@master
parent
cebee31a
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
172 additions
and
40 deletions
+172
-40
.gitlab/ci/frontend.gitlab-ci.yml
.gitlab/ci/frontend.gitlab-ci.yml
+32
-14
changelogs/unreleased/23140-productivity-analytics-limit-graph-scales-to-whole-numbers.yml
...ctivity-analytics-limit-graph-scales-to-whole-numbers.yml
+5
-0
changelogs/unreleased/33128-cannot-find-projects-within-subgroups-when-you-select-a-top-level-g.yml
...ojects-within-subgroups-when-you-select-a-top-level-g.yml
+5
-0
changelogs/unreleased/rs-scheduled-pipeline-play-api.yml
changelogs/unreleased/rs-scheduled-pipeline-play-api.yml
+5
-0
doc/api/pipeline_schedules.md
doc/api/pipeline_schedules.md
+30
-0
lib/api/pipeline_schedules.rb
lib/api/pipeline_schedules.rb
+19
-0
spec/frontend/issue_show/mock_data.js
spec/frontend/issue_show/mock_data.js
+23
-0
spec/javascripts/issue_show/components/app_spec.js
spec/javascripts/issue_show/components/app_spec.js
+2
-2
spec/javascripts/issue_show/mock_data.js
spec/javascripts/issue_show/mock_data.js
+1
-24
spec/requests/api/pipeline_schedules_spec.rb
spec/requests/api/pipeline_schedules_spec.rb
+50
-0
No files found.
.gitlab/ci/frontend.gitlab-ci.yml
View file @
7d19df2d
...
...
@@ -38,7 +38,7 @@
-
"
doc/README.md"
# Some RSpec test rely on this file
# Make sure to update all the similar patterns in other CI config files if you modify these patterns
.code-backstage-
patterns-qa
:
&code-backstage-patterns-qa
.code-backstage-
qa-patterns
:
&code-backstage-qa-patterns
-
"
.gitlab/ci/**/*"
-
"
.{eslintignore,gitattributes,nvmrc,prettierrc,stylelintrc,yamllint}"
-
"
.{codeclimate,eslintrc,gitlab-ci,haml-lint,haml-lint_todo,rubocop,rubocop_todo,scss-lint}.yml"
...
...
@@ -118,7 +118,7 @@ gitlab:assets:compile pull-push-cache:
-
<<
:
*if-not-canonical-namespace
when
:
never
-
<<
:
*if-master-refs
changes
:
*code-backstage-
patterns-qa
changes
:
*code-backstage-
qa-patterns
when
:
on_success
cache
:
policy
:
pull-push
...
...
@@ -129,7 +129,7 @@ gitlab:assets:compile pull-cache:
-
<<
:
*if-not-canonical-namespace
when
:
never
-
<<
:
*if-default-refs
changes
:
*code-backstage-
patterns-qa
changes
:
*code-backstage-
qa-patterns
when
:
on_success
cache
:
policy
:
pull
...
...
@@ -163,7 +163,7 @@ compile-assets pull-push-cache:
extends
:
.compile-assets-metadata
rules
:
-
<<
:
*if-master-refs
changes
:
*code-backstage-
patterns-qa
changes
:
*code-backstage-
qa-patterns
when
:
on_success
cache
:
policy
:
pull-push
...
...
@@ -176,7 +176,7 @@ compile-assets pull-push-cache foss:
-
<<
:
*if-not-ee
when
:
never
-
<<
:
*if-master-refs
changes
:
*code-backstage-
patterns-qa
changes
:
*code-backstage-
qa-patterns
when
:
on_success
cache
:
policy
:
pull-push
...
...
@@ -186,7 +186,7 @@ compile-assets pull-cache:
extends
:
.compile-assets-metadata
rules
:
-
<<
:
*if-default-refs
changes
:
*code-backstage-
patterns-qa
changes
:
*code-backstage-
qa-patterns
when
:
on_success
cache
:
policy
:
pull
...
...
@@ -199,26 +199,24 @@ compile-assets pull-cache foss:
-
<<
:
*if-not-ee
when
:
never
-
<<
:
*if-default-refs
changes
:
*code-backstage-
patterns-qa
changes
:
*code-backstage-
qa-patterns
when
:
on_success
cache
:
policy
:
pull
key
:
"
assets-compile:v8:foss"
.
only-code-
frontend-job-base
:
.frontend-job-base
:
extends
:
-
.default-tags
-
.default-retry
-
.default-cache
-
.default-only
-
.default-before_script
-
.only:changes-code-backstage
-
.use-pg9
stage
:
test
needs
:
[
"
setup-test-env"
,
"
compile-assets
pull-cache"
]
.karma-base
:
extends
:
.
only-code-
frontend-job-base
extends
:
.frontend-job-base
variables
:
# we override the max_old_space_size to prevent OOM errors
NODE_OPTIONS
:
--max_old_space_size=3584
...
...
@@ -231,6 +229,10 @@ compile-assets pull-cache foss:
karma
:
extends
:
.karma-base
rules
:
-
<<
:
*if-default-refs
changes
:
*code-backstage-patterns
when
:
on_success
coverage
:
'
/^Statements
*:
(\d+\.\d+%)/'
artifacts
:
name
:
coverage-javascript
...
...
@@ -246,10 +248,16 @@ karma:
karma-foss
:
extends
:
-
.karma-base
-
.only-ee-as-if-foss
-
.as-if-foss
rules
:
-
<<
:
*if-not-ee
when
:
never
-
<<
:
*if-default-refs
changes
:
*code-backstage-patterns
when
:
on_success
.jest-base
:
extends
:
.
only-code-
frontend-job-base
extends
:
.frontend-job-base
script
:
-
scripts/gitaly-test-spawn
-
date
...
...
@@ -264,6 +272,10 @@ karma-foss:
jest
:
extends
:
.jest-base
rules
:
-
<<
:
*if-default-refs
changes
:
*code-backstage-patterns
when
:
on_success
artifacts
:
name
:
coverage-frontend
expire_in
:
31d
...
...
@@ -278,7 +290,13 @@ jest:
jest-foss
:
extends
:
-
.jest-base
-
.only-ee-as-if-foss
-
.as-if-foss
rules
:
-
<<
:
*if-not-ee
when
:
never
-
<<
:
*if-default-refs
changes
:
*code-backstage-patterns
when
:
on_success
cache
:
policy
:
pull
...
...
changelogs/unreleased/23140-productivity-analytics-limit-graph-scales-to-whole-numbers.yml
0 → 100644
View file @
7d19df2d
---
title
:
Limit productivity analytics graph y-axis scale to whole numbers
merge_request
:
23140
author
:
type
:
fixed
changelogs/unreleased/33128-cannot-find-projects-within-subgroups-when-you-select-a-top-level-g.yml
0 → 100644
View file @
7d19df2d
---
title
:
Query projects of subgroups in productivity analytics
merge_request
:
24335
author
:
type
:
fixed
changelogs/unreleased/rs-scheduled-pipeline-play-api.yml
0 → 100644
View file @
7d19df2d
---
title
:
Add API to "Play" a scheduled pipeline immediately
merge_request
:
23718
author
:
type
:
added
doc/api/pipeline_schedules.md
View file @
7d19df2d
...
...
@@ -279,6 +279,36 @@ curl --request DELETE --header "PRIVATE-TOKEN: k5ESFgWY2Qf5xEvDcFxZ" "https://gi
}
```
## Run a scheduled pipeline immediately
> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/201786) in GitLab 12.8.
Trigger a new scheduled pipeline, which runs immediately. The next scheduled run
of this pipeline is not affected.
```
text
POST /projects/:id/pipeline_schedules/:pipeline_schedule_id/play
```
| Attribute | Type | required | Description |
| ---------------- | --------- | ---------- | -------------------------- |
|
`id`
| integer/string | yes | The ID or
[
URL-encoded path of the project
](
README.md#namespaced-path-encoding
)
owned by the authenticated user |
|
`pipeline_schedule_id`
| integer | yes | The pipeline schedule id |
Example request:
```
sh
curl
--request
POST
--header
"PRIVATE-TOKEN: <your_access_token>"
'https://gitlab.example.com/api/v4/projects/42/pipeline_schedules/1/play
```
Example response:
```
json
{
"message"
:
"201 Created"
}
```
## Pipeline schedule variables
> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/issues/34518) in GitLab 10.0.
...
...
lib/api/pipeline_schedules.rb
View file @
7d19df2d
...
...
@@ -111,6 +111,25 @@ module API
destroy_conditionally!
(
pipeline_schedule
)
end
desc
'Play a scheduled pipeline immediately'
do
detail
'This feature was added in GitLab 12.8'
end
params
do
requires
:pipeline_schedule_id
,
type:
Integer
,
desc:
'The pipeline schedule id'
end
post
':id/pipeline_schedules/:pipeline_schedule_id/play'
do
authorize!
:play_pipeline_schedule
,
pipeline_schedule
job_id
=
RunPipelineScheduleWorker
.
perform_async
(
pipeline_schedule
.
id
,
current_user
.
id
)
if
job_id
created!
else
render_api_error!
(
'Unable to schedule pipeline run immediately'
,
500
)
end
end
desc
'Create a new pipeline schedule variable'
do
success
Entities
::
Variable
end
...
...
spec/frontend/issue_show/mock_data.js
0 → 100644
View file @
7d19df2d
export
const
initialRequest
=
{
title
:
'
<p>this is a title</p>
'
,
title_text
:
'
this is a title
'
,
description
:
'
<p>this is a description!</p>
'
,
description_text
:
'
this is a description
'
,
task_status
:
'
2 of 4 completed
'
,
updated_at
:
'
2015-05-15T12:31:04.428Z
'
,
updated_by_name
:
'
Some User
'
,
updated_by_path
:
'
/some_user
'
,
lock_version
:
1
,
};
export
const
secondRequest
=
{
title
:
'
<p>2</p>
'
,
title_text
:
'
2
'
,
description
:
'
<p>42</p>
'
,
description_text
:
'
42
'
,
task_status
:
'
0 of 0 completed
'
,
updated_at
:
'
2016-05-15T12:31:04.428Z
'
,
updated_by_name
:
'
Other User
'
,
updated_by_path
:
'
/other_user
'
,
lock_version
:
2
,
};
spec/javascripts/issue_show/components/app_spec.js
View file @
7d19df2d
...
...
@@ -7,13 +7,13 @@ import axios from '~/lib/utils/axios_utils';
import
'
~/behaviors/markdown/render_gfm
'
;
import
issuableApp
from
'
~/issue_show/components/app.vue
'
;
import
eventHub
from
'
~/issue_show/event_hub
'
;
import
issueShowData
from
'
../mock_data
'
;
import
{
initialRequest
,
secondRequest
}
from
'
../mock_data
'
;
function
formatText
(
text
)
{
return
text
.
trim
().
replace
(
/
\s\s
+/g
,
'
'
);
}
const
REALTIME_REQUEST_STACK
=
[
i
ssueShowData
.
initialRequest
,
issueShowData
.
secondRequest
];
const
REALTIME_REQUEST_STACK
=
[
i
nitialRequest
,
secondRequest
];
describe
(
'
Issuable output
'
,
()
=>
{
let
mock
;
...
...
spec/javascripts/issue_show/mock_data.js
View file @
7d19df2d
export
default
{
initialRequest
:
{
title
:
'
<p>this is a title</p>
'
,
title_text
:
'
this is a title
'
,
description
:
'
<p>this is a description!</p>
'
,
description_text
:
'
this is a description
'
,
task_status
:
'
2 of 4 completed
'
,
updated_at
:
'
2015-05-15T12:31:04.428Z
'
,
updated_by_name
:
'
Some User
'
,
updated_by_path
:
'
/some_user
'
,
lock_version
:
1
,
},
secondRequest
:
{
title
:
'
<p>2</p>
'
,
title_text
:
'
2
'
,
description
:
'
<p>42</p>
'
,
description_text
:
'
42
'
,
task_status
:
'
0 of 0 completed
'
,
updated_at
:
'
2016-05-15T12:31:04.428Z
'
,
updated_by_name
:
'
Other User
'
,
updated_by_path
:
'
/other_user
'
,
lock_version
:
2
,
},
};
export
*
from
'
../../frontend/issue_show/mock_data
'
;
spec/requests/api/pipeline_schedules_spec.rb
View file @
7d19df2d
...
...
@@ -322,6 +322,56 @@ describe API::PipelineSchedules do
end
end
describe
'POST /projects/:id/pipeline_schedules/:pipeline_schedule_id/play'
do
let_it_be
(
:pipeline_schedule
)
{
create
(
:ci_pipeline_schedule
,
project:
project
)
}
let
(
:route
)
{
->
(
id
)
{
"/projects/
#{
project
.
id
}
/pipeline_schedules/
#{
id
}
/play"
}
}
context
'authenticated user with `:play_pipeline_schedule` permission'
do
it
'schedules a pipeline worker'
do
project
.
add_developer
(
developer
)
expect
(
RunPipelineScheduleWorker
)
.
to
receive
(
:perform_async
)
.
with
(
pipeline_schedule
.
id
,
developer
.
id
)
.
and_call_original
post
api
(
route
[
pipeline_schedule
.
id
],
developer
)
expect
(
response
).
to
have_gitlab_http_status
(
:created
)
end
it
'renders an error if scheduling failed'
do
project
.
add_developer
(
developer
)
expect
(
RunPipelineScheduleWorker
)
.
to
receive
(
:perform_async
)
.
with
(
pipeline_schedule
.
id
,
developer
.
id
)
.
and_return
(
nil
)
post
api
(
route
[
pipeline_schedule
.
id
],
developer
)
expect
(
response
).
to
have_gitlab_http_status
(
:internal_server_error
)
end
end
context
'authenticated user with insufficient access'
do
it
'responds with not found'
do
project
.
add_guest
(
user
)
post
api
(
route
[
pipeline_schedule
.
id
],
user
)
expect
(
response
).
to
have_gitlab_http_status
(
:not_found
)
end
end
context
'unauthenticated user'
do
it
'responds with unauthorized'
do
post
api
(
route
[
pipeline_schedule
.
id
])
expect
(
response
).
to
have_gitlab_http_status
(
:unauthorized
)
end
end
end
describe
'POST /projects/:id/pipeline_schedules/:pipeline_schedule_id/variables'
do
let
(
:params
)
{
attributes_for
(
:ci_pipeline_schedule_variable
)
}
...
...
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