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
8f764d21
Commit
8f764d21
authored
Dec 05, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add latest changes from gitlab-org/gitlab@master
parent
f7ead776
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
90 additions
and
5 deletions
+90
-5
changelogs/unreleased/20709-add-runner-info-in-build-event.yaml
...logs/unreleased/20709-add-runner-info-in-build-event.yaml
+5
-0
db/migrate/20191119220425_rename_software_license_policies_approval_status_to_classification.rb
...are_license_policies_approval_status_to_classification.rb
+17
-0
db/post_migrate/20191119221041_cleanup_software_license_policies_classification_rename.rb
...leanup_software_license_policies_classification_rename.rb
+17
-0
db/schema.rb
db/schema.rb
+1
-1
doc/user/project/integrations/webhooks.md
doc/user/project/integrations/webhooks.md
+9
-0
lib/gitlab/data_builder/build.rb
lib/gitlab/data_builder/build.rb
+14
-0
locale/gitlab.pot
locale/gitlab.pot
+21
-3
spec/lib/gitlab/data_builder/build_spec.rb
spec/lib/gitlab/data_builder/build_spec.rb
+6
-1
No files found.
changelogs/unreleased/20709-add-runner-info-in-build-event.yaml
0 → 100644
View file @
8f764d21
---
title
:
Add runner information in build web hook event
merge_request
:
20709
author
:
Gaetan Semet
type
:
added
db/migrate/20191119220425_rename_software_license_policies_approval_status_to_classification.rb
0 → 100644
View file @
8f764d21
# frozen_string_literal: true
class
RenameSoftwareLicensePoliciesApprovalStatusToClassification
<
ActiveRecord
::
Migration
[
5.2
]
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
disable_ddl_transaction!
def
up
rename_column_concurrently
:software_license_policies
,
:approval_status
,
:classification
end
def
down
undo_rename_column_concurrently
:software_license_policies
,
:approval_status
,
:classification
end
end
db/post_migrate/20191119221041_cleanup_software_license_policies_classification_rename.rb
0 → 100644
View file @
8f764d21
# frozen_string_literal: true
class
CleanupSoftwareLicensePoliciesClassificationRename
<
ActiveRecord
::
Migration
[
5.2
]
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
disable_ddl_transaction!
def
up
cleanup_concurrent_column_rename
:software_license_policies
,
:approval_status
,
:classification
end
def
down
undo_cleanup_concurrent_column_rename
:software_license_policies
,
:approval_status
,
:classification
end
end
db/schema.rb
View file @
8f764d21
...
@@ -3673,7 +3673,7 @@ ActiveRecord::Schema.define(version: 2019_12_02_031812) do
...
@@ -3673,7 +3673,7 @@ ActiveRecord::Schema.define(version: 2019_12_02_031812) do
create_table
"software_license_policies"
,
id: :serial
,
force: :cascade
do
|
t
|
create_table
"software_license_policies"
,
id: :serial
,
force: :cascade
do
|
t
|
t
.
integer
"project_id"
,
null:
false
t
.
integer
"project_id"
,
null:
false
t
.
integer
"software_license_id"
,
null:
false
t
.
integer
"software_license_id"
,
null:
false
t
.
integer
"
approval_status
"
,
default:
0
,
null:
false
t
.
integer
"
classification
"
,
default:
0
,
null:
false
t
.
index
[
"project_id"
,
"software_license_id"
],
name:
"index_software_license_policies_unique_per_project"
,
unique:
true
t
.
index
[
"project_id"
,
"software_license_id"
],
name:
"index_software_license_policies_unique_per_project"
,
unique:
true
t
.
index
[
"software_license_id"
],
name:
"index_software_license_policies_on_software_license_id"
t
.
index
[
"software_license_id"
],
name:
"index_software_license_policies_on_software_license_id"
end
end
...
...
doc/user/project/integrations/webhooks.md
View file @
8f764d21
...
@@ -1223,6 +1223,7 @@ X-Gitlab-Event: Job Hook
...
@@ -1223,6 +1223,7 @@ X-Gitlab-Event: Job Hook
"build_duration"
:
null
,
"build_duration"
:
null
,
"build_allow_failure"
:
false
,
"build_allow_failure"
:
false
,
"build_failure_reason"
:
"script_failure"
,
"build_failure_reason"
:
"script_failure"
,
"pipeline_id"
:
2366
,
"project_id"
:
380
,
"project_id"
:
380
,
"project_name"
:
"gitlab-org/gitlab-test"
,
"project_name"
:
"gitlab-org/gitlab-test"
,
"user"
:
{
"user"
:
{
...
@@ -1248,10 +1249,18 @@ X-Gitlab-Event: Job Hook
...
@@ -1248,10 +1249,18 @@ X-Gitlab-Event: Job Hook
"git_ssh_url"
:
"git@192.168.64.1:gitlab-org/gitlab-test.git"
,
"git_ssh_url"
:
"git@192.168.64.1:gitlab-org/gitlab-test.git"
,
"git_http_url"
:
"http://192.168.64.1:3005/gitlab-org/gitlab-test.git"
,
"git_http_url"
:
"http://192.168.64.1:3005/gitlab-org/gitlab-test.git"
,
"visibility_level"
:
20
"visibility_level"
:
20
},
"runner"
:
{
"active"
:
true
,
"is_shared"
:
false
,
"id"
:
380987
,
"description"
:
"shared-runners-manager-6.gitlab.com"
}
}
}
}
```
```
Note that
`commit.id`
is the id of the pipeline, not the id of the commit.
## Image URL rewriting
## Image URL rewriting
From GitLab 11.2, simple image references are rewritten to use an absolute URL
From GitLab 11.2, simple image references are rewritten to use an absolute URL
...
...
lib/gitlab/data_builder/build.rb
View file @
8f764d21
...
@@ -31,6 +31,8 @@ module Gitlab
...
@@ -31,6 +31,8 @@ module Gitlab
build_duration:
build
.
duration
,
build_duration:
build
.
duration
,
build_allow_failure:
build
.
allow_failure
,
build_allow_failure:
build
.
allow_failure
,
build_failure_reason:
build
.
failure_reason
,
build_failure_reason:
build
.
failure_reason
,
pipeline_id:
commit
.
id
,
runner:
build_runner
(
build
.
runner
),
# TODO: do we still need it?
# TODO: do we still need it?
project_id:
project
.
id
,
project_id:
project
.
id
,
...
@@ -43,6 +45,7 @@ module Gitlab
...
@@ -43,6 +45,7 @@ module Gitlab
},
},
commit:
{
commit:
{
# note: commit.id is actually the pipeline id
id:
commit
.
id
,
id:
commit
.
id
,
sha:
commit
.
sha
,
sha:
commit
.
sha
,
message:
commit
.
git_commit_message
,
message:
commit
.
git_commit_message
,
...
@@ -75,6 +78,17 @@ module Gitlab
...
@@ -75,6 +78,17 @@ module Gitlab
author
=
commit
.
try
(
:author
)
author
=
commit
.
try
(
:author
)
author
?
Gitlab
::
Routing
.
url_helpers
.
user_url
(
author
)
:
"mailto:
#{
pipeline
.
git_author_email
}
"
author
?
Gitlab
::
Routing
.
url_helpers
.
user_url
(
author
)
:
"mailto:
#{
pipeline
.
git_author_email
}
"
end
end
def
build_runner
(
runner
)
return
unless
runner
{
id:
runner
.
id
,
description:
runner
.
description
,
active:
runner
.
active?
,
is_shared:
runner
.
instance_type?
}
end
end
end
end
end
end
end
locale/gitlab.pot
View file @
8f764d21
...
@@ -1119,6 +1119,9 @@ msgstr ""
...
@@ -1119,6 +1119,9 @@ msgstr ""
msgid "Adds an issue to an epic."
msgid "Adds an issue to an epic."
msgstr ""
msgstr ""
msgid "Adjust your filters/search criteria above."
msgstr ""
msgid "Admin Area"
msgid "Admin Area"
msgstr ""
msgstr ""
...
@@ -5904,9 +5907,6 @@ msgstr ""
...
@@ -5904,9 +5907,6 @@ msgstr ""
msgid "Designs"
msgid "Designs"
msgstr ""
msgstr ""
msgid "Designs coming soon."
msgstr ""
msgid "Destroy"
msgid "Destroy"
msgstr ""
msgstr ""
...
@@ -9292,6 +9292,9 @@ msgstr ""
...
@@ -9292,6 +9292,9 @@ msgstr ""
msgid "If using GitHub, you’ll see pipeline statuses on GitHub for your commits and pull requests. %{more_info_link}"
msgid "If using GitHub, you’ll see pipeline statuses on GitHub for your commits and pull requests. %{more_info_link}"
msgstr ""
msgstr ""
msgid "If you believe this may be an error, please refer to the %{linkStart}Geo Troubleshooting%{linkEnd} documentation for more information."
msgstr ""
msgid "If you believe this page to be an error, check out the links below for more information."
msgid "If you believe this page to be an error, check out the links below for more information."
msgstr ""
msgstr ""
...
@@ -10130,12 +10133,21 @@ msgstr ""
...
@@ -10130,12 +10133,21 @@ msgstr ""
msgid "Last reply by"
msgid "Last reply by"
msgstr ""
msgstr ""
msgid "Last repository check run"
msgstr ""
msgid "Last seen"
msgid "Last seen"
msgstr ""
msgstr ""
msgid "Last successful sync"
msgstr ""
msgid "Last successful update"
msgid "Last successful update"
msgstr ""
msgstr ""
msgid "Last time verified"
msgstr ""
msgid "Last update"
msgid "Last update"
msgstr ""
msgstr ""
...
@@ -11500,6 +11512,9 @@ msgstr ""
...
@@ -11500,6 +11512,9 @@ msgstr ""
msgid "No %{providerTitle} repositories found"
msgid "No %{providerTitle} repositories found"
msgstr ""
msgstr ""
msgid "No Design Repositories match this filter"
msgstr ""
msgid "No Epic"
msgid "No Epic"
msgstr ""
msgstr ""
...
@@ -11692,6 +11707,9 @@ msgstr ""
...
@@ -11692,6 +11707,9 @@ msgstr ""
msgid "None"
msgid "None"
msgstr ""
msgstr ""
msgid "Not Implemented"
msgstr ""
msgid "Not all data has been processed yet, the accuracy of the chart for the selected timeframe is limited."
msgid "Not all data has been processed yet, the accuracy of the chart for the selected timeframe is limited."
msgstr ""
msgstr ""
...
...
spec/lib/gitlab/data_builder/build_spec.rb
View file @
8f764d21
...
@@ -3,7 +3,8 @@
...
@@ -3,7 +3,8 @@
require
'spec_helper'
require
'spec_helper'
describe
Gitlab
::
DataBuilder
::
Build
do
describe
Gitlab
::
DataBuilder
::
Build
do
let
(
:build
)
{
create
(
:ci_build
)
}
let
(
:runner
)
{
create
(
:ci_runner
,
:instance
)
}
let
(
:build
)
{
create
(
:ci_build
,
:running
,
runner:
runner
)
}
describe
'.build'
do
describe
'.build'
do
let
(
:data
)
do
let
(
:data
)
do
...
@@ -20,6 +21,10 @@ describe Gitlab::DataBuilder::Build do
...
@@ -20,6 +21,10 @@ describe Gitlab::DataBuilder::Build do
it
{
expect
(
data
[
:build_failure_reason
]).
to
eq
(
build
.
failure_reason
)
}
it
{
expect
(
data
[
:build_failure_reason
]).
to
eq
(
build
.
failure_reason
)
}
it
{
expect
(
data
[
:project_id
]).
to
eq
(
build
.
project
.
id
)
}
it
{
expect
(
data
[
:project_id
]).
to
eq
(
build
.
project
.
id
)
}
it
{
expect
(
data
[
:project_name
]).
to
eq
(
build
.
project
.
full_name
)
}
it
{
expect
(
data
[
:project_name
]).
to
eq
(
build
.
project
.
full_name
)
}
it
{
expect
(
data
[
:pipeline_id
]).
to
eq
(
build
.
pipeline
.
id
)
}
it
{
expect
(
data
[
:commit
][
:id
]).
to
eq
(
build
.
pipeline
.
id
)
}
it
{
expect
(
data
[
:runner
][
:id
]).
to
eq
(
build
.
runner
.
id
)
}
it
{
expect
(
data
[
:runner
][
:description
]).
to
eq
(
build
.
runner
.
description
)
}
context
'commit author_url'
do
context
'commit author_url'
do
context
'when no commit present'
do
context
'when no commit present'
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