flyway / flyway-docker

Official Flyway Docker images
Apache License 2.0
211 stars 82 forks source link

Volumes gitlab #5

Closed sam2908 closed 5 years ago

sam2908 commented 5 years ago

Hello :)

docker run --rm -v /DemoBranche/flyway/drivers:/flyway/drivers boxfuse/flyway -url=jdbc:oracle:thin:@//--------------.ssg:0000/DDDDD -user=BBBBBB -password=**** info

Running with gitlab-runner 11.4.2 (cf91d5e1) on fab04-runner b94be1f1 Using Docker executor with image tmaier/docker-compose:latest ... Pulling docker image tmaier/docker-compose:latest ... Using docker image sha256:057ad4402c723f22dce4915d48679b74401e7b9643c194a90921bd10f6d13c96 for tmaier/docker-compose:latest ... Running on runner-b94be1f1-project-407-concurrent-0 via 73f8c5927a0a... Fetching changes... HEAD is now at 57b5123 test 2

57b5123..345317f master -> origin/master Checking out 345317f1 as master... Skipping Git submodules setup $ chmod +x deploy.sh $ ./deploy.sh

Usage

flyway [options] command

By default, the configuration will be read from conf/flyway.conf. Options passed from the command-line override the configuration.

Commands

migrate : Migrates the database clean : Drops all objects in the configured schemas info : Prints the information about applied, current and pending migrations validate : Validates the applied migrations against the ones on the classpath undo : [pro] Undoes the most recently applied versioned migration baseline : Baselines an existing database at the baselineVersion repair : Repairs the schema history table

Options (Format: -key=value)

driver : Fully qualified classname of the JDBC driver url : Jdbc url to use to connect to the database user : User to use to connect to the database password : Password to use to connect to the database connectRetries : Maximum number of retries when attempting to connect to the database initSql : SQL statements to run to initialize a new database connection schemas : Comma-separated list of the schemas managed by Flyway table : Name of Flyway's schema history table locations : Classpath locations to scan recursively for migrations resolvers : Comma-separated list of custom MigrationResolvers skipDefaultResolvers : Skips default resolvers (jdbc, sql and Spring-jdbc) sqlMigrationPrefix : File name prefix for versioned SQL migrations undoSqlMigrationPrefix : [pro] File name prefix for undo SQL migrations repeatableSqlMigrationPrefix : File name prefix for repeatable SQL migrations sqlMigrationSeparator : File name separator for SQL migrations sqlMigrationSuffixes : Comma-separated list of file name suffixes for SQL migrations stream : [pro] Stream SQL migrations when executing them batch : [pro] Batch SQL statements when executing them mixed : Allow mixing transactional and non-transactional statements encoding : Encoding of SQL migrations placeholderReplacement : Whether placeholders should be replaced placeholders : Placeholders to replace in sql migrations placeholderPrefix : Prefix of every placeholder placeholderSuffix : Suffix of every placeholder installedBy : Username that will be recorded in the schema history table target : Target version up to which Flyway should use migrations outOfOrder : Allows migrations to be run "out of order" callbacks : Comma-separated list of FlywayCallback classes skipDefaultCallbacks : Skips default callbacks (sql) validateOnMigrate : Validate when running migrate ignoreMissingMigrations : Allow missing migrations when validating ignoreIgnoredMigrations : Allow ignored migrations when validating ignorePendingMigrations : Allow pending migrations when validating ignoreFutureMigrations : Allow future migrations when validating cleanOnValidationError : Automatically clean on a validation error cleanDisabled : Whether to disable clean baselineVersion : Version to tag schema with when executing baseline baselineDescription : Description to tag schema with when executing baseline baselineOnMigrate : Baseline on migrate against uninitialized non-empty schema configFiles : Comma-separated list of config files to use configFileEncoding : Encoding to use when loading the config files jarDirs : Comma-separated list of dirs for Jdbc drivers & Java migrations dryRunOutput : [pro] File where to output the SQL statements of a migration dry run errorOverrides : [pro] Rules to override specific SQL states and errors codes oracle.sqlplus : [pro] Enable Oracle SQL*Plus command support licenseKey : [pro] Your Flyway license key

Flags

-X : Print debug output -q : Suppress all output, except for errors and warnings -n : Suppress prompting for a user and password -v : Print the Flyway version and exit -? : Print this usage info and exit -community : Run the Flyway Community Edition (default) -trial : Run the Flyway Trial Edition -pro : Run the Flyway Pro Edition -enterprise : Run the Flyway Enterprise Edition

Example

flyway -user=myuser -password=s3cr3t -url=jdbc:h2:mem -placeholders.abc=def migrate

More info at https://flywaydb.org/documentation/commandline ERROR: Unable to instantiate JDBC driver: oracle.jdbc.OracleDriver => Check whether the jar file is present ERROR: Job failed: exit code 1

axelfontaine commented 5 years ago

Not sure what your question is. But yes the error message say it all, check that the Oracle JDBC driver is present. See https://flywaydb.org/documentation/database/oracle#driver for obtaining it.