Quickstart - CI / CD Pipeline
Published 23 July 2024
Depending on which CI/CD pipeline system you are using these instructions may vary. Note: Flyway Pipelines does not currently work with flyway.conf files this is something we are working on resolving, please contact adam.britt@red-gate.com if this is something you require. If you want to use Flyway please upgrade your conf file to a TOML using the instructions here
- Go to the link provided below and copy the resulting token.
- Personal Access Tokens (red-gate.com)
2. Configure the CI Pipeline
- Within you CI system add the following on the command line or as environment variables or secrets.
Once you have your personal access token and environment, we recommend you configure Flyway to use the
token and environment in one of two ways:
Command Line
flyway migrate -publishResult=true -email="<emailLinkedToPAT>" -token="<your personal access token>"
- Environment Variables
- FLYWAY_TOKEN="<your personal access token>"
- FLYWAY_ENVIRONMENT="<your environment>"
FLYWAY_PUBLISH_RESULT=true
FLYWAY_CHECK_DRIFT_ON_MIGRATE=true
FLYWAY_EMAIL=<your Redgate email>
NOTE: You should treat the token as a secret, we don't recommend committing this to source control. The email configuration option can also be configured on the command line, in an environment variable, or in the TOML
Example in Github actions:
3. Publishing insights to the Flyway Service
- To see your deployment event being published to the service all you need to do run your pipeline
- Ensure that you have at least one pending migration script
- When Flyway Migrate runs the results will be published to the service
4. Viewing your deployments in the Flyway Service
The flyway migrate operation has now published its results to the Flyway Service. Simply visit https://flyway.red-gate.com/ to open the pipeline dashboard view.
You can drill down to to view any environments that have deployments registered against them for a specific Flyway project.
Use show more to view the detailed deployment history for an environment.