Commit 0fa6dec0 authored by Ezekiel Kigbo's avatar Ezekiel Kigbo

Merge branch...

Merge branch '258630-environment-variables-are-not-getting-used-under-the-flag-new_pipeline_form' into 'master'

Fix variables payload format to create a pipeline

Closes #258630

See merge request gitlab-org/gitlab!43835
parents 19211f3d 160f5b96
...@@ -170,13 +170,13 @@ export default { ...@@ -170,13 +170,13 @@ export default {
.map(({ variable_type, key, value }) => ({ .map(({ variable_type, key, value }) => ({
variable_type, variable_type,
key, key,
value, secret_value: value,
})); }));
return axios return axios
.post(this.pipelinesPath, { .post(this.pipelinesPath, {
ref: this.refValue, ref: this.refValue,
variables: filteredVariables, variables_attributes: filteredVariables,
}) })
.then(({ data }) => { .then(({ data }) => {
redirectTo(`${this.pipelinesPath}/${data.id}`); redirectTo(`${this.pipelinesPath}/${data.id}`);
......
...@@ -14,9 +14,9 @@ export const mockProjectId = '21'; ...@@ -14,9 +14,9 @@ export const mockProjectId = '21';
export const mockPostParams = { export const mockPostParams = {
ref: 'tag-1', ref: 'tag-1',
variables: [ variables_attributes: [
{ key: 'test_var', value: 'test_var_val', variable_type: 'env_var' }, { key: 'test_var', secret_value: 'test_var_val', variable_type: 'env_var' },
{ key: 'test_file', value: 'test_file_val', variable_type: 'file' }, { key: 'test_file', secret_value: 'test_file_val', variable_type: 'file' },
], ],
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment