Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
@@ -368,7 +368,7 @@ impl MainAction for LeptosService {
|
||||
.container()
|
||||
.from(update_deployments_docker_image);
|
||||
|
||||
let dep = if let Some(sock) = std::env::var("SSH_AUTH_SOCK").ok() {
|
||||
let dep = if let Ok(sock) = std::env::var("SSH_AUTH_SOCK") {
|
||||
dep.with_unix_socket("/tmp/ssh_sock", self.client.host().unix_socket(sock))
|
||||
.with_env_variable("SSH_AUTH_SOCK", "/tmp/ssh_sock")
|
||||
.with_exec(vec![
|
||||
|
@@ -1,13 +1,12 @@
|
||||
use std::{path::PathBuf, sync::Arc};
|
||||
use std::{path::PathBuf};
|
||||
|
||||
use async_trait::async_trait;
|
||||
use dagger_rust::source::RustSource;
|
||||
use dagger_sdk::Container;
|
||||
use futures::{stream, StreamExt};
|
||||
use futures::{StreamExt};
|
||||
|
||||
use crate::{
|
||||
cli,
|
||||
dagger_middleware::{DaggerMiddleware, DynMiddleware},
|
||||
rust_service::architecture::{Architecture, Os},
|
||||
MainAction, PullRequestAction,
|
||||
};
|
||||
|
@@ -11,6 +11,12 @@ pub struct Apt {
|
||||
deps: Vec<String>,
|
||||
}
|
||||
|
||||
impl Default for Apt {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl Apt {
|
||||
pub fn new() -> Self {
|
||||
Self { deps: Vec::new() }
|
||||
|
@@ -9,6 +9,12 @@ use super::RustService;
|
||||
|
||||
pub struct AptCaCertificates {}
|
||||
|
||||
impl Default for AptCaCertificates {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl AptCaCertificates {
|
||||
pub fn new() -> Self {
|
||||
Self {}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
use std::{path::PathBuf, sync::Arc};
|
||||
|
||||
use async_trait::async_trait;
|
||||
use dagger_sdk::{Container, HostDirectoryOpts, HostDirectoryOptsBuilder};
|
||||
use dagger_sdk::{Container};
|
||||
|
||||
use crate::{dagger_middleware::DaggerMiddleware, leptos_service::LeptosService};
|
||||
|
||||
@@ -37,8 +37,8 @@ impl DaggerMiddleware for Assets {
|
||||
.fold(container, |container, (src_asset_path, dest_asset_path)| {
|
||||
let src_path = src_asset_path.display().to_string();
|
||||
let dest_path = dest_asset_path.display().to_string();
|
||||
let path = self.client.host().directory(&src_path);
|
||||
container.with_directory(&dest_path, path)
|
||||
let path = self.client.host().directory(src_path);
|
||||
container.with_directory(dest_path, path)
|
||||
});
|
||||
|
||||
Ok(container)
|
||||
|
@@ -9,6 +9,12 @@ use super::RustService;
|
||||
|
||||
pub struct CargoClean;
|
||||
|
||||
impl Default for CargoClean {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl CargoClean {
|
||||
pub fn new() -> Self {
|
||||
Self {}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use async_trait::async_trait;
|
||||
use dagger_sdk::{Container, ImageMediaTypes};
|
||||
use dagger_sdk::{Container};
|
||||
|
||||
use crate::dagger_middleware::DaggerMiddleware;
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use async_trait::async_trait;
|
||||
use dagger_sdk::{Container, ContainerWithNewFileOptsBuilder, Socket};
|
||||
use dagger_sdk::{Container, ContainerWithNewFileOptsBuilder};
|
||||
use eyre::Context;
|
||||
|
||||
use crate::{dagger_middleware::DaggerMiddleware, leptos_service::LeptosService};
|
||||
@@ -30,7 +30,7 @@ impl DaggerMiddleware for SshAgent {
|
||||
|
||||
let c = container
|
||||
.with_new_file_opts(
|
||||
format!(".ssh/config"),
|
||||
".ssh/config".to_string(),
|
||||
ContainerWithNewFileOptsBuilder::default()
|
||||
.contents(
|
||||
r#"
|
||||
@@ -40,7 +40,7 @@ Host *
|
||||
|
||||
"#,
|
||||
)
|
||||
.permissions(0700 as isize)
|
||||
.permissions(0700_isize)
|
||||
.build()?,
|
||||
)
|
||||
.with_unix_socket(&sock_var, socket)
|
||||
|
Reference in New Issue
Block a user