Create new pipeline variables should allow to input multiple lines
Summary
With the introduction of the Vue port of the New Pipeline form, the value of the variables can only be input in text fields that do not support multiple lines.
The previous version of the form had <textarea>
, while the new form only provides <input>
Steps to reproduce
- Enable
new_pipeline_form
feature flag. - Visit the Run Pipeline page
- Try to input a variable value that has multiple lines
Alternative use case broken:
Pre-filling variables with multiple lines form the .gitlab-ci.yml
will not work:
A support ticket (internal link) has reported that the textarea
to input
form element change has broken the ability to input newlines into variable values.
They were relying on the ability to input newlines to input YAML data, and SSH key data, and it used to work for them prior to this feature being enabled by default in 13.6.
Example Project
gitlab-org/gitlab
uses the new variant of the form: https://gitlab.com/gitlab-org/gitlab/-/pipelines/new
What is the current bug behavior?
It is not possible to use new lines.
What is the expected correct behavior?
It is possible to use new lines, default values with new lines are preserved.
Relevant logs and/or screenshots
This is a way to reproduce the issue:
ci file | variables |
---|---|
source
stages:
- test
variables:
TEST:
value: "Test value"
description: "This variable makes cakes "
TEST_2:
value: "Test value 2"
description: ""
TEST_3:
value: |
Test value 2
Several lines of text,
with some "quotes" of various 'types',
and also a blank line:
plus another line at the end.
description: "This variable has multiple lines"
test_variable:
stage: test
script:
- echo "$TEST"
- echo "$TEST_2"
- echo "$TEST_3"
Output of checks
This bug happens on GitLab.com
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)