Class BuildConfiguration

  • All Implemented Interfaces:
    java.lang.Iterable<com.ibm.dbb.task.configuration.LifecycleStep>

    public class BuildConfiguration
    extends java.lang.Object
    implements java.lang.Iterable<com.ibm.dbb.task.configuration.LifecycleStep>
    • Constructor Detail

      • BuildConfiguration

        public BuildConfiguration()
    • Method Detail

      • load

        public void load​(java.io.File yamlFile,
                         java.io.File sourceDir)
                  throws java.io.IOException,
                         BuildException
        Loads a Build Configuration yaml file and an application configuration file if one is found or included.
        Parameters:
        yamlFile - the yaml file to load.
        sourceDir - the source directory to search for the application configuration if one is not included.
        Throws:
        java.io.IOException - on issues during File IO when loading the yaml content or walking the file tree for included files.
        BuildException - on configuration issues, or issues retrieving the build directory.
      • mergeApplicationConfiguration

        public void mergeApplicationConfiguration​(ApplicationConfiguration applicationConfiguration)
        Merges an ApplicationConfiguration on top of the one stored in this BuildConfiguration object.
        Parameters:
        applicationConfiguration - the configuration to merge.
      • getLookupTasks

        public java.util.Map<java.lang.String,​com.ibm.dbb.task.configuration.AbstractTaskConfiguration> getLookupTasks()
      • getLifecycleConfigurations

        public java.util.Map<java.lang.String,​com.ibm.dbb.task.configuration.LifecycleConfiguration> getLifecycleConfigurations()
      • getVariables

        public com.ibm.dbb.task.variables.internal.VariableGroup getVariables()
      • getLifecycle

        public java.lang.String getLifecycle()
      • setLifecycle

        public void setLifecycle​(java.lang.String lifecycle)
                          throws com.ibm.dbb.task.configuration.ConfigurationException
        Throws:
        com.ibm.dbb.task.configuration.ConfigurationException
      • getLifecycleConfiguration

        public com.ibm.dbb.task.configuration.LifecycleConfiguration getLifecycleConfiguration()
      • getLifecycleVariables

        public TaskVariables getLifecycleVariables​(BuildContext context)
        Constructs a variables object containing variables associated with the build and lifecycle. Variables associated with tasks are not inserted.
        Returns:
        TaskVariables
      • iterator

        public BuildConfiguration.LifecycleIterator iterator​(java.lang.String lifecycle,
                                                             BuildContext buildContext)
        Provides an iterator over the input lifecycle, providing tasks and associated variables objects.
        Parameters:
        lifecycle - the lifecycle to iterate over.
        buildContext - the context variables to inject into constructed variables objects.
        Returns:
        an iterator over the input lifecycle.