Skip to content

Commit

Permalink
Merge pull request #30 from fluentci-io/fix/flox-permissions
Browse files Browse the repository at this point in the history
fix permissions issue with flox installation
  • Loading branch information
tsirysndr authored Jul 9, 2024
2 parents 18e67c5 + a5de765 commit 356dcf8
Show file tree
Hide file tree
Showing 11 changed files with 44 additions and 43 deletions.
14 changes: 7 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

![Cover](./.github/assets/ui.png)
![Cover](https://github.com/fluentci-io/fluentci-engine/raw/HEAD/.github/assets/ui.png)

# FluentCI Engine

Expand All @@ -24,7 +24,7 @@ FluentCI Engine is a programmable CI/CD engine (used by [FluentCI](https://githu
> and it is not yet ready for production use.
> It is not feature-complete, and it is not yet stable. Use at your own risk.
![Cover](./.github/assets/api.png)
![Cover](https://github.com/fluentci-io/fluentci-engine/raw/HEAD/.github/assets/api.png)

## ✨ Features

Expand Down Expand Up @@ -398,12 +398,12 @@ FluentCI Engine supports caching. To enable it, set the following environment va

FluentCI Engine supports OpenTelemetry tracing. To enable it, set the `OTEL_EXPORTER_OTLP_ENDPOINT` or `OTEL_EXPORTER_ZIPKIN_ENDPOINT` (if you want to use Zipkin) environment variable to the desired endpoint.

![jaeger](./.github/assets/jaeger.png)
![zipkin](./.github/assets/zipkin.png)
![honeycomb](./.github/assets/honeycomb.png)
![jaeger](https://github.com/fluentci-io/fluentci-engine/raw/HEAD/.github/assets/jaeger.png)
![zipkin](https://github.com/fluentci-io/fluentci-engine/raw/HEAD/.github/assets/zipkin.png)
![honeycomb](https://github.com/fluentci-io/fluentci-engine/raw/HEAD/.github/assets/honeycomb.png)

## 📑 Logging

FluentCI Engine supports sending logs to [Baselime](https://baselime.io). To enable it, set the `BASELIME_API_KEY` environment variable to the desired API key.

![baselime](./.github/assets/baselime.png)
![baselime](https://github.com/fluentci-io/fluentci-engine/raw/HEAD/.github/assets/baselime.png)
10 changes: 5 additions & 5 deletions crates/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ license = "MPL-2.0"
name = "fluentci-engine"
readme = "../../README.md"
repository = "https://github.com/fluentci-io/fluentci-engine"
version = "0.4.3"
version = "0.4.4"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
anyhow = "1.0.81"
clap = "3.2.20"
extism = "1.2.0"
fluentci-core = {path = "../core", version = "0.3.1"}
fluentci-ext = {path = "../ext", version = "0.2.1"}
fluentci-server = {path = "../server", version = "0.3.1"}
fluentci-shared = {path = "../shared", version = "0.2.1"}
fluentci-core = {path = "../core", version = "0.3.2"}
fluentci-ext = {path = "../ext", version = "0.2.2"}
fluentci-server = {path = "../server", version = "0.3.2"}
fluentci-shared = {path = "../shared", version = "0.2.2"}
get-port = "4.0.0"
md5 = "0.7.0"
regex = "1.10.3"
Expand Down
6 changes: 3 additions & 3 deletions crates/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ keywords = ["nix", "environment", "ci", "wasm", "devops"]
license = "MPL-2.0"
name = "fluentci-common"
repository = "https://github.com/fluentci-io/fluentci-engine"
version = "0.2.1"
version = "0.2.2"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
anyhow = "1.0.81"
dirs = "5.0.1"
fluentci-core = {path = "../core", version = "0.3.1"}
fluentci-ext = {path = "../ext", version = "0.2.1"}
fluentci-core = {path = "../core", version = "0.3.2"}
fluentci-ext = {path = "../ext", version = "0.2.2"}
fluentci-secrets = {path = "../secrets", version = "0.1.0"}
fluentci-types = {path = "../types", version = "0.1.7"}
regex = "1.10.4"
Expand Down
4 changes: 2 additions & 2 deletions crates/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ keywords = ["nix", "environment", "ci", "wasm", "devops"]
license = "MPL-2.0"
name = "fluentci-core"
repository = "https://github.com/fluentci-io/fluentci-engine"
version = "0.3.1"
version = "0.3.2"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
anyhow = "1.0.81"
chrono = "0.4.35"
dirs = "5.0.1"
fluentci-ext = {path = "../ext", version = "0.2.1"}
fluentci-ext = {path = "../ext", version = "0.2.2"}
fluentci-logging = {path = "../logging", version = "0.1.0"}
fluentci-secrets = {path = "../secrets", version = "0.1.0"}
fluentci-types = {path = "../types", version = "0.1.7"}
Expand Down
2 changes: 1 addition & 1 deletion crates/ext/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ keywords = ["nix", "environment", "ci", "wasm", "devops"]
license = "MPL-2.0"
name = "fluentci-ext"
repository = "https://github.com/fluentci-io/fluentci-engine"
version = "0.2.1"
version = "0.2.2"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
5 changes: 4 additions & 1 deletion crates/ext/src/devenv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ impl Extension for Devenv {
"echo \"trusted-users = root $USER\" | {} tee -a /etc/nix/nix.conf",
sudo
))
.stdin(Stdio::inherit())
.stdout(Stdio::inherit())
.stderr(Stdio::inherit())
.spawn()?
Expand All @@ -81,6 +82,7 @@ impl Extension for Devenv {
"{} nix profile install --accept-flake-config github:cachix/cachix",
sudo,
))
.stdin(Stdio::inherit())
.stdout(Stdio::inherit())
.stderr(Stdio::inherit())
.spawn()?
Expand All @@ -94,7 +96,8 @@ impl Extension for Devenv {

Command::new("sh")
.arg("-c")
.arg(&format!("{} nix profile install --accept-flake-config tarball+https://install.devenv.sh/latest",sudo ))
.arg(&format!("{} nix profile install --accept-flake-config tarball+https://install.devenv.sh/latest", sudo))
.stdin(Stdio::inherit())
.spawn()?
.wait()?;

Expand Down
12 changes: 5 additions & 7 deletions crates/ext/src/flox.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use std::{
env::consts::OS,
process::{Command, ExitStatus, Stdio},
sync::mpsc::Sender,
};
Expand Down Expand Up @@ -66,30 +65,29 @@ impl Extension for Flox {
"echo \"trusted-users = root $USER\" | {} tee -a /etc/nix/nix.conf",
sudo
))
.stdin(Stdio::inherit())
.stdout(Stdio::inherit())
.stderr(Stdio::inherit())
.spawn()?
.wait()?;

let sudo = if OS == "macos" { "sudo" } else { "" };

Command::new("sh")
.arg("-c")
.arg(&format!("echo 'extra-trusted-substituters = https://cache.floxdev.com' | {} tee -a /etc/nix/nix.conf && echo 'extra-trusted-public-keys = flox-cache-public-1:7F4OyH7ZCnFhcze3fJdfyXYLQw/aV7GEed86nQ7IsOs=' | {} tee -a /etc/nix/nix.conf", sudo, sudo))
.stdin(Stdio::inherit())
.stdout(Stdio::inherit())
.stderr(Stdio::inherit())
.spawn()?
.wait()?;

Command::new("sh")
.arg("-c")
.arg(&format!(
"{} nix profile install --impure \
.arg(
"nix profile install --impure \
--experimental-features 'nix-command flakes' \
--accept-flake-config \
github:flox/flox",
sudo
))
)
.stdout(Stdio::inherit())
.stderr(Stdio::inherit())
.spawn()?
Expand Down
8 changes: 4 additions & 4 deletions crates/graphql/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ keywords = ["nix", "environment", "ci", "wasm", "devops"]
license = "MPL-2.0"
name = "fluentci-graphql"
repository = "https://github.com/fluentci-io/fluentci-engine"
version = "0.3.1"
version = "0.3.2"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand All @@ -16,9 +16,9 @@ anyhow = "1.0.80"
async-graphql = "7.0.2"
async-graphql-actix-web = "7.0.2"
dirs = "5.0.1"
fluentci-common = {path = "../common", version = "0.2.1"}
fluentci-core = {path = "../core", version = "0.3.1"}
fluentci-ext = {path = "../ext", version = "0.2.1"}
fluentci-common = {path = "../common", version = "0.2.2"}
fluentci-core = {path = "../core", version = "0.3.2"}
fluentci-ext = {path = "../ext", version = "0.2.2"}
fluentci-secrets = {path = "../secrets", version = "0.1.0"}
fluentci-types = {path = "../types", version = "0.1.7"}
regex = "1.10.3"
Expand Down
6 changes: 3 additions & 3 deletions crates/server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ keywords = ["nix", "environment", "ci", "wasm", "devops"]
license = "MPL-2.0"
name = "fluentci-server"
repository = "https://github.com/fluentci-io/fluentci-engine"
version = "0.3.1"
version = "0.3.2"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand All @@ -17,8 +17,8 @@ actix-web = "4.5.1"
anyhow = "1.0.81"
async-graphql = "7.0.2"
async-graphql-actix-web = "7.0.2"
fluentci-core = {path = "../core", version = "0.3.1"}
fluentci-ext = {path = "../ext", version = "0.2.1"}
fluentci-core = {path = "../core", version = "0.3.2"}
fluentci-ext = {path = "../ext", version = "0.2.2"}
fluentci-graphql = {path = "../graphql", version = "0.3.1"}
mime_guess = "2.0.4"
owo-colors = "4.0.0"
Expand Down
8 changes: 4 additions & 4 deletions crates/shared/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ keywords = ["nix", "environment", "ci", "wasm", "devops"]
license = "MPL-2.0"
name = "fluentci-shared"
repository = "https://github.com/fluentci-io/fluentci-engine"
version = "0.2.1"
version = "0.2.2"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
anyhow = "1.0.82"
extism = "1.2.0"
extism-pdk = "1.1.0"
fluentci-common = {path = "../common", version = "0.2.1"}
fluentci-core = {path = "../core", version = "0.3.1"}
fluentci-ext = {path = "../ext", version = "0.2.1"}
fluentci-common = {path = "../common", version = "0.2.2"}
fluentci-core = {path = "../core", version = "0.3.2"}
fluentci-ext = {path = "../ext", version = "0.2.2"}
fluentci-secrets = {path = "../secrets", version = "0.1.0"}
fluentci-types = {path = "../types", version = "0.1.7"}
serde = {version = "1.0.197", features = ["serde_derive", "derive"]}
Expand Down

0 comments on commit 356dcf8

Please sign in to comment.