Skip to content
Snippets Groups Projects
Commit 3890f722 authored by Kamil Trzcinski's avatar Kamil Trzcinski
Browse files

Fix broken yaml error saving

parent 47f6dd69
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -10,6 +10,7 @@ v7.14.0 (unreleased)
- Fix project API listing returning empty list when first projects are not added to CI
- Allow to define variables from YAML
- Added support for CI skipped status
- Fix broken yaml error saving
- Rename type(s) to stage(s)
v7.13.1
Loading
Loading
Loading
Loading
@@ -250,7 +250,7 @@ class Commit < ActiveRecord::Base
private
 
def save_yaml_error(error)
return unless self.yaml_errors?
return if self.yaml_errors?
self.yaml_errors = error
save
end
Loading
Loading
Loading
Loading
@@ -98,5 +98,20 @@ describe CreateCommitService do
)
commit.builds.count(:all).should == 2
end
it "creates commit with failed status if yaml is invalid" do
commits = [{message: "some message"}]
commit = service.execute(project,
ref: 'refs/tags/0_1',
before: '00000000',
after: '31das312',
commits: commits,
ci_yaml_file: "invalid: file"
)
commit.status.should == "failed"
commit.builds.any?.should be_false
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment