Giter Site home page Giter Site logo

Publish a release with #4204 about jib HOT 3 CLOSED

glasser avatar glasser commented on June 9, 2024 2
Publish a release with #4204

from jib.

Comments (3)

izogfif avatar izogfif commented on June 9, 2024

While the next version of JIB is getting prepared for release, you may try this workaround:

I'm using multi-module Gradle project with buildSrc folder containing build scripts. I was able to achieve reproducible builds with JIB 3.4.1 like this: I modified buildSrc/build.gradle.kts file by adding constraints block in dependencies section:

dependencies {
    // Other dependencies
    implementation("com.google.cloud.tools:jib-gradle-plugin:3.4.1")
    constraints {
        implementation("org.apache.commons:commons-compress") {
            version {
                strictly("1.21")
                because("For reproducibility of JIB images")
            }
        }
    }
}

Unrelated to JIB, but related to Spring Boot and Jar packaging tasks: I also added these blocks:

springBoot {
    buildInfo {
        excludes.set(setOf("time"))
    }
}

tasks.withType<org.springframework.boot.gradle.tasks.bundling.BootJar> {
    isPreserveFileTimestamps = false
    isReproducibleFileOrder = true
}

tasks.withType<Jar> {
    isPreserveFileTimestamps = false
    isReproducibleFileOrder = true
}

Now running ./gradlew clean build jibBuildTar --no-build-cache produces same .tar file every time!

from jib.

carolosfw avatar carolosfw commented on June 9, 2024

We are also impacted by this and we use Bazel. A release soon would be very much appreciated.
Since apparently commons-compress 1.21 may have a vulnerability.

from jib.

mpeddada1 avatar mpeddada1 commented on June 9, 2024

jib-gradle-plugin:3.4.2 and jib-maven-plugin:3.4.2 have been released with the fix in #4204! Thanks again for your help @izogfif and @@bjornbugge!

from jib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.