Giter Site home page Giter Site logo

Comments (2)

ragchuck avatar ragchuck commented on June 12, 2024

I have a similar issue but with the snapshot and execute-sql in. I use the outputFile parameter to specify the filename, but the github-action fails to execute.

[2023-07-13 12:53:33] INFO [liquibase.integration] Starting command execution.
[2023-07-13 12:53:33] FINE [liquibase.configuration] Found 'liquibase.outputFile' configuration of 'badm-postgres-pk_business.json'
    command argument '--output-file' of 'badm-postgres-pk_business.json'
[2023-07-13 12:53:33] SEVERE [liquibase.integration] badm-postgres-pk_business.json
java.nio.file.AccessDeniedException: badm-postgres-pk_business.json
	at java.base/sun.nio.fs.UnixException.translateToIOException(Unknown Source)
	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(Unknown Source)
	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(Unknown Source)
	at java.base/sun.nio.fs.UnixFileSystemProvider.newByteChannel(Unknown Source)
	at java.base/java.nio.file.spi.FileSystemProvider.newOutputStream(Unknown Source)
	at java.base/java.nio.file.Files.newOutputStream(Unknown Source)
	at liquibase.resource.DirectoryPathHandler.createResource(DirectoryPathHandler.java:52)
	at liquibase.resource.PathHandlerFactory.createResource(PathHandlerFactory.java:52)
	at liquibase.resource.PathHandlerFactory.openResourceOutputStream(PathHandlerFactory.java:95)
	at liquibase.integration.commandline.CommandRunner.call(CommandRunner.java:51)
	at liquibase.integration.commandline.CommandRunner.call(CommandRunner.java:24)
	at picocli.CommandLine.executeUserObject(CommandLine.java:2041)
	at picocli.CommandLine.access$1500(CommandLine.java:148)
	at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
	at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
	at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
	at picocli.CommandLine.execute(CommandLine.java:2170)
	at liquibase.integration.commandline.LiquibaseCommandLine.lambda$execute$2(LiquibaseCommandLine.java:381)
	at liquibase.Scope.child(Scope.java:206)
	at liquibase.Scope.child(Scope.java:182)
	at liquibase.integration.commandline.LiquibaseCommandLine.lambda$execute$3(LiquibaseCommandLine.java:356)
	at liquibase.Scope.child(Scope.java:206)
	at liquibase.Scope.child(Scope.java:182)
	at liquibase.integration.commandline.LiquibaseCommandLine.execute(LiquibaseCommandLine.java:354)
	at liquibase.integration.commandline.LiquibaseCommandLine.main(LiquibaseCommandLine.java:[94](https://atc-github.azure.cloud.bmw/q447823/badm-master/runs/3973955?check_suite_focus=true#step:8:95))
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
	at liquibase.integration.commandline.LiquibaseLauncher.main(LiquibaseLauncher.java:[107](https://atc-github.azure.cloud.bmw/q447823/badm-master/runs/3973955?check_suite_focus=true#step:8:108))

same issue when providing path like /github/workspace, where the workspace is mounted....

from github-action-generator.

ragchuck avatar ragchuck commented on June 12, 2024

after fiddling around I came up with a temporary directory that is created with -m777, where I can point the outputFile parameter, then liquibase can write the files.

Github Actions don't recommend to overwrite the default root user as explained here:

Note: GitHub Actions must be run by the default Docker user (root). Ensure your Dockerfile does not set the USER instruction, otherwise you will not be able to access GITHUB_WORKSPACE.
Source: https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#docker-container-filesystem

But the Liquibase container runs with USER 'liquibase', as defined here: https://github.com/liquibase/docker/blob/main/Dockerfile#L46

from github-action-generator.

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.