Skip to content

Commit

Permalink
feat: add detail to docker file
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamadch91 committed Dec 25, 2024
1 parent 369b56a commit a349379
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 56 deletions.
22 changes: 11 additions & 11 deletions provider/describer/artifact_dockerfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,22 +219,22 @@ func GetDockerfile(
}

output := model.ArtifactDockerFileDescription{
Sha: contentData.Sha,
Name: contentData.Name,
Path: contentData.Path,
LastUpdatedAt: lastUpdatedAt,
GitURL: contentData.GitURL,
HTMLURL: contentData.HTMLURL,
URI: contentData.HTMLURL,
Sha: &contentData.Sha,
Name: &contentData.Name,
Path: &contentData.Path,
LastUpdatedAt: &lastUpdatedAt,
GitURL: &contentData.GitURL,
HTMLURL: &contentData.HTMLURL,
URI: &contentData.HTMLURL,
DockerfileContent: string(decoded),
DockerfileContentBase64: dockerfileB64,
DockerfileContentBase64: &dockerfileB64,
Repository: repoObj,
Images: images,
Images: images,
}

value := models.Resource{
ID: output.URI,
Name: output.Name,
ID: *output.URI,
Name: *output.Name,
Description: JSONAllFieldsMarshaller{
Value: output,
},
Expand Down
16 changes: 8 additions & 8 deletions provider/model/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -1348,15 +1348,15 @@ type CommitResponse struct {
}

type ArtifactDockerFileDescription struct {
Sha string `json:"sha"`
Name string `json:"name"`
Path string `json:"path"`
LastUpdatedAt string `json:"last_updated_at"`
GitURL string `json:"git_url"`
HTMLURL string `json:"html_url"`
URI string `json:"uri"` // Unique identifier
Sha *string `json:"sha"`
Name *string `json:"name"`
Path *string `json:"path"`
LastUpdatedAt *string `json:"last_updated_at"`
GitURL *string `json:"git_url"`
HTMLURL *string `json:"html_url"`
URI *string `json:"uri"` // Unique identifier
DockerfileContent string `json:"dockerfile_content"`
DockerfileContentBase64 string `json:"dockerfile_content_base64"`
DockerfileContentBase64 *string `json:"dockerfile_content_base64"`
Repository map[string]interface{} `json:"repository"`
Images []string `json:"images"` // New field to store extracted base images
}
37 changes: 0 additions & 37 deletions resource_types_list.go

This file was deleted.

0 comments on commit a349379

Please sign in to comment.