Skip to main content

Init

Struct Init 

Source
pub struct Init {
Show 16 fields pub binary: String, pub public_orb_namespaces: Vec<String>, pub private_orb_namespaces: Vec<String>, pub build_workflow: String, pub release_workflow: String, pub requires_job: Option<String>, pub release_after_job: String, pub orb_dir: String, pub ci_dir: PathBuf, pub orb_tools_version: String, pub docker_orb_version: String, pub docker_namespace: String, pub docker_context: String, pub orb_context: String, pub mcp: bool, pub dry_run: bool,
}
Expand description

Wire orb generation into an existing repo’s CI configuration.

Fields§

§binary: String

Name of the binary to introspect (must be on PATH).

§public_orb_namespaces: Vec<String>

CircleCI namespace(s) to publish the orb under as a public orb (repeatable). Must be set correctly on first init — visibility cannot be changed after the orb is created.

§private_orb_namespaces: Vec<String>

CircleCI namespace(s) to publish the orb under as a private orb (repeatable). Each listed namespace gets --private in its circleci orb create command. Must be set correctly on first init — visibility cannot be changed after the orb is created.

§build_workflow: String

Name of the build/validation workflow to patch.

§release_workflow: String

Name of the release workflow to patch.

§requires_job: Option<String>

Job in the build workflow that regenerate-orb should require.

§release_after_job: String

Job in the release workflow after which the generated release jobs (build-binary-release, pack-orb-release, build-container, ensure-orb-registered) should be gated. This is the sole mechanism for specifying where the generated jobs plug into the existing pipeline topology.

§orb_dir: String

Output directory for the generated orb source (relative to repo root).

§ci_dir: PathBuf

Path to the .circleci/ directory.

§orb_tools_version: String

circleci/orb-tools version to pin in generated CI.

§docker_orb_version: String

circleci/docker orb version to pin in generated CI.

§docker_namespace: String

Docker Hub (or registry) namespace for the built container image.

§docker_context: String

CircleCI context name holding Docker Hub credentials.

§orb_context: String

CircleCI context name holding orb publishing credentials.

§mcp: bool

Wire in toolkit/build_mcp_server after orb publish (requires jerus-org/circleci-toolkit).

§dry_run: bool

Show planned changes without modifying any files.

Implementations§

Source§

impl Init

Source

pub fn run(&self) -> Result<()>

Trait Implementations§

Source§

impl Args for Init

Source§

fn group_id() -> Option<Id>

Report the ArgGroup::id for this set of arguments
Source§

fn augment_args<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_args_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

impl Debug for Init

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromArgMatches for Init

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.

Auto Trait Implementations§

§

impl Freeze for Init

§

impl RefUnwindSafe for Init

§

impl Send for Init

§

impl Sync for Init

§

impl Unpin for Init

§

impl UnsafeUnpin for Init

§

impl UnwindSafe for Init

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more