pub struct GitClone {
pub url: Url,
pub username: Option<String>,
pub password: Option<String>,
pub path: Option<String>,
}
Expand description
The processor configuration.
Fields§
§url: Url
The URL of the remote to fetch the repository from.
username: Option<String>
The optional username used to authenticate with the remote.
password: Option<String>
The optional password used to authenticate with the remote.
path: Option<String>
An optional path inside the workspace to clone the repository to. If no path is given, the root of the workspace is used. If the path does not exist, it will be created.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for GitClone
impl<'de> Deserialize<'de> for GitClone
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<'a> Processor<'a> for GitClone
impl<'a> Processor<'a> for GitClone
Source§fn validate(&self) -> Result<(), Self::Error>
fn validate(&self) -> Result<(), Self::Error>
Validate the GitClone
configuration.
§Errors
This method returns an error under the following circumstances:
- If a
path
option is provided that contains anything other than a simple relative path such asmy/path
. Anything such as../
, or/etc
is not allowed. The returned error is of typeError::Path
.
In a future update, this will also validate remote connectivity.
Source§fn run(&self, context: &Context) -> Result<Option<Self::Output>, Self::Error>
fn run(&self, context: &Context) -> Result<Option<Self::Output>, Self::Error>
Clone the repository as defined by the provided configuration.
The repository will be cloned in the automaat_core::Context
workspace, optionally in a child path
.
§Output
None
is returned if the processor runs successfully.
§Errors
Any errors during cloning will return an Error::Git
result value.