Build and serve signed Linux ARM64 agent releases
This commit is contained in:
@@ -50,11 +50,34 @@ impl UpdateKeyringFile {
|
||||
pub enum Platform {
|
||||
#[serde(rename = "x86_64-unknown-linux-gnu")]
|
||||
LinuxX64,
|
||||
#[serde(rename = "aarch64-unknown-linux-gnu")]
|
||||
LinuxArm64,
|
||||
#[serde(rename = "x86_64-pc-windows-msvc")]
|
||||
WindowsX64,
|
||||
#[serde(rename = "x86_64-pc-windows-gnu")]
|
||||
WindowsGnuX64,
|
||||
}
|
||||
pub const LINUX_ARM64_RELEASE_CAPABILITY: &str = "agent.release.linux.arm64/1";
|
||||
|
||||
impl Platform {
|
||||
#[cfg(all(target_os = "linux", target_arch = "aarch64"))]
|
||||
pub const NATIVE_LINUX: Self = Self::LinuxArm64;
|
||||
#[cfg(all(target_os = "linux", target_arch = "x86_64"))]
|
||||
pub const NATIVE_LINUX: Self = Self::LinuxX64;
|
||||
|
||||
pub const fn is_linux(self) -> bool {
|
||||
matches!(self, Self::LinuxX64 | Self::LinuxArm64)
|
||||
}
|
||||
|
||||
pub const fn target_triple(self) -> &'static str {
|
||||
match self {
|
||||
Self::LinuxX64 => "x86_64-unknown-linux-gnu",
|
||||
Self::LinuxArm64 => "aarch64-unknown-linux-gnu",
|
||||
Self::WindowsX64 => "x86_64-pc-windows-msvc",
|
||||
Self::WindowsGnuX64 => "x86_64-pc-windows-gnu",
|
||||
}
|
||||
}
|
||||
}
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum ArtifactRole {
|
||||
@@ -708,7 +731,7 @@ impl ResolvedAgentUpdate {
|
||||
}
|
||||
pub fn execution_identity(&self) -> Option<&'static str> {
|
||||
self.manifest().ok().map(|m| match m.platform {
|
||||
Platform::LinuxX64 => "root",
|
||||
Platform::LinuxX64 | Platform::LinuxArm64 => "root",
|
||||
Platform::WindowsX64 | Platform::WindowsGnuX64 => "system",
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user