Skip to content

Commit

Permalink
Merge pull request #155 from nicholasSUSE/bug-fix-lifecycle-status
Browse files Browse the repository at this point in the history
Bug fixes
  • Loading branch information
nicholasSUSE authored Dec 10, 2024
2 parents 5066d7b + ca4ba91 commit 0722cc5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/lifecycle/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func LoadState(rootFs billy.Filesystem) (*Status, error) {
return nil, err
}
if !exist {
return nil, err
return nil, errors.New("state.json file does not exist")
}

// Read the file content
Expand Down
2 changes: 1 addition & 1 deletion pkg/regsync/cosign.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ func checkCosignedImages(imageTags map[string][]string) (map[string][]string, er
for image, tags := range imageTags {
for _, tag := range tags {
imageTag := baseImageRepository + image + ":" + tag

fmt.Printf("checking: %s\n", imageTag)
// Close the stdout and stderr so there are no leaks
oldStdout, oldStderr, r, w := closeStdOut()
// Verify the image, if it's cosigned
Expand Down
6 changes: 6 additions & 0 deletions pkg/regsync/generateconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ sync:`)
sort.Strings(repositories)

for _, repo := range repositories {
if repo == "" {
continue // skip empty repository
}
fmt.Fprintf(file, "%s%s\n", "- source: docker.io/", repo)
fmt.Fprintf(file, ` target: '{{ env "REGISTRY_ENDPOINT" }}/%s'`, repo)
fmt.Fprintln(file)
Expand All @@ -168,6 +171,9 @@ sync:`)
sort.Strings(tags)

for _, tag := range tags {
if tag == "" {
continue // skip empty tag
}
fmt.Fprintf(file, " - %s\n", tag)
}
}
Expand Down

0 comments on commit 0722cc5

Please sign in to comment.