feat: fix ssh issues
Some checks failed
continuous-integration/drone/push Build is failing

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
Kasper Juul Hermansen 2023-08-11 20:01:05 +02:00
parent 3662b343b6
commit 1d2cba49aa
Signed by: kjuulh
GPG Key ID: 9AA7BC13CE474394
2 changed files with 26 additions and 1 deletions

View File

@ -295,6 +295,31 @@ impl DaggerCuddlePlease {
) )
.with_workdir("/mnt/app") .with_workdir("/mnt/app")
.with_directory(".", client.host().directory(".").id().await?) .with_directory(".", client.host().directory(".").id().await?)
.with_unix_socket(
"/tmp/ssh.sock",
client
.host()
.unix_socket(
std::env::var("SSH_AUTH_SOCK").expect("expect SSH_AUTH_SOCK to be present"),
)
.id()
.await?,
)
.with_env_variable("SSH_AUTH_SOCK", "/tmp/ssh.sock")
.with_new_file_opts(
"/root/.ssh/config",
dagger_sdk::ContainerWithNewFileOpts {
contents: Some(
"
Host *
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
",
),
owner: Some("root"),
permissions: Some(700),
},
)
.with_exec(vec![ .with_exec(vec![
"cuddle-please", "cuddle-please",
"release", "release",

View File

@ -11,7 +11,7 @@ pub async fn main() -> eyre::Result<()> {
token: std::env::var("CUDDLE_PLEASE_TOKEN") token: std::env::var("CUDDLE_PLEASE_TOKEN")
.expect("CUDDLE_PLEASE_TOKEN to be present"), .expect("CUDDLE_PLEASE_TOKEN to be present"),
}, },
log_level: None, log_level: Some(dagger_cuddle_please::models::LogLevel::Debug),
use_ssh_socket: true, use_ssh_socket: true,
}) })
.await?; .await?;