Commit 160f5b96 authored by Miguel Rincon's avatar Miguel Rincon

Fix variables payload format to create a pipeline

parent cef17004
......@@ -170,13 +170,13 @@ export default {
.map(({ variable_type, key, value }) => ({
variable_type,
key,
value,
secret_value: value,
}));
return axios
.post(this.pipelinesPath, {
ref: this.refValue,
variables: filteredVariables,
variables_attributes: filteredVariables,
})
.then(({ data }) => {
redirectTo(`${this.pipelinesPath}/${data.id}`);
......
......@@ -14,9 +14,9 @@ export const mockProjectId = '21';
export const mockPostParams = {
ref: 'tag-1',
variables: [
{ key: 'test_var', value: 'test_var_val', variable_type: 'env_var' },
{ key: 'test_file', value: 'test_file_val', variable_type: 'file' },
variables_attributes: [
{ key: 'test_var', secret_value: 'test_var_val', variable_type: 'env_var' },
{ 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