@Target(value=TYPE)
@Retention(value=RUNTIME)
public @interface EnableFlamingock
configFile() to reference a YAML pipeline definition:
@EnableFlamingock(configFile = "config/pipeline.yaml")
public class MyMigrationConfig {
// Configuration class
}
stages() to define the pipeline inline:
@EnableFlamingock(
stages = {
@Stage(type = StageType.SYSTEM, location = "com.example.system"),
@Stage(type = StageType.LEGACY, location = "com.example.init"),
@Stage(location = "com.example.migrations")
}
)
public class MyMigrationConfig {
// Configuration class
}
configFile() OR stages() must be specified (mutually exclusive)StageType.SYSTEM is allowedStageType.LEGACY is allowedStage| Modifier and Type | Optional Element and Description |
|---|---|
java.lang.String |
configFile
Specifies the path to a YAML pipeline configuration file for file-based configuration.
|
Stage[] |
stages
Defines the pipeline stages.
|
boolean |
strictStageMapping
If true, the annotation processor will validate that all code-based changes
(classes annotated with @Change) are mapped to some stage.
|
public abstract Stage[] stages
Mutually exclusive with configFile(). When using stages,
do not specify a pipeline file.
Stage type restrictions:
StageType.SYSTEM is allowedStageType.LEGACY is allowedStageType.DEFAULT are allowedExample:
stages = {
@Stage(type = StageType.SYSTEM, location = "com.example.system"),
@Stage(type = StageType.LEGACY, location = "com.example.init"),
@Stage(type = StageType.DEFAULT, location = "com.example.changes")
}
Stagepublic abstract java.lang.String configFile
Mutually exclusive with stages(). When using a pipeline file,
do not specify stages in the annotation.
File resolution order:
src/main/resources/src/test/resources/Example:
configFile = "config/flamingock-pipeline.yaml"
public abstract boolean strictStageMapping