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
path: root/lib
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-11 09:10:11 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-11 09:10:11 +0300
commit65a1175e466105fca1f40cb5a995fdb100ff334e (patch)
tree562573b4fc7a0cd748d07d6a1720b4b13d36386a /lib
parent3a52deac114dda8a1ee0da597c148b0dfc5dcf35 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib')
-rw-r--r--lib/api/deploy_tokens.rb23
-rw-r--r--lib/gitlab/ci/templates/Jobs/Deploy.gitlab-ci.yml2
2 files changed, 24 insertions, 1 deletions
diff --git a/lib/api/deploy_tokens.rb b/lib/api/deploy_tokens.rb
index 1631425ec1b..bc58cf0dd32 100644
--- a/lib/api/deploy_tokens.rb
+++ b/lib/api/deploy_tokens.rb
@@ -23,6 +23,8 @@ module API
use :pagination
end
get 'deploy_tokens' do
+ service_unavailable! unless Feature.enabled?(:deploy_tokens_api, default_enabled: true)
+
authenticated_as_admin!
present paginate(DeployToken.all), with: Entities::DeployToken
@@ -32,6 +34,10 @@ module API
requires :id, type: Integer, desc: 'The ID of a project'
end
resource :projects, requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS do
+ before do
+ service_unavailable! unless Feature.enabled?(:deploy_tokens_api, user_project, default_enabled: true)
+ end
+
params do
use :pagination
end
@@ -71,6 +77,23 @@ module API
requires :id, type: Integer, desc: 'The ID of a group'
end
resource :groups, requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS do
+ before do
+ service_unavailable! unless Feature.enabled?(:deploy_tokens_api, user_group, default_enabled: true)
+ end
+
+ params do
+ use :pagination
+ end
+ desc 'List deploy tokens for a group' do
+ detail 'This feature was introduced in GitLab 12.9'
+ success Entities::DeployToken
+ end
+ get ':id/deploy_tokens' do
+ authorize!(:read_deploy_token, user_group)
+
+ present paginate(user_group.deploy_tokens), with: Entities::DeployToken
+ end
+
desc 'Delete a group deploy token' do
detail 'This feature was introduced in GitLab 12.9'
end
diff --git a/lib/gitlab/ci/templates/Jobs/Deploy.gitlab-ci.yml b/lib/gitlab/ci/templates/Jobs/Deploy.gitlab-ci.yml
index 8eb56f3991b..bbfcf53b3d4 100644
--- a/lib/gitlab/ci/templates/Jobs/Deploy.gitlab-ci.yml
+++ b/lib/gitlab/ci/templates/Jobs/Deploy.gitlab-ci.yml
@@ -1,5 +1,5 @@
.auto-deploy:
- image: "registry.gitlab.com/gitlab-org/cluster-integration/auto-deploy-image:v0.10.0"
+ image: "registry.gitlab.com/gitlab-org/cluster-integration/auto-deploy-image:v0.12.1"
review:
extends: .auto-deploy