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
41b2e624
Commit
41b2e624
authored
Jul 22, 2021
by
Rémy Coutable
Committed by
Albert Salim
Jul 23, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use a dedicated project access token for CI scripts
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
64a920f2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
4 deletions
+8
-4
scripts/api/cancel_pipeline.rb
scripts/api/cancel_pipeline.rb
+2
-1
scripts/api/download_job_artifact.rb
scripts/api/download_job_artifact.rb
+2
-1
scripts/api/get_job_id.rb
scripts/api/get_job_id.rb
+2
-1
scripts/api/play_job.rb
scripts/api/play_job.rb
+2
-1
No files found.
scripts/api/cancel_pipeline.rb
View file @
41b2e624
...
...
@@ -10,7 +10,8 @@ class CancelPipeline
DEFAULT_OPTIONS
=
{
project:
ENV
[
'CI_PROJECT_ID'
],
pipeline_id:
ENV
[
'CI_PIPELINE_ID'
],
api_token:
ENV
[
'GITLAB_BOT_MULTI_PROJECT_PIPELINE_POLLING_TOKEN'
]
# Default to "CI scripts API usage" at https://gitlab.com/gitlab-org/gitlab/-/settings/access_tokens
api_token:
ENV
[
'PROJECT_TOKEN_FOR_CI_SCRIPTS_API_USAGE'
]
}.
freeze
def
initialize
(
options
)
...
...
scripts/api/download_job_artifact.rb
View file @
41b2e624
...
...
@@ -11,7 +11,8 @@ require 'net/http'
class
ArtifactFinder
DEFAULT_OPTIONS
=
{
project:
ENV
[
'CI_PROJECT_ID'
],
api_token:
ENV
[
'GITLAB_BOT_MULTI_PROJECT_PIPELINE_POLLING_TOKEN'
]
# Default to "CI scripts API usage" at https://gitlab.com/gitlab-org/gitlab/-/settings/access_tokens
api_token:
ENV
[
'PROJECT_TOKEN_FOR_CI_SCRIPTS_API_USAGE'
]
}.
freeze
def
initialize
(
options
)
...
...
scripts/api/get_job_id.rb
View file @
41b2e624
...
...
@@ -11,7 +11,8 @@ class JobFinder
pipeline_id:
ENV
[
'CI_PIPELINE_ID'
],
pipeline_query:
{},
job_query:
{},
api_token:
ENV
[
'GITLAB_BOT_MULTI_PROJECT_PIPELINE_POLLING_TOKEN'
]
# Default to "CI scripts API usage" at https://gitlab.com/gitlab-org/gitlab/-/settings/access_tokens
api_token:
ENV
[
'PROJECT_TOKEN_FOR_CI_SCRIPTS_API_USAGE'
]
}.
freeze
def
initialize
(
options
)
...
...
scripts/api/play_job.rb
View file @
41b2e624
...
...
@@ -10,7 +10,8 @@ class PlayJob
DEFAULT_OPTIONS
=
{
project:
ENV
[
'CI_PROJECT_ID'
],
pipeline_id:
ENV
[
'CI_PIPELINE_ID'
],
api_token:
ENV
[
'GITLAB_BOT_MULTI_PROJECT_PIPELINE_POLLING_TOKEN'
]
# Default to "CI scripts API usage" at https://gitlab.com/gitlab-org/gitlab/-/settings/access_tokens
api_token:
ENV
[
'PROJECT_TOKEN_FOR_CI_SCRIPTS_API_USAGE'
]
}.
freeze
def
initialize
(
options
)
...
...
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