-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
jib.extraDirectories.permissions to change folder/file permissions #2438
Comments
I'm sorry, I think I was confused. And I am still confused. Seems like both you and I are confused. We need to make sure we are on the same page. I thought you were using Jib to create another customized Gradle image based on Rather, now I see this is what you are doing.
If my understanding is right, then the following are meaningless, because they are the container configuration for the image being built by Jib. These don't affect the runtime environment (that is,
And it is possible that these may be meaningless too for the same reason. These are the settings for the image being built by Jib.
I think there are serious confusions. From the command Therefore, I believe that running the following Gradle command without Jib inside this Tekton step will just fail as well.
If my understanding is correct, this is not a Jib issue and not something Jib can resolve. It's just that you cannot run Gradle with |
Closing this as this is not a Jib issue. Some related stuff is also explained in tektoncd/catalog#289 (comment). Here, the problem seems to be that running the Again, I am closing this, but feel free to update. I did have an issue of the same nature when I tried to create the Jib Gradle Tekton catalog sample. |
FTR: issue resolved after @2020testuser configured a Tekton Task so that Gradle can create necessary files. |
Could anyone please let me know whether jib.extraDirectories.paths and jib.extraDirectories.permissions params set in gradle jib build changes the directories permissions?
In my tekton pipeline, I have the below command inside the script param of Gradle 4.6 image (in Docker repo.)
gradle wrapper build service:jib --no-build-cache --recompile-scripts -S -i --debug --scan -x test
-Djib.container.user='1000:1000'
-Djib.container.user='gradle:gradle'
-Djib.extraDirectories.paths = ['/workspace/app', '/workspace/app/service']
-Djib.extraDirectories.permissions = ['/workspace/is360api': '775', '/workspace/app/service': '775'] \
Environment:
Tekton Pipeline , Kubernetes 1.18, Gradle 4.6 and Jib 4.0.4
Description of the issue:
jib.extraDirectories.paths and jib.extraDirectories.permissions params set in gradle jib build doesn't seem to be working as expected.
Expected behavior:
jib.extraDirectories.paths and jib.extraDirectories.permissions params changes the folder/file permissions when set in gradle build jib command.
Steps to reproduce:
Error Message:
service-build-step] 09:16:33.389 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Caused by: org.gradle.internal.service.ServiceCreationException: Could not create service of type CrossBuildFileHashCache using BuildSessionScopeServices.createCrossBuildFileHashCache().
[service-build-step] 09:16:33.389 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.internal.service.DefaultServiceRegistry$FactoryMethodService.invokeMethod(DefaultServiceRegistry.java:857)
[service-build-step] 09:16:33.389 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.internal.service.DefaultServiceRegistry$FactoryService.create(DefaultServiceRegistry.java:808)
[service-build-step] 09:16:33.389 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.internal.service.DefaultServiceRegistry$ManagedObjectServiceProvider.getInstance(DefaultServiceRegistry.java:612)
[service-build-step] 09:16:33.389 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.internal.service.DefaultServiceRegistry$SingletonService.get(DefaultServiceRegistry.java:669)
[service-build-step] 09:16:33.389 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.internal.service.DefaultServiceRegistry$FactoryService.assembleParameters(DefaultServiceRegistry.java:821)
[service-build-step] 09:16:33.390 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Caused by: org.gradle.api.UncheckedIOException: Failed to create parent directory '/workspace/app/service/.gradle' when creating directory '/workspace/app/service/.gradle/4.6/fileHashes'
Thanks in advance!
The text was updated successfully, but these errors were encountered: