Add BuildConfig change trigger for initial build trigger
@@ -382,6 +382,10 @@ const (
// availability of a new version of an image
ImageChangeBuildTriggerType BuildTriggerType = "ImageChange"
ImageChangeBuildTriggerTypeDeprecated BuildTriggerType = "imageChange"
+
+ // ConfigChangeBuildTriggerType will trigger a build on an initial build config creation
+ // WARNING: In the future the behavior will change to trigger a build on any config change
+ ConfigChangeBuildTriggerType BuildTriggerType = "ConfigChange"
)
// BuildList is a collection of Builds.
@@ -436,6 +440,11 @@ type BuildRequest struct {
// From is the reference to the ImageStreamTag that triggered the build.
From *kapi.ObjectReference `json:"from,omitempty" description:"ImageStreamTag that triggered this build"`
+
+ // LastVersion (optional) is the LastVersion of the BuildConfig that was used
+ // to generate the build. If the BuildConfig in the generator doesn't match, a build will
+ // not be generated.
+ LastVersion *int `json:"lastVersion,omitempty" description:"LastVersion of the BuildConfig that triggered this build"`
}
// BuildLogOptions is the REST options for a build log
