summaryrefslogtreecommitdiff
path: root/app/models/ci/build.rb
diff options
context:
space:
mode:
authorMatija Čupić <matteeyah@gmail.com>2019-03-07 17:08:17 +0000
committerKamil Trzciński <ayufan@ayufan.eu>2019-03-07 17:08:17 +0000
commit686ffdc2e9eb13c2785816aeadafc5a9ee5b0aa3 (patch)
tree36de98ca85b9e3248039e3f6f821cebe7543f408 /app/models/ci/build.rb
parent380fa8835594c9dccff1b8c77673076534310faa (diff)
downloadgitlab-ce-686ffdc2e9eb13c2785816aeadafc5a9ee5b0aa3.tar.gz
Resolve "Mask the existing variables"
Diffstat (limited to 'app/models/ci/build.rb')
-rw-r--r--app/models/ci/build.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb
index a64c6051f95..a629db82c19 100644
--- a/app/models/ci/build.rb
+++ b/app/models/ci/build.rb
@@ -426,11 +426,11 @@ module Ci
.concat(pipeline.persisted_variables)
.append(key: 'CI_JOB_ID', value: id.to_s)
.append(key: 'CI_JOB_URL', value: Gitlab::Routing.url_helpers.project_job_url(project, self))
- .append(key: 'CI_JOB_TOKEN', value: token.to_s, public: false)
+ .append(key: 'CI_JOB_TOKEN', value: token.to_s, public: false, masked: true)
.append(key: 'CI_BUILD_ID', value: id.to_s)
- .append(key: 'CI_BUILD_TOKEN', value: token.to_s, public: false)
+ .append(key: 'CI_BUILD_TOKEN', value: token.to_s, public: false, masked: true)
.append(key: 'CI_REGISTRY_USER', value: CI_REGISTRY_USER)
- .append(key: 'CI_REGISTRY_PASSWORD', value: token.to_s, public: false)
+ .append(key: 'CI_REGISTRY_PASSWORD', value: token.to_s, public: false, masked: true)
.append(key: 'CI_REPOSITORY_URL', value: repo_url.to_s, public: false)
.concat(deploy_token_variables)
end
@@ -454,7 +454,7 @@ module Ci
break variables unless gitlab_deploy_token
variables.append(key: 'CI_DEPLOY_USER', value: gitlab_deploy_token.username)
- variables.append(key: 'CI_DEPLOY_PASSWORD', value: gitlab_deploy_token.token, public: false)
+ variables.append(key: 'CI_DEPLOY_PASSWORD', value: gitlab_deploy_token.token, public: false, masked: true)
end
end