Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Kaniko and JIB #512

Merged
merged 4 commits into from
Jun 23, 2021
Merged

Conversation

yahavi
Copy link
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
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
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.

ArrayListMultimap.create(clientConfiguration.publisher.getMatrixParams().asMultimap()),
clientConfiguration.publisher.getRepoKey(),
clientConfiguration.getLog());

// Exe docker push & collect build info.
// Exe build-docker-create & collect build info.
dockerBuildCreate.executeAndSaveBuildInfo(clientConfiguration);
Copy link
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
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