Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-41995

Allow environment variables in flywayCommand

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • flyway-runner-plugin
    • None
    • flyway-runner v1.7

      It would be really handy to be able to have the flywayCommand use environment variables. This would allow us to use parameterised builds to choose utility commands such as info/clean/repair without needing to modify the job configuration. Only a minor priority as we can use conditional builds as a workaround and copy the other config items.

      From taking a look at the source, I think the following line would change: https://github.com/jenkinsci/flyway-runner-plugin/blob/master/src/main/java/sp/sd/flywayrunner/builder/FlywayBuilder.java#L171. I don't have a build environment to confirm though.

      Current line:
      cliCommand.addTokenized(flywayCommand);

      Proposed new line:
      cliCommand.addTokenized(build.getEnvironment(listener).expand(flywayCommand));

      Also, thanks for creating the plugin as it has helped our adaption of flyway where I work.

            pskumar448 Suresh Kumar
            haytona Hamish Carpenter
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: