diff options
author | Krasimir Angelov <kangelov@gitlab.com> | 2019-05-06 16:11:42 +0300 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2019-05-06 16:11:42 +0300 |
commit | 85609c117e2b96a786204069669c66d36d971733 (patch) | |
tree | e177a1fa0ddd9caa6cf4dab35c22a0ff94e66880 /app/assets/javascripts/ci_variable_list | |
parent | 4d2d812463256003ab943df90a9c603821078a69 (diff) |
Implement support for CI variables of type file
Add env_var and file as supported types for CI variables. Variables of
type file expose to users existing gitlab-runner behaviour - save
variable value into a temp file and set the path to this file in an ENV
var named after the variable key.
Resolves https://gitlab.com/gitlab-org/gitlab-ce/issues/46806.
Diffstat (limited to 'app/assets/javascripts/ci_variable_list')
-rw-r--r-- | app/assets/javascripts/ci_variable_list/ci_variable_list.js | 4 | ||||
-rw-r--r-- | app/assets/javascripts/ci_variable_list/native_form_variable_list.js | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/app/assets/javascripts/ci_variable_list/ci_variable_list.js b/app/assets/javascripts/ci_variable_list/ci_variable_list.js index da3100b9386..0390a3bf96a 100644 --- a/app/assets/javascripts/ci_variable_list/ci_variable_list.js +++ b/app/assets/javascripts/ci_variable_list/ci_variable_list.js @@ -26,6 +26,10 @@ export default class VariableList { selector: '.js-ci-variable-input-id', default: '', }, + variable_type: { + selector: '.js-ci-variable-input-variable-type', + default: 'env_var', + }, key: { selector: '.js-ci-variable-input-key', default: '', diff --git a/app/assets/javascripts/ci_variable_list/native_form_variable_list.js b/app/assets/javascripts/ci_variable_list/native_form_variable_list.js index e7111c666a2..fdbefd8c313 100644 --- a/app/assets/javascripts/ci_variable_list/native_form_variable_list.js +++ b/app/assets/javascripts/ci_variable_list/native_form_variable_list.js @@ -19,6 +19,7 @@ export default function setupNativeFormVariableList({ container, formField = 'va const isTouched = variableList.checkIfRowTouched($lastRow); if (!isTouched) { $lastRow.find('input, textarea').attr('name', ''); + $lastRow.find('select').attr('name', ''); } }); } |