Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-10-18 12:11:01 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-10-18 12:11:01 +0300
commit7bbc9509dc0567d2a2d8314e99179aaad33ba361 (patch)
treebaa7501af6efe7a0f2f6e20f683e9da39fa96607 /scripts/packages
parentf6d22c8ba7c3f900a3843b1336e2ade1d8d90c1f (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'scripts/packages')
-rwxr-xr-xscripts/packages/automated_cleanup.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/packages/automated_cleanup.rb b/scripts/packages/automated_cleanup.rb
index 6f1e4c7f561..2b5a0011079 100755
--- a/scripts/packages/automated_cleanup.rb
+++ b/scripts/packages/automated_cleanup.rb
@@ -13,10 +13,12 @@ module Packages
def initialize(
project_path: ENV['CI_PROJECT_PATH'],
gitlab_token: ENV['GITLAB_PROJECT_PACKAGES_CLEANUP_API_TOKEN'],
+ api_endpoint: ENV['CI_API_V4_URL'],
options: {}
)
@project_path = project_path
@gitlab_token = gitlab_token
+ @api_endpoint = api_endpoint
@dry_run = options[:dry_run]
puts "Dry-run mode." if dry_run
@@ -25,7 +27,7 @@ module Packages
def gitlab
@gitlab ||= begin
Gitlab.configure do |config|
- config.endpoint = 'https://gitlab.com/api/v4'
+ config.endpoint = api_endpoint
config.private_token = gitlab_token
end
@@ -50,7 +52,7 @@ module Packages
private
- attr_reader :project_path, :gitlab_token, :dry_run
+ attr_reader :project_path, :gitlab_token, :api_endpoint, :dry_run
def delete_package(package)
print_package_state(package)