OASIS-learn-study / minecraft-storeys-maker

Minecraft extension to make your own stories in, with and for Minecraft - it's like being a movie director!
https://www.learn.study
GNU Affero General Public License v3.0
15 stars 10 forks source link

Run build in container - but still cache (fixes #374) #381

Closed vorburger closed 2 years ago

vorburger commented 2 years ago

@edewit how do you like this?

See #374 for background (which this addresses / fixes).

PS: Note that this removes node from the runtime container (but still uses it in the build container); that was done under the assumption that you will review, test and merge this only AFTER #376. (If you have hesitations about #376, or would like to keep the "scratch server VM" stuff around a little longer, then we would just have to add that RUN curl -fsSL https://deb.nodesource.com/setup_17.x | bash - && apt install -y nodejs && node --version line that with this is only in the Dockerfile-build back to the Dockerfile as well.)

vorburger commented 2 years ago

Oups - hang on, this (a) breaks the Google Cloud Build, and (b) ./test now doesn't work anymore when Eclipse is open:

FAILURE: Build failed with an exception.

* What went wrong:
Gradle could not start your build.
> Cannot create service of type BuildTreeActionExecutor using method LauncherServices$ToolingBuildTreeScopeServices.createActionExecutor() as there is a problem with parameter #1 of type List<BuildActionRunner>.
   > Cannot create service of type BuildModelActionRunner using BuildModelActionRunner constructor as there is a problem with parameter #1 of type PayloadSerializer.
      > Cannot create service of type PayloadSerializer using method LauncherServices$ToolingGradleUserHomeScopeServices.createPayloadSerializer() as there is a problem with parameter #2 of type PayloadClassLoaderFactory.
         > Cannot create service of type PayloadClassLoaderFactory using method LauncherServices$ToolingGradleUserHomeScopeServices.createClassLoaderFactory() as there is a problem with parameter #1 of type CachedClasspathTransformer.
            > Cannot create service of type DefaultCachedClasspathTransformer using DefaultCachedClasspathTransformer constructor as there is a problem with parameter #6 of type FileSystemAccess.
               > Cannot create service of type FileSystemAccess using method VirtualFileSystemServices$GradleUserHomeServices.createFileSystemAccess() as there is a problem with parameter #2 of type VirtualFileSystem.
                  > Cannot create service of type BuildLifecycleAwareVirtualFileSystem using method VirtualFileSystemServices$GradleUserHomeServices.createVirtualFileSystem() as there is a problem with parameter #6 of type GlobalCacheLocations.
                     > Cannot create service of type GlobalCacheLocations using method GradleUserHomeScopeServices.createGlobalCacheLocations() as there is a problem with parameter #1 of type List<GlobalCache>.
                        > Could not create service of type FileAccessTimeJournal using GradleUserHomeScopeServices.createFileAccessTimeJournal().
                           > Timeout waiting to lock journal cache (/root/.gradle/caches/journal-1). It is currently in use by another Gradle instance.
                             Owner PID: 2514170
                             Our PID: 35
                             Owner Operation:
                             Our operation:
                             Lock file: /root/.gradle/caches/journal-1/journal-1.lock

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1m 2s
vorburger commented 2 years ago

Voilà! So NOW this actually fully works... 😄 @edewit ready for your review / test / merge!