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
1ed2b058
Commit
1ed2b058
authored
Feb 22, 2022
by
Pavel Shutsin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Provide custom port for Triage Ops seeds
parent
76a9c8c7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
db/fixtures/development/33_triage_ops.rb
db/fixtures/development/33_triage_ops.rb
+4
-4
No files found.
db/fixtures/development/33_triage_ops.rb
View file @
1ed2b058
...
...
@@ -4,7 +4,7 @@ require './spec/support/sidekiq_middleware'
require
'./spec/support/helpers/test_env'
class
Gitlab::Seeder::TriageOps
WEBHOOK_URL
=
'http://0.0.0.0:
8080
'
WEBHOOK_URL
=
'http://0.0.0.0:
$PORT$
'
WEBHOOK_TOKEN
=
"triage-ops-webhook-token"
def
seed!
...
...
@@ -23,7 +23,7 @@ class Gitlab::Seeder::TriageOps
ensure_project
(
'gitlab-org/security/gitlab'
)
puts
"Ensuring required bot user"
ensure_bot_user
puts
"Setting up webhooks
for
#{
WEBHOOK_URL
}
"
puts
"Setting up webhooks"
ensure_webhook_for
(
'gitlab-com'
)
ensure_webhook_for
(
'gitlab-org'
)
end
...
...
@@ -65,7 +65,7 @@ class Gitlab::Seeder::TriageOps
hook_params
=
{
enable_ssl_verification:
false
,
token:
WEBHOOK_TOKEN
,
url:
WEBHOOK_URL
url:
WEBHOOK_URL
.
gsub
(
"$PORT$"
,
ENV
.
fetch
(
'TRIAGE_OPS_WEBHOOK_PORT'
,
'8091'
))
}
# Subscribe the hook to all possible events.
all_group_hook_events
=
GroupHook
.
triggers
.
values
...
...
@@ -76,7 +76,7 @@ class Gitlab::Seeder::TriageOps
hook
=
group
.
hooks
.
new
(
hook_params
)
hook
.
save!
puts
"Hook
token '
#{
hook
.
token
}
' for '
#{
group_path
}
' group
is present now."
puts
"Hook
with url '
#{
hook
.
url
}
' and token '
#{
hook
.
token
}
' for '
#{
group_path
}
'
is present now."
end
def
ensure_group
(
full_path
)
...
...
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