Giter VIP home page Giter VIP logo

Comments (4)

wakingrufus avatar wakingrufus commented on June 2, 2024 1

3.3.1 included 3696e6c which changed creationTime to a Property.
you can set it like:

creationTime.set("USE_CURRENT_TIMESTAMP")

or by upgrading gradle to 8.2.1

or, in gradle 8.1.1, setting systemProp.org.gradle.unsafe.kotlin.assignment=true in gradle.properties

from jib.

burkedavison avatar burkedavison commented on June 2, 2024

Hello @neogeogre, I haven't been able to replicate your issue. Could you try following the below example and seeing if it works for you?

My steps:

  • examples/helloworld/build.gradle:
    1. Verified line 3 is id 'com.google.cloud.tools.jib' version '3.3.2'
    2. Updated line 17 to jib.to.image = 'gcr.io/<myproject>/image-built-with-jib'
  • Execute ./gradlew jib. Result: Container uploaded to gcr.io with creation date Dec 31, 1969
  • Modify examples/helloworld/build.gradle with new line 18:
    jib.container.creationTime = "USE_CURRENT_TIMESTAMP"
  • Execute ./gradlew jib. Result: Container uploaded to gcr.io with creation date

Final build.gradle:

plugins {
  id 'java'
  id 'com.google.cloud.tools.jib' version '3.3.2'
}

sourceCompatibility = 1.8
targetCompatibility = 1.8

repositories {
  mavenCentral()
}

dependencies {
  implementation 'com.google.guava:guava:23.6-jre'
}

jib.to.image = 'gcr.io/<myproject>/image-built-with-jib'
jib.container.creationTime = "USE_CURRENT_TIMESTAMP"

Screenshot:
image

from jib.

neogeogre avatar neogeogre commented on June 2, 2024

Thank you @wakingrufus, this solved the issue, what is difficult to guess is that now properties are not all set in the same way like:

container {
    ports = listOf("8080")
    creationTime.set("USE_CURRENT_TIMESTAMP")
}

from jib.

wakingrufus avatar wakingrufus commented on June 2, 2024

Thank you @wakingrufus, this solved the issue, what is difficult to guess is that now properties are not all set in the same way like:

container {
    ports = listOf("8080")
    creationTime.set("USE_CURRENT_TIMESTAMP")
}

Yes its not ideal. But eventually everything should be a property. Also in gradle 8.2+ the = syntax works with properties

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.