forked from krustlet/krustlet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
justfile-windows
41 lines (31 loc) · 2.42 KB
/
justfile-windows
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
set shell := ["powershell.exe", "-c"]
export RUST_LOG := "wasi_provider=debug,main=debug,kubelet=debug"
export PFX_PASSWORD := "testing"
export CONFIG_DIR := env_var_or_default('CONFIG_DIR', '$HOME\.krustlet\config')
# For backward compatibility with those running `just run-wasi`
run-wasi: run
build +FLAGS='--no-default-features --features rustls-tls,kubelet/derive':
cargo build {{FLAGS}}
test:
cargo fmt --all -- --check
cargo clippy --no-default-features --features rustls-tls
@# You can't pass in features with the --workspace flag, so we need to
@# change directory into each crate for testing. This will result in some
@# "not_used" errors as it isn't checking the whole workspace, but it should be
@# sufficient for now. We may want to consider improving things using `cfg`
@# directives to always pull in rustls-tls on windows machines
Push-Location .\crates\kubelet; cargo test --no-default-features --features rustls-tls,derive; Pop-Location
Push-Location .\crates\wasi-provider; cargo test --no-default-features --features rustls-tls,kubelet/derive; Pop-Location
test-e2e +FLAGS='--no-default-features --features rustls-tls,kubelet/derive':
cargo test --test integration_tests {{FLAGS}}
test-e2e-standalone +FLAGS='--no-default-features --features rustls-tls,kubelet/derive':
cargo run --bin oneclick {{FLAGS}}
test-e2e-ci +FLAGS='--no-default-features --features rustls-tls,kubelet/derive':
KRUSTLET_TEST_ENV=ci cargo test --test integration_tests {{FLAGS}}
test-e2e-standalone-ci +FLAGS='--no-default-features --features rustls-tls,kubelet/derive':
KRUSTLET_TEST_ENV=ci cargo run --bin oneclick {{FLAGS}}
run +FLAGS='--no-default-features --features rustls-tls,kubelet/derive': bootstrap
$env:KUBECONFIG = "$(Invoke-Expression "echo $env:CONFIG_DIR")\kubeconfig-wasi"; cargo run --bin krustlet-wasi {{FLAGS}} -- --node-name krustlet-wasi --port 3001 --bootstrap-file "$(Invoke-Expression "echo $env:CONFIG_DIR")\bootstrap.conf" --cert-file "$(Invoke-Expression "echo $env:CONFIG_DIR")\krustlet-wasi.crt" --private-key-file "$(Invoke-Expression "echo $env:CONFIG_DIR")\krustlet-wasi.key"
bootstrap:
@# This is to get around an issue with the default function returning a string that gets escaped
@if ( -not (Test-Path -LiteralPath "$(Invoke-Expression "echo $env:CONFIG_DIR")\bootstrap.conf") ) { $env:CONFIG_DIR = Invoke-Expression "echo $env:CONFIG_DIR"; .\scripts\bootstrap.ps1 }