Skip to content

Commit ed8cc09

Browse files
Merge pull request #1198 from element-hq/gaelg/ca-not-dependant-on-path
Fix some path should not be relative to the script directory
2 parents 5aea6ec + e08c972 commit ed8cc09

File tree

6 files changed

+6
-9
lines changed

6 files changed

+6
-9
lines changed

DEVELOPERS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ A test cluster can be constructed with `./scripts/setup_test_cluster.sh`. It wil
8686
that `http://anything.localhost` or `https://anything.localhost` both work.
8787
* Install `metrics-server` into the cluster
8888
* Install `cert-manager` into the cluster
89-
* Construct a self-signed CA and puts its cert and key in `./.ca`.
89+
* Construct a self-signed CA and puts its cert and key in `~/.config/ess-helm-ca`.
9090
This will be persisted over cluster recreation so you can trust it once and use it repeatedly.
9191
* Construct a set of application namespaces.
9292
* This defaults to `ess` but can be controlled with the `ESS_NAMESPACES` environment variable

newsfragments/1198.internal.1.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CI: Cache `pyhelm` pulled chart relatively to the runner directory, not to the script install path.

newsfragments/1198.internal.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Developers: Move `.ca` to `~/.config/ess-helm-ca`.

scripts/setup_test_cluster.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@ k3d_context_name="k3d-$k3d_cluster_name"
1212
# Space separated list of namespaces to use
1313
ess_namespaces=${ESS_NAMESPACES:-ess}
1414

15-
root_folder="$(git rev-parse --show-toplevel)"
16-
ca_folder="$root_folder/.ca"
17-
mkdir -p "$ca_folder"
18-
1915
uv run setup-ess-cluster
2016

2117
k3d kubeconfig merge ess-helm -ds

tests/integration/fixtures/cluster.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ async def cert_manager(helm_client, kube_client):
175175
wait=True,
176176
)
177177

178-
ca_folder = Path(__file__).parent.parent.parent.parent / ".ca"
178+
ca_folder = os.environ.get("HOME") / ".config" / "ess-helm-ca"
179179
if not ca_folder.exists():
180180
ca_folder.mkdir()
181181
ca_crt_path = Path(ca_folder) / "ca.crt"

tests/integration/lib/utils.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,9 +268,8 @@ async def forward_matching_logs(input_logs_queue: asyncio.Queue, output_matchers
268268

269269

270270
async def chart_from_ci_cache(helm_client: pyhelm3.Client, chart_ref: str) -> pyhelm3.Chart:
271-
project_root = Path(__file__).parent.parent.parent.parent
272-
if os.environ.get("CI"):
273-
helm_cache = project_root / ".pyhelm_cache"
271+
if os.environ.get("GITHUB_WORKSPACE"):
272+
helm_cache = Path(os.environ["GITHUB_WORKSPACE"]) / ".pyhelm_cache"
274273
helm_cache.mkdir(parents=True, exist_ok=True)
275274
chart_name = chart_ref.split("/")[-1]
276275
cached_ref = helm_cache / chart_name

0 commit comments

Comments
 (0)