Skip to content

Add support for Kaniko and JIB#512

Merged
yahavi merged 4 commits intojfrog:masterfrom
yahavi:build-docker-create
Jun 23, 2021
Merged

Add support for Kaniko and JIB#512
yahavi merged 4 commits intojfrog:masterfrom
yahavi:build-docker-create

Conversation

@yahavi
Copy link
Copy Markdown
Member

@yahavi yahavi commented Jun 7, 2021

  • All tests passed. If this feature is not already covered by the tests, I added new tests.

Follow up #477:

  • Add support for JIB image files.
  • Fix some issues discovered during development.
  • Refactor Docker tests.
  • Refactor DownloadResponse to return the headers.

if (imageDigest == null || imageDigest.isNull()) {
throw new RuntimeException("Missing \"imageDigest\" in file: \"" + jibImageFiles + "\"");
}
imageFilesWithDigests.add(new ImageFileWithDigest(imageName.asText(), imageDigest.asText()));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be adding a image file instance for each of the tags in the file?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unlike Kaniko, the image file of JIB contains only one image. It is concluded from the description of the jib-image.json:

The path of the image metadata json file written out during the build. Relative paths are resolved relative to the project root.

To support multiple JIB image files, we allow providing a Wildcard pattern. For example, the default pattern is: */target/jib-image.json.


// Exe docker push & collect build info.
// Exe build-docker-create & collect build info.
dockerBuildCreate.executeAndSaveBuildInfo(clientConfiguration);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

executeAndSaveBuildInfo --> createAndPublish

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The executeAndSaveBuildInfo is a method of PackageManagerExtractor, the parent class.

@yahavi yahavi merged commit d06a903 into jfrog:master Jun 23, 2021
@yahavi yahavi deleted the build-docker-create branch June 23, 2021 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants