mirror of
https://github.com/kjuulh/dagger-rs.git
synced 2025-08-17 20:53:29 +02:00
Compare commits
2 Commits
feat/dagge
...
dagger-sdk
Author | SHA1 | Date | |
---|---|---|---|
40ece05140
|
|||
2a29a66217 |
4
Cargo.lock
generated
4
Cargo.lock
generated
@@ -317,7 +317,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "dagger-core"
|
||||
version = "0.2.10"
|
||||
version = "0.2.11"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"base64",
|
||||
@@ -341,7 +341,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "dagger-sdk"
|
||||
version = "0.2.21"
|
||||
version = "0.2.22"
|
||||
dependencies = [
|
||||
"dagger-core",
|
||||
"derive_builder",
|
||||
|
@@ -8,6 +8,6 @@ edition = "2021"
|
||||
[dependencies]
|
||||
clap = "4.1.6"
|
||||
color-eyre = "0.6.2"
|
||||
dagger-sdk = { path = "../crates/dagger-sdk/", version = "^0.2.21" }
|
||||
dagger-sdk = { path = "../crates/dagger-sdk/", version = "^0.2.22" }
|
||||
eyre = "0.6.8"
|
||||
tokio = { version = "1.25.0", features = ["full"] }
|
||||
|
@@ -18,7 +18,7 @@ pub fn render_object(funcs: &CommonFunctions, t: &FullType) -> eyre::Result<rust
|
||||
Ok(quote! {
|
||||
#[derive(Clone)]
|
||||
pub struct $(t.name.pipe(|s| format_name(s))) {
|
||||
pub proc: $arc<$child>,
|
||||
pub proc: Option<$arc<$child>>,
|
||||
pub selection: $selection,
|
||||
pub graphql_client: $graphql_client
|
||||
}
|
||||
|
@@ -5,6 +5,33 @@ All notable changes to this project will be documented in this file.
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## v0.2.11 (2023-04-29)
|
||||
|
||||
### New Features
|
||||
|
||||
- <csr-id-2a29a66217fa4d6c530ea1ce670c8836383e7051/> dagger-run support
|
||||
- <csr-id-eb7470c604169d1a15976078c0889d5cc7011257/> update to dagger-5.1
|
||||
|
||||
### Commit Statistics
|
||||
|
||||
<csr-read-only-do-not-edit/>
|
||||
|
||||
- 2 commits contributed to the release.
|
||||
- 4 days passed between releases.
|
||||
- 2 commits were understood as [conventional](https://www.conventionalcommits.org).
|
||||
- 0 issues like '(#ID)' were seen in commit messages
|
||||
|
||||
### Commit Details
|
||||
|
||||
<csr-read-only-do-not-edit/>
|
||||
|
||||
<details><summary>view details</summary>
|
||||
|
||||
* **Uncategorized**
|
||||
- dagger-run support ([`2a29a66`](https://github.com/kjuulh/dagger-sdk/commit/2a29a66217fa4d6c530ea1ce670c8836383e7051))
|
||||
- update to dagger-5.1 ([`eb7470c`](https://github.com/kjuulh/dagger-sdk/commit/eb7470c604169d1a15976078c0889d5cc7011257))
|
||||
</details>
|
||||
|
||||
## v0.2.10 (2023-04-25)
|
||||
|
||||
### Bug Fixes
|
||||
@@ -15,7 +42,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
<csr-read-only-do-not-edit/>
|
||||
|
||||
- 1 commit contributed to the release.
|
||||
- 2 commits contributed to the release.
|
||||
- 21 days passed between releases.
|
||||
- 1 commit was understood as [conventional](https://www.conventionalcommits.org).
|
||||
- 0 issues like '(#ID)' were seen in commit messages
|
||||
@@ -27,6 +54,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
<details><summary>view details</summary>
|
||||
|
||||
* **Uncategorized**
|
||||
- Release dagger-core v0.2.10 ([`8011c42`](https://github.com/kjuulh/dagger-sdk/commit/8011c42dc077d101b1bccaf231fac17636dd249d))
|
||||
- delete other files/folder in downloads: #57 ([`9d3c21d`](https://github.com/kjuulh/dagger-sdk/commit/9d3c21d16b4a64eb7a7b1888365a4c4ea56d7225))
|
||||
</details>
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "dagger-core"
|
||||
version = "0.2.10"
|
||||
version = "0.2.11"
|
||||
edition = "2021"
|
||||
readme = "README.md"
|
||||
license-file = "LICENSE.MIT"
|
||||
|
@@ -23,10 +23,25 @@ impl Engine {
|
||||
pub async fn start(
|
||||
&self,
|
||||
cfg: &Config,
|
||||
) -> eyre::Result<(ConnectParams, tokio::process::Child)> {
|
||||
) -> eyre::Result<(ConnectParams, Option<tokio::process::Child>)> {
|
||||
tracing::info!("starting dagger-engine");
|
||||
|
||||
// TODO: Add from existing session as well
|
||||
self.from_cli(cfg).await
|
||||
if let Ok(conn) = self.from_session_env().await {
|
||||
return Ok((conn, None));
|
||||
}
|
||||
|
||||
let (conn, proc) = self.from_cli(cfg).await?;
|
||||
|
||||
Ok((conn, Some(proc)))
|
||||
}
|
||||
|
||||
async fn from_session_env(&self) -> eyre::Result<ConnectParams> {
|
||||
let port = std::env::var("DAGGER_SESSION_PORT").map(|p| p.parse::<u64>())??;
|
||||
let token = std::env::var("DAGGER_SESSION_TOKEN")?;
|
||||
|
||||
Ok(ConnectParams {
|
||||
port,
|
||||
session_token: token,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@@ -6,8 +6,37 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to
|
||||
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## v0.2.22 (2023-04-29)
|
||||
|
||||
### New Features
|
||||
|
||||
- <csr-id-2a29a66217fa4d6c530ea1ce670c8836383e7051/> dagger-run support
|
||||
- <csr-id-eb7470c604169d1a15976078c0889d5cc7011257/> update to dagger-5.1
|
||||
|
||||
### Commit Statistics
|
||||
|
||||
<csr-read-only-do-not-edit/>
|
||||
|
||||
- 2 commits contributed to the release.
|
||||
- 4 days passed between releases.
|
||||
- 2 commits were understood as [conventional](https://www.conventionalcommits.org).
|
||||
- 0 issues like '(#ID)' were seen in commit messages
|
||||
|
||||
### Commit Details
|
||||
|
||||
<csr-read-only-do-not-edit/>
|
||||
|
||||
<details><summary>view details</summary>
|
||||
|
||||
* **Uncategorized**
|
||||
- dagger-run support ([`2a29a66`](https://github.com/kjuulh/dagger-sdk/commit/2a29a66217fa4d6c530ea1ce670c8836383e7051))
|
||||
- update to dagger-5.1 ([`eb7470c`](https://github.com/kjuulh/dagger-sdk/commit/eb7470c604169d1a15976078c0889d5cc7011257))
|
||||
</details>
|
||||
|
||||
## v0.2.21 (2023-04-25)
|
||||
|
||||
<csr-id-09881ee39bdfb9201d104e4679a51c3b76b5fe27/>
|
||||
|
||||
### Chore
|
||||
|
||||
- <csr-id-09881ee39bdfb9201d104e4679a51c3b76b5fe27/> add new dagger-core-version
|
||||
@@ -16,7 +45,7 @@ and this project adheres to
|
||||
|
||||
<csr-read-only-do-not-edit/>
|
||||
|
||||
- 1 commit contributed to the release.
|
||||
- 2 commits contributed to the release.
|
||||
- 21 days passed between releases.
|
||||
- 1 commit was understood as [conventional](https://www.conventionalcommits.org).
|
||||
- 0 issues like '(#ID)' were seen in commit messages
|
||||
@@ -28,6 +57,7 @@ and this project adheres to
|
||||
<details><summary>view details</summary>
|
||||
|
||||
* **Uncategorized**
|
||||
- Release dagger-sdk v0.2.21 ([`6937ef0`](https://github.com/kjuulh/dagger-sdk/commit/6937ef0ace797315013513aa7e2af39a9206a738))
|
||||
- add new dagger-core-version ([`09881ee`](https://github.com/kjuulh/dagger-sdk/commit/09881ee39bdfb9201d104e4679a51c3b76b5fe27))
|
||||
</details>
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "dagger-sdk"
|
||||
version = "0.2.21"
|
||||
version = "0.2.22"
|
||||
edition = "2021"
|
||||
readme = "README.md"
|
||||
license-file = "LICENSE.MIT"
|
||||
@@ -11,7 +11,7 @@ publish = true
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
dagger-core = { workspace = true, version = "0.2.10" }
|
||||
dagger-core = { workspace = true, version = "^0.2.11" }
|
||||
|
||||
eyre = { workspace = true }
|
||||
tokio = { workspace = true }
|
||||
|
@@ -21,7 +21,7 @@ pub async fn connect_opts(cfg: Config) -> eyre::Result<DaggerConn> {
|
||||
let (conn, proc) = DaggerEngine::new().start(&cfg).await?;
|
||||
|
||||
Ok(Arc::new(Query {
|
||||
proc: Arc::new(proc),
|
||||
proc: proc.map(|p| Arc::new(p)),
|
||||
selection: query(),
|
||||
graphql_client: Arc::new(DefaultGraphQLClient::new(&conn)),
|
||||
}))
|
||||
|
@@ -115,7 +115,7 @@ pub struct PipelineLabel {
|
||||
}
|
||||
#[derive(Clone)]
|
||||
pub struct CacheVolume {
|
||||
pub proc: Arc<Child>,
|
||||
pub proc: Option<Arc<Child>>,
|
||||
pub selection: Selection,
|
||||
pub graphql_client: DynGraphQLClient,
|
||||
}
|
||||
@@ -129,7 +129,7 @@ impl CacheVolume {
|
||||
}
|
||||
#[derive(Clone)]
|
||||
pub struct Container {
|
||||
pub proc: Arc<Child>,
|
||||
pub proc: Option<Arc<Child>>,
|
||||
pub selection: Selection,
|
||||
pub graphql_client: DynGraphQLClient,
|
||||
}
|
||||
@@ -1728,7 +1728,7 @@ impl Container {
|
||||
}
|
||||
#[derive(Clone)]
|
||||
pub struct Directory {
|
||||
pub proc: Arc<Child>,
|
||||
pub proc: Option<Arc<Child>>,
|
||||
pub selection: Selection,
|
||||
pub graphql_client: DynGraphQLClient,
|
||||
}
|
||||
@@ -2235,7 +2235,7 @@ impl Directory {
|
||||
}
|
||||
#[derive(Clone)]
|
||||
pub struct EnvVariable {
|
||||
pub proc: Arc<Child>,
|
||||
pub proc: Option<Arc<Child>>,
|
||||
pub selection: Selection,
|
||||
pub graphql_client: DynGraphQLClient,
|
||||
}
|
||||
@@ -2256,7 +2256,7 @@ impl EnvVariable {
|
||||
}
|
||||
#[derive(Clone)]
|
||||
pub struct File {
|
||||
pub proc: Arc<Child>,
|
||||
pub proc: Option<Arc<Child>>,
|
||||
pub selection: Selection,
|
||||
pub graphql_client: DynGraphQLClient,
|
||||
}
|
||||
@@ -2323,7 +2323,7 @@ impl File {
|
||||
}
|
||||
#[derive(Clone)]
|
||||
pub struct GitRef {
|
||||
pub proc: Arc<Child>,
|
||||
pub proc: Option<Arc<Child>>,
|
||||
pub selection: Selection,
|
||||
pub graphql_client: DynGraphQLClient,
|
||||
}
|
||||
@@ -2382,7 +2382,7 @@ impl GitRef {
|
||||
}
|
||||
#[derive(Clone)]
|
||||
pub struct GitRepository {
|
||||
pub proc: Arc<Child>,
|
||||
pub proc: Option<Arc<Child>>,
|
||||
pub selection: Selection,
|
||||
pub graphql_client: DynGraphQLClient,
|
||||
}
|
||||
@@ -2451,7 +2451,7 @@ impl GitRepository {
|
||||
}
|
||||
#[derive(Clone)]
|
||||
pub struct Host {
|
||||
pub proc: Arc<Child>,
|
||||
pub proc: Option<Arc<Child>>,
|
||||
pub selection: Selection,
|
||||
pub graphql_client: DynGraphQLClient,
|
||||
}
|
||||
@@ -2592,7 +2592,7 @@ impl Host {
|
||||
}
|
||||
#[derive(Clone)]
|
||||
pub struct HostVariable {
|
||||
pub proc: Arc<Child>,
|
||||
pub proc: Option<Arc<Child>>,
|
||||
pub selection: Selection,
|
||||
pub graphql_client: DynGraphQLClient,
|
||||
}
|
||||
@@ -2617,7 +2617,7 @@ impl HostVariable {
|
||||
}
|
||||
#[derive(Clone)]
|
||||
pub struct Label {
|
||||
pub proc: Arc<Child>,
|
||||
pub proc: Option<Arc<Child>>,
|
||||
pub selection: Selection,
|
||||
pub graphql_client: DynGraphQLClient,
|
||||
}
|
||||
@@ -2638,7 +2638,7 @@ impl Label {
|
||||
}
|
||||
#[derive(Clone)]
|
||||
pub struct Port {
|
||||
pub proc: Arc<Child>,
|
||||
pub proc: Option<Arc<Child>>,
|
||||
pub selection: Selection,
|
||||
pub graphql_client: DynGraphQLClient,
|
||||
}
|
||||
@@ -2665,7 +2665,7 @@ impl Port {
|
||||
}
|
||||
#[derive(Clone)]
|
||||
pub struct Project {
|
||||
pub proc: Arc<Child>,
|
||||
pub proc: Option<Arc<Child>>,
|
||||
pub selection: Selection,
|
||||
pub graphql_client: DynGraphQLClient,
|
||||
}
|
||||
@@ -2718,7 +2718,7 @@ impl Project {
|
||||
}
|
||||
#[derive(Clone)]
|
||||
pub struct Query {
|
||||
pub proc: Arc<Child>,
|
||||
pub proc: Option<Arc<Child>>,
|
||||
pub selection: Selection,
|
||||
pub graphql_client: DynGraphQLClient,
|
||||
}
|
||||
@@ -3087,7 +3087,7 @@ impl Query {
|
||||
}
|
||||
#[derive(Clone)]
|
||||
pub struct Secret {
|
||||
pub proc: Arc<Child>,
|
||||
pub proc: Option<Arc<Child>>,
|
||||
pub selection: Selection,
|
||||
pub graphql_client: DynGraphQLClient,
|
||||
}
|
||||
@@ -3108,7 +3108,7 @@ impl Secret {
|
||||
}
|
||||
#[derive(Clone)]
|
||||
pub struct Socket {
|
||||
pub proc: Arc<Child>,
|
||||
pub proc: Option<Arc<Child>>,
|
||||
pub selection: Selection,
|
||||
pub graphql_client: DynGraphQLClient,
|
||||
}
|
||||
|
Reference in New Issue
Block a user