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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
784941ee
Commit
784941ee
authored
May 09, 2017
by
Balasankar C
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve readability of code
parent
e85aa424
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
scripts/trigger-build
scripts/trigger-build
+6
-3
No files found.
scripts/trigger-build
View file @
784941ee
...
@@ -5,14 +5,17 @@ require 'json'
...
@@ -5,14 +5,17 @@ require 'json'
uri
=
URI
(
'https://gitlab.com/api/v4/projects/20699/trigger/pipeline'
)
uri
=
URI
(
'https://gitlab.com/api/v4/projects/20699/trigger/pipeline'
)
params
=
{
params
=
{
"token"
=>
ENV
[
'BUILD_TRIGGER_TOKEN'
],
"ref"
=>
ENV
[
"OMNIBUS_BRANCH"
]
||
"master"
,
"variables[GITLAB_VERSION]"
=>
ENV
[
'CI_COMMIT_SHA'
],
"token"
=>
ENV
[
"BUILD_TRIGGER_TOKEN"
],
"variables[GITLAB_VERSION]"
=>
ENV
[
"CI_COMMIT_SHA"
],
"variables[ALTERNATIVE_SOURCES]"
=>
true
,
"variables[ALTERNATIVE_SOURCES]"
=>
true
,
}
}
params
[
'ref'
]
=
ENV
[
'OMNIBUS_BRANCH'
]
||
"master"
Dir
.
glob
(
"*_VERSION"
).
each
do
|
version_file
|
Dir
.
glob
(
"*_VERSION"
).
each
do
|
version_file
|
params
[
"variables[
#{
version_file
}
]"
]
=
File
.
read
(
version_file
).
strip
params
[
"variables[
#{
version_file
}
]"
]
=
File
.
read
(
version_file
).
strip
end
end
res
=
Net
::
HTTP
.
post_form
(
uri
,
params
)
res
=
Net
::
HTTP
.
post_form
(
uri
,
params
)
pipeline_id
=
JSON
.
parse
(
res
.
body
)[
'id'
]
pipeline_id
=
JSON
.
parse
(
res
.
body
)[
'id'
]
puts
"Triggered pipeline can be found at https://gitlab.com/gitlab-org/omnibus-gitlab/pipelines/
#{
pipeline_id
}
"
puts
"Triggered pipeline can be found at https://gitlab.com/gitlab-org/omnibus-gitlab/pipelines/
#{
pipeline_id
}
"
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