Skip to content

Commit

Permalink
Merge pull request #67 from xiaomuqiao/fix
Browse files Browse the repository at this point in the history
add log to log file and adjust the order of the  vulnerabilities from  clair checking
  • Loading branch information
Superxi911 committed Nov 21, 2016
2 parents c3a1107 + 8675b78 commit eb44899
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion worker/ci/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func (cm *Manager) ExecBuild(r *runner.Build) error {
return nil
}

// ExecBuild executes publish image to registry.
// ExecPublish executes publish image to registry.
func (cm *Manager) ExecPublish(r *runner.Build) error {
log.Info("About to run publish event.")

Expand Down Expand Up @@ -147,12 +147,14 @@ func (cm *Manager) Parse(event *api.Event) (*parser.Tree, error) {
directFilePath = fmt.Sprintf("%s/%s", contextDir, yamlName)
}
if osutil.IsFileExists(directFilePath) != true {
fmt.Fprintf(steplog.Output, "Error: %v\n", errYaml)
return nil, errYaml
}

// Fetch and parse caicloud.yml from the repo.
tree, err := fetchAndParseYaml(directFilePath)
if err != nil {
fmt.Fprintf(steplog.Output, "Error: %v\n", err)
return nil, err
}
return tree, nil
Expand Down
2 changes: 1 addition & 1 deletion worker/clair/clair.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func AnalysisImage(dockerManager *docker.Manager,
}

func compareSeverity(severity1 Serverity, severity2 Serverity) bool {
return SeverityWeight[severity1] < SeverityWeight[severity2]
return SeverityWeight[severity1] > SeverityWeight[severity2]
}

// Len realize function of interface sort
Expand Down

0 comments on commit eb44899

Please sign in to comment.