Skip to content
Snippets Groups Projects
Commit 40a7dce9 authored by Kamil Trzcinski's avatar Kamil Trzcinski Committed by Valery Sizov
Browse files

Fix broken yaml error saving

parent 0d6b96dc
No related branches found
No related tags found
No related merge requests found
v7.14.0 (unreleased)
- Truncate commit messages after subject line in table
- Adjust CI config to support Docker executors
- Added Application Settings
- Randomize test database for CI tests
- Make YAML validation stricter
- Use avatars received from GitLab
- Refactor GitLab API usage to use either access_token or private_token depending on what was specified during login
- Allow to use access_token for API requests
- 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
- Fix: user could steal specific runner
- Fix: don't send notifications for jobs with allow_failure set
Loading
Loading
Loading
Loading
@@ -246,7 +246,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
@@ -97,5 +97,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