pub struct BuildConfig {Show 23 fields
pub builder_id: String,
pub version: Version,
pub auto_increment_version: bool,
pub image_name: String,
pub image_tag: String,
pub git_provider: String,
pub git_https: bool,
pub git_account: String,
pub repo: String,
pub branch: String,
pub commit: String,
pub webhook_enabled: bool,
pub webhook_secret: String,
pub pre_build: SystemCommand,
pub image_registry: ImageRegistry,
pub build_path: String,
pub dockerfile_path: String,
pub skip_secret_interp: bool,
pub use_buildx: bool,
pub extra_args: Vec<String>,
pub build_args: Vec<EnvironmentVar>,
pub secret_args: Vec<EnvironmentVar>,
pub labels: Vec<EnvironmentVar>,
}Expand description
The build configuration.
Fields§
§builder_id: StringWhich builder is used to build the image.
version: VersionThe current version of the build.
auto_increment_version: boolWhether to automatically increment the patch on every build.
Default is true
image_name: StringAn alternate name for the image pushed to the repository. If this is empty, it will use the build name.
Can be used in conjunction with image_tag to direct multiple builds
with different configs to push to the same image registry, under different,
independantly versioned tags.
image_tag: StringAn extra tag put before the build version, for the image pushed to the repository.
Eg. in image tag of aarch64 would push to mbecker20/monitor_core:aarch64-1.13.2.
If this is empty, the image tag will just be the build version.
Can be used in conjunction with image_name to direct multiple builds
with different configs to push to the same image registry, under different,
independantly versioned tags.
git_provider: StringThe git provider domain. Default: github.com
git_https: boolWhether to use https to clone the repo (versus http). Default: true
Note. Monitor does not currently support cloning repos via ssh.
git_account: StringThe git account used to access private repos. Passing empty string can only clone public repos.
Note. A token for the account must be available in the core config or the builder server’s periphery config for the configured git provider.
repo: StringThe repo used as the source of the build.
branch: StringThe branch of the repo.
commit: StringOptionally set a specific commit hash.
webhook_enabled: boolWhether incoming webhooks actually trigger action.
webhook_secret: StringOptionally provide an alternate webhook secret for this build. If its an empty string, use the default secret from the config.
pre_build: SystemCommandThe optional command run after repo clone and before docker build.
image_registry: ImageRegistryConfiguration for the registry to push the built image to.
build_path: StringThe path of the docker build context relative to the root of the repo. Default: “.” (the root of the repo).
dockerfile_path: StringThe path of the dockerfile relative to the build path.
skip_secret_interp: boolWhether to skip secret interpolation in the build_args.
use_buildx: boolWhether to use buildx to build (eg docker buildx build ...)
extra_args: Vec<String>Any extra docker cli arguments to be included in the build command
build_args: Vec<EnvironmentVar>Docker build arguments.
These values are visible in the final image by running docker inspect.
secret_args: Vec<EnvironmentVar>Secret arguments.
These values remain hidden in the final image by using
docker secret mounts. See <https://docs.docker.com/build/building/secrets>.
The values can be used in RUN commands:
RUN --mount=type=secret,id=SECRET_KEY \
SECRET_KEY=$(cat /run/secrets/SECRET_KEY) ...labels: Vec<EnvironmentVar>Docker labels
Implementations§
Source§impl BuildConfig
impl BuildConfig
pub fn builder() -> BuildConfigBuilder
Trait Implementations§
Source§impl Clone for BuildConfig
impl Clone for BuildConfig
Source§fn clone(&self) -> BuildConfig
fn clone(&self) -> BuildConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BuildConfig
impl Debug for BuildConfig
Source§impl Default for BuildConfig
impl Default for BuildConfig
Source§impl<'de> Deserialize<'de> for BuildConfig
impl<'de> Deserialize<'de> for BuildConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl From<BuildConfig> for PartialBuildConfig
impl From<BuildConfig> for PartialBuildConfig
Source§fn from(value: BuildConfig) -> PartialBuildConfig
fn from(value: BuildConfig) -> PartialBuildConfig
Source§impl From<PartialBuildConfig> for BuildConfig
impl From<PartialBuildConfig> for BuildConfig
Source§fn from(value: PartialBuildConfig) -> BuildConfig
fn from(value: PartialBuildConfig) -> BuildConfig
Source§impl HasPartial for BuildConfig
impl HasPartial for BuildConfig
type Partial = PartialBuildConfig
fn merge_partial(self, partial: Self::Partial) -> BuildConfig
Source§impl PartialDiff<PartialBuildConfig, BuildConfigDiff> for BuildConfig
impl PartialDiff<PartialBuildConfig, BuildConfigDiff> for BuildConfig
Source§fn partial_diff(&self, partial: PartialBuildConfig) -> BuildConfigDiff
fn partial_diff(&self, partial: PartialBuildConfig) -> BuildConfigDiff
fn minimize_partial(&self, partial: P) -> P
Auto Trait Implementations§
impl Freeze for BuildConfig
impl RefUnwindSafe for BuildConfig
impl Send for BuildConfig
impl Sync for BuildConfig
impl Unpin for BuildConfig
impl UnwindSafe for BuildConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.