Travis

Struct Travis 

Source
pub struct Travis {
Show 39 fields pub allow_failure: bool, pub branch: String, pub build_dir: PathBuf, pub build_id: String, pub build_number: usize, pub commit: String, pub commit_message: String, pub commit_range: Option<String>, pub event_type: EventType, pub job_id: String, pub job_number: String, pub os: Option<OS>, pub osx_image: Option<String>, pub pull_request: Option<String>, pub pull_request_branch: Option<String>, pub pull_request_sha: Option<String>, pub pull_request_slug: Option<String>, pub repo_slug: String, pub secure_env_vars: bool, pub sudo: bool, pub tag: Option<String>, pub dart_version: Option<String>, pub go_version: Option<String>, pub haxe_version: Option<String>, pub jdk_version: Option<String>, pub julia_version: Option<String>, pub node_version: Option<String>, pub otp_release: Option<String>, pub perl_version: Option<String>, pub php_version: Option<String>, pub python_version: Option<String>, pub r_version: Option<String>, pub ruby_version: Option<String>, pub rust_version: Option<String>, pub scala_version: Option<String>, pub xcode_sdk: Option<String>, pub xcode_scheme: Option<String>, pub xcode_project: Option<String>, pub xcode_workspace: Option<String>, /* private fields */
}
Expand description

Fields§

§allow_failure: bool
  • set to true if the job is allowed to fail.
  • set to false if the job is not allowed to fail.
§branch: String
  • for push builds, or builds not triggered by a pull request, this is the name of the branch.
  • for builds triggered by a pull request this is the name of the branch targeted by the pull request.
  • for builds triggered by a tag, this is the same as the name of the tag (TRAVIS_TAG).

Note that for tags, git does not store the branch from which a commit was tagged.

§build_dir: PathBuf

The absolute path to the directory where the repository being built has been copied on the worker.

§build_id: String

The id of the current build that Travis CI uses internally.

§build_number: usize

The number of the current build (for example, 4).

§commit: String

The commit that the current build is testing.

§commit_message: String

The commit subject and body, unwrapped.

§commit_range: Option<String>

The range of commits that were included in the push or pull request. (Note that this is empty for builds triggered by the initial commit of a new branch.)

§event_type: EventType

Indicates how the build was triggered.

§job_id: String

The id of the current job that Travis CI uses internally.

§job_number: String

The number of the current job (for example, 4.1).

§os: Option<OS>

On multi-OS builds, this value indicates the platform the job is running on.

§osx_image: Option<String>

The osx_image value configured in .travis.yml. If this is not set in .travis.yml, it is emtpy.

§pull_request: Option<String>

The pull request number if the current job is a pull request.

§pull_request_branch: Option<String>

If the current job is a pull request, the name of the branch from which the PR originated.

§pull_request_sha: Option<String>

if the current job is a pull request, the commit SHA of the HEAD commit of the PR.

§pull_request_slug: Option<String>

if the current job is a pull request, the slug (in the form owner_name/repo_name) of the repository from which the PR originated.

§repo_slug: String

The slug (in form: owner_name/repo_name) of the repository currently being built.

§secure_env_vars: bool
  • set to true if there are any encrypted environment variables.
  • set to false if no encrypted environment variables are available.
§sudo: bool

true or false based on whether sudo is enabled.

§tag: Option<String>

If the current build is for a git tag, this variable is set to the tag’s name.

§dart_version: Option<String>

The current version of dart being used to run the build (if any).

§go_version: Option<String>

The current version of go being used to run the build (if any).

§haxe_version: Option<String>

The current version of haxe being used to run the build (if any).

§jdk_version: Option<String>

The current version of jdk being used to run the build (if any).

§julia_version: Option<String>

The current version of julia being used to run the build (if any).

§node_version: Option<String>

The current version of node being used to run the build (if any).

§otp_release: Option<String>

The current version of otp being used to run the build (if any).

§perl_version: Option<String>

The current version of perl being used to run the build (if any).

§php_version: Option<String>

The current version of php being used to run the build (if any).

§python_version: Option<String>

The current version of python being used to run the build (if any).

§r_version: Option<String>

The current version of r being used to run the build (if any).

§ruby_version: Option<String>

The current version of ruby being used to run the build (if any).

§rust_version: Option<String>

The current version of rust being used to run the build (if any).

§scala_version: Option<String>

The current version of scala being used to run the build (if any).

§xcode_sdk: Option<String>

The current XCode SDK being used to run the build (if any).

§xcode_scheme: Option<String>

The current XCode Scheme being used to run the build (if any).

§xcode_project: Option<String>

The current XCode Project being used to run the build (if any).

§xcode_workspace: Option<String>

The current XCode Workspace being used to run the build (if any).

Implementations§

Source§

impl Travis

Source

pub fn from_env() -> Option<Self>

Construct this provider’s information from the environment.

Trait Implementations§

Source§

impl Clone for Travis

Source§

fn clone(&self) -> Travis

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Travis

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Travis

§

impl RefUnwindSafe for Travis

§

impl Send for Travis

§

impl Sync for Travis

§

impl Unpin for Travis

§

impl UnwindSafe for Travis

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.