Skip to content

Latest commit

 

History

History
456 lines (276 loc) · 27.4 KB

CHANGELOG.md

File metadata and controls

456 lines (276 loc) · 27.4 KB

Change Log

All notable changes to this project will be documented in this file.

[unreleased]

Added

Changed

Fixed

2.0.0

Added

  • Added json output file for image metadata after a build is complete. Writes to build/jib-image.json by default, configurable with jib.outputPaths.imageJson. (#2227)
  • Added automatic update checks. Jib will now display a message if there is a new version of Jib available. See the privacy page for more details. (#2193)

Changed

  • Removed jibDockerBuild.dockerClient in favor of jib.dockerClient. (#1983)
  • Removed deprecated jib.extraDirectory configuration in favor of jib.extraDirectories. (#1691)
  • Removed deprecated jib.container.useCurrentTimestamp configuration in favor of jib.container.creationTime with USE_CURRENT_TIMESTAMP. (#1897)
  • HTTP redirection URLs are no longer sanitized in order to work around an issue with certain registries that do not conform to HTTP standards. This resolves an issue with using Red Hat OpenShift and Quay registries. (#2106, #1986)
  • Requires Gradle 5.1 or newer (up from 4.9).
  • The default base image cache location has been changed on MacOS and Windows. (#2216)
    • MacOS ($XDG_CACHE_HOME defined): from $XDG_CACHE_HOME/google-cloud-tools-java/jib/ to $XDG_CACHE_HOME/Google/Jib/
    • MacOS ($XDG_CACHE_HOME not defined): from $HOME/Library/Application Support/google-cloud-tools-java/jib/ to $HOME/Library/Caches/Google/Jib/
    • Windows ($XDG_CACHE_HOME defined): from $XDG_CACHE_HOME\google-cloud-tools-java\jib\ to $XDG_CACHE_HOME\Google\Jib\Cache\
    • Windows ($XDG_CACHE_HOME not defined): from %LOCALAPPDATA%\google-cloud-tools-java\jib\ to %LOCALAPPDATA%\Google\Jib\Cache\
    • Initial builds will be slower until the cache is repopulated, unless you manually move the cache from the old location to the new location

Fixed

  • jibBuildTar with jib.container.format='OCI' now builds a correctly formatted OCI archive. (#2124)
  • Now jib.containerizingMode='packaged' works as intended with Spring Boot projects that generate a fat JAR. (#2178)
  • Now automatically refreshes Docker registry authentication tokens when expired, fixing the issue that long-running builds may fail with "401 unauthorized." (#691)

1.8.0

Changed

  • Requires Gradle 4.9 or newer (up from 4.6).
  • Optimized building to a registry with local base images. (#1913)

Fixed

  • Fixed reporting parent build file when skaffold init is run on multi-module projects. (#2091)
  • Now correctly uses the war task if it is enabled and the bootWar task is disabled for Spring WAR projects. (#2096)
  • allowInsecureRegistries and the sendCredentialsOverHttp system property are now effective for authentication service server connections. (#2074)
  • Fixed inefficient communications when interacting with insecure registries and servers (when allowInsecureRegistries is set). (#946)

1.7.0

Added

  • jib.outputPaths object for configuration output file locations (#1561)
    • jib.outputPaths.tar configures output path of jibBuildTar (build/jib-image.tar by default)
    • jib.outputPaths.digest configures the output path of the image digest (build/jib-image.digest by default)
    • jib.outputPaths.imageId configures output path of the image id (build/jib-image.id by default)
  • Main class inference support for Java 13/14. (#2015)

Changed

  • Local base image layers are now processed in parallel, speeding up builds using large local base images. (#1913)
  • The base image manifest is no longer pulled from the registry if a digest is provided and the manifest is already cached. (#1881)
  • Docker daemon base images are now cached more effectively, speeding up builds using docker:// base images. (#1912)

Fixed

  • Fixed temporary directory cleanup during builds using local base images. (#2016)
  • Fixed additional tags being ignored when building to a tarball. (#2043)
  • Fixed tar:// base image failing if tar does not contain explicit directory entries. (#2067)

1.6.1

Fixed

  • Fixed an issue with using custom base images in Java 12+ projects. (#1995)

1.6.0

Added

  • Support for local base images by prefixing jib.from.image with docker:// to build from a docker daemon image, or tar:// to build from a tarball image. (#1468, #1905)

Changed

  • To disable parallel execution, the property jib.serialize should be used instead of jibSerialize. (#1968)
  • For retrieving credentials from Docker config (~/.docker/config.json), credHelpers now takes precedence over credsStore, followed by auths. (#1958)
  • The legacy credsStore no longer requires defining empty registry entries in auths to be used. This now means that if credsStore is defined, auths will be completely ignored. (#1958)
  • jib.dockerClient is now configurable on all tasks, not just jibDockerBuild. (#1932)
  • jibDockerBuild.dockerClient is deprecated in favor of jib.dockerClient.

Fixed

  • Fixed the regression of slow network operations introduced at 1.5.0. (#1980)
  • Fixed an issue where connection timeout sometimes fell back to attempting plain HTTP (non-HTTPS) requests when allowInsecureRegistries is set. (#1949)

1.5.1

Fixed

  • Fixed an issue interacting with certain registries due to changes to URL handling in the underlying Apache HttpClient library. (#1924)

1.5.0

Added

  • Can now set timestamps (last modified time) of the files in the built image with jib.container.filesModificationTime. The value should either be EPOCH_PLUS_SECOND to set the timestamps to Epoch + 1 second (default behavior), or an ISO 8601 date time parsable with DateTimeFormatter.ISO_DATE_TIME such as 2019-07-15T10:15:30+09:00 or 2011-12-03T22:42:05Z. (#1818)
  • Can now set container creation timestamp with jib.container.creationTime. The value should be EPOCH, USE_CURRENT_TIMESTAMP, or an ISO 8601 date time. (#1609)
  • For Google Container Registry (gcr.io), Jib now tries Google Application Default Credentials (ADC) last when no credentials can be retrieved. ADC are available on many Google Cloud Platform (GCP) environments (such as Google Cloud Build, Google Compute Engine, Google Kubernetes Engine, and Google App Engine). Application Default Credentials can also be configured with gcloud auth application-default login locally or through the GOOGLE_APPLICATION_CREDENTIALS environment variable. (#1902)

Changed

  • When building to a registry, Jib now skips downloading and caching base image layers that already exist in the target registry. This feature will be particularly useful in CI/CD environments. However, if you want to force caching base image layers locally, set the system property -Djib.alwaysCacheBaseImage=true. (#1840)
  • jib.container.useCurrentTimestamp has been deprecated in favor of jib.container.creationTime with USE_CURRENT_TIMESTAMP. (#1609)

1.4.0

Added

  • Can now containerize a JAR artifact instead of putting individual .class and resource files with jib.containerizingMode = 'packaged'. (#1760)
  • Now automatically supports WAR created by the Spring Boot Gradle Plugin via the bootWar task. (#1786)
  • Can now use jib.from.image = 'scratch' to use the scratch (empty) base image for builds. (#1794)

Changed

  • Dependencies are now split into three layers: dependencies, snapshots dependencies, project dependencies. (#1724)

Fixed

  • Re-enabled cross-repository blob mounts. (#1793)
  • Manifest lists referenced directly by sha256 are automatically parsed and the first linux/amd64 manifest is used. (#1811)

1.3.0

Changed

  • Docker credentials (~/.docker/config.json) are now given priority over registry-based inferred credential helpers. (#1704)

Fixed

  • Fixed an issue with jibBuildTar where UP-TO-DATE checks were incorrect. (#1757)

1.2.0

Added

  • Container configurations in the base image are now propagated when registry uses the old V2 image manifest, schema version 1 (such as Quay). (#1641)
  • Can now prepend paths in the container to the computed classpath with jib.container.extraClasspath. (#1642)
  • Can now build in offline mode using --offline. (#718)
  • Now supports multiple extra directories with jib.extraDirectories.{paths|.permissions}. (#1020)

Changed

  • jib.extraDirectory({.path|.permissions}) are deprecated in favor of the new jib.extraDirectories.{paths|.permissions} configurations. (#1671)

Fixed

  • Labels in the base image are now propagated. (#1643)
  • Fixed an issue with using OCI base images. (#1683)

1.1.2

Fixed

  • Fixed an issue where automatically generated parent directories in a layer did not get their timestamp configured correctly to epoch + 1s. (#1648)

1.1.1

Fixed

  • Fixed an issue where the plugin creates wrong images by adding base image layers in reverse order when registry uses the old V2 image manifest, schema version 1 (such as Quay). (#1627)

1.1.0

Changed

  • os and architecture are taken from base image. (#1564)

Fixed

  • Fixed an issue where pushing to Docker Hub fails when the host part of an image reference is docker.io. (#1549)

1.0.2

Added

  • Java 9+ WAR projects are now supported and run on the distroless Jetty Java 11 image (https://github.com/GoogleContainerTools/distroless) by default. Java 8 projects remain on the distroless Jetty Java 8 image. (#1510)
  • Now supports authentication against Azure Container Registry using docker-credential-acr-* credential helpers. (#1490)

Fixed

  • Fixed an issue where setting allowInsecureRegistries may fail to try HTTP. (#1517)
  • Crash on talking to servers that do not set the Content-Length HTTP header or send an incorrect value. (#1512)

1.0.1

Added

Fixed

  • Failure to infer main class when main method is defined using varargs (i.e. public static void main(String... args)). (#1456)

1.0.0

Changed

  • Shortened progress bar display - make sure console window is at least 50 characters wide or progress bar display can be messy. (#1361)

1.0.0-rc2

Added

  • Setting proxy credentials (via system properties http(s).proxyUser and http(s).proxyPassword) is now supported.

Changed

  • Java 9+ projects using the default distroless Java 8 base image will now fail to build. (#1143)

1.0.0-rc1

Added

  • jib.baseImageCache and jib.applicationCache system properties for setting cache directories. (#1238)
  • Build progress shown via a progress bar - set -Djib.console=plain to show progress as log messages. (#1297)

Changed

  • Removed jib.useOnlyProjectCache parameter in favor of the jib.useOnlyProjectCache system property. (#1308)

Fixed

  • Builds failing due to dependency JARs with the same name. (#810)

0.10.1

Added

  • Image ID is now written to build/jib-image.id. (#1204)
  • jib.container.entrypoint = 'INHERIT' allows inheriting ENTRYPOINT and CMD from the base image. While inheriting ENTRYPOINT, you can also override CMD using jib.container.args.
  • container.workingDirectory configuration parameter to set the working directory. (#1225)
  • Adds support for configuring volumes. (#1121)
  • Exposed ports are now propagated from the base image. (#595)
  • Docker health check is now propagated from the base image. (#595)

Changed

  • Removed jibExportDockerContext task. (#1219)

Fixed

  • NullPointerException thrown with incomplete auth configuration. (#1177)

0.10.0

Added

  • Properties for each configuration parameter, allowing any parameter to be set via commandline. (#1083)
  • jib.to.credHelper and jib.from.credHelper can be used to specify a credential helper suffix or a full path to a credential helper executable. (#925)
  • container.user configuration parameter to configure the user and group to run the container as. (#1029)
  • Preliminary support for building images for WAR projects. (#431)
  • jib.extraDirectory closure with a path and permissions field. (#794)
    • jib.extraDirectory.path configures the extra layer directory (still also configurable via jib.extraDirectory = file(...))
    • jib.extraDirectory.permissions is a map from absolute path on container to the file's permission bits (represented as an octal string).
  • Image digest is now written to build/jib-image.digest. (#933)
  • Adds the layer type to the layer history as comments. (#1198)
  • jibDockerBuild.dockerClient.executable and jibDockerBuild.dockerClient.environment to set Docker client binary path (defaulting to docker) and additional environment variables to apply when running the binary. (#1214)

Changed

  • Removed deprecated jib.jvmFlags, jib.mainClass, jib.args, and jib.format in favor of the equivalents under jib.container. (#461)
  • jibExportDockerContext generates different directory layout and Dockerfile to enable WAR support. (#1007)
  • File timestamps in the built image are set to 1 second since the epoch (hence 1970-01-01T00:00:01Z) to resolve compatibility with applications on Java 6 or below where the epoch means nonexistent or I/O errors; previously they were set to the epoch. (#1079)
  • Sets tag to "latest" instead of "unspecified" if jib.to.image and project version are both unspecified when running jibDockerBuild or jibBuildTar. (#1096)

0.9.13

Fixed

  • Adds environment variable configuration to Docker context generator. (#890 (comment))

0.9.12

Fixed

  • Cannot access 'image': it is public in <anonymous> error. (#1060)

0.9.11

Added

  • container.environment configuration parameter to configure environment variables. (#890)
  • container.appRoot configuration parameter to configure app root in the image. (#984)
  • jib.to.tags (list) defines additional tags to push to. (#978)

Fixed

  • Keep duplicate layers to match container history. (#1017)

0.9.10

Added

  • container.labels configuration parameter for configuring labels. (#751)
  • container.entrypoint configuration parameter to set the entrypoint. (#579)
  • history to layer metadata. (#875)
  • Propagates working directory from the base image. (#902)

Fixed

  • Corrects permissions for directories in the container filesystem. (#772)

0.9.9

Added

  • Passthrough labels from base image. (#750)

Changed

  • Reordered classpath in entrypoint to use resources, classes, and then dependencies, to allow dependency patching. . (#777). Note that this classpath ordering differs from that used by Gradle's run task.
  • Changed logging level of missing build output directory message. (#677)

Fixed

  • Gradle project dependencies have their assemble task run before running a jib task. (#815)

0.9.8

Added

  • Docker context generation now includes snapshot dependencies and extra files. (#516)
  • Disable parallel operation by setting the jibSerialize system property to true. (#682)

Changed

  • Propagates environment variables from the base image. (#716)
  • allowInsecureRegistries allows connecting to insecure HTTPS registries (for example, registries using self-signed certificates). (#733)

Fixed

  • Slow image reference parsing. (#680)
  • Building empty layers. (#516)
  • Duplicate layer entries causing unbounded cache growth. (#721)
  • Incorrect authentication error message when target and base registry are the same. (#758)

0.9.7

Added

  • Snapshot dependencies are added as their own layer. (#584)
  • jibBuildTar task to build an image tarball at build/jib-image.tar, which can be loaded into docker using docker load. (#514)
  • container.useCurrentTimestamp parameter to set the image creation time to the build time. (#413)
  • Authentication over HTTP using the sendCredentialsOverHttp system property. (#599)
  • HTTP connection and read timeouts for registry interactions configurable with the jib.httpTimeout system property. (#656)
  • Docker context export command-line option --targetDir to --jibTargetDir. (#662)

Changed

  • Docker context export command-line option --targetDir to --jibTargetDir. (#662)

Fixed

  • Using multi-byte characters in container configuration. (#626)
  • For Docker Hub, also tries registry aliases when getting a credential from the Docker config. (#605)

0.9.6

Fixed

  • Using a private registry that does token authentication with allowInsecureRegistries set to true. (#572)

0.9.5

Added

  • Incubating feature to build src/main/jib as extra layer in image. (#562)

0.9.4

Fixed

  • Fixed handling case-insensitive Basic authentication method. (#546)
  • Fixed regression that broke pulling base images from registries that required token authentication. (#549)

0.9.3

Fixed

  • Using Docker config for finding registry credentials (was not ignoring extra fields and handling https protocol). (#524)

0.9.2

Added

  • Can configure jibExportDockerContext output directory with jibExportDockerContext.targetDir. (#492)

Changed

Fixed

  • Set jibExportDockerContext output directory with command line option --targetDir. (#499)

0.9.1

Added

  • container.ports parameter to define container's exposed ports (similar to Dockerfile EXPOSE). (#383)
  • Can set allowInsecureRegistries parameter to true to use registries that only support HTTP. (#388)

Changed

  • Fetches credentials from inferred credential helper before Docker config. (#401)
  • Container creation date set to timestamp 0. (#341)
  • Does not authenticate base image pull unless necessary - reduces build time by about 500ms. (#414)
  • jvmFlags, mainClass, args, and format are now grouped under container configuration object. (#384)
  • Warns instead of errors when classes not found. (#462)

Fixed

  • Using Azure Container Registry now works - define credentials in jib.to.auth/jib.from.auth. (#415)
  • Supports access_token as alias to token in registry authentication. (#420)
  • Docker context export for Groovy project. (#459)
  • Visibility of jib.to.image. (#460)

0.9.0

Added

  • Export a Docker context (including a Dockerfile) with jibExportDockerContext. (#204)
  • Warns if build may not be reproducible. (#245)
  • jibDockerBuild gradle task to build straight to Docker daemon. (#265)
  • mainClass is inferred by searching through class files if configuration is missing. (#278)
  • All tasks depend on classes by default. (#335)
  • Can now specify target image with --image. (#328)
  • args parameter to define default main arguments. (#346)

Changed

  • Removed reproducible parameter - application layers will always be reproducible. (#245)

Fixed

  • Using base images that lack entrypoints. (#284

0.1.1

Added

  • Warns if specified mainClass is not a valid Java class. (#206)
  • Can specify registry credentials to use directly with from.auth and to.auth. (#215)