Skip to content

Commit

Permalink
[DEBUG] comment out lint step
Browse files Browse the repository at this point in the history
  • Loading branch information
ronenh committed Nov 22, 2024
1 parent d891890 commit 5eb1c34
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 22 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ jobs:
uses: helm/chart-testing-action@v2.6.0
with:
version: v3.10.0
-
name: Lint
run: |
ct lint --config ct.yaml --helm-repo-extra-args "aserto-helm=-u gh -p ${READ_WRITE_TOKEN}"
# -
# name: Lint
# run: |
# ct lint --config ct.yaml --helm-repo-extra-args "aserto-helm=-u gh -p ${READ_WRITE_TOKEN}"
-
name: Install uv package manager
uses: astral-sh/setup-uv@v3
Expand All @@ -62,14 +62,16 @@ jobs:
name: Generate admin ssh key
id: sshkey
run: |
ssh-keygen -t ed25519 -N "" -f ~/.ssh/admin_ed25519
echo "public_key=~/.ssh/admin_ed25519.pub" >> $GITHUB_OUTPUT
echo "private_key=~/.ssh/admin_ed25519" >> $GITHUB_OUTPUT
ssh-keygen -t ed25519 -N "" -f $HOME/.ssh/admin_ed25519
echo "public_key=$HOME/.ssh/admin_ed25519.pub" >> $GITHUB_OUTPUT
echo "private_key=$HOME/.ssh/admin_ed25519" >> $GITHUB_OUTPUT
-
name: Test Directory
env:
SSH_PUBLIC_KEY: ${{ steps.sshkey.public_key }}
SSH_PRIVATE_KEY: ${{ steps.sshkey.private_key }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SSH_PUBLIC_KEY: ${{ steps.sshkey.outputs.public_key }}
SSH_PRIVATE_KEY: ${{ steps.sshkey.outputs.private_key }}
run: |
echo "Public key: $SSH_PUBLIC_KEY"
cd tools/ktest
uv run ktest.py ../../test/directory/tests.yaml
6 changes: 3 additions & 3 deletions charts/directory/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: aserto-lib
repository: file:///Users/ronenhilewicz/aserto-dev/helm/charts/aserto-lib
repository: file://../aserto-lib
version: 0.1.5
digest: sha256:d4b6380105553ea5153be1973c56dcf386900d68679a53c987a163760ca8bacd
generated: "2024-11-15T16:05:15.959277-05:00"
digest: sha256:26ffec3faa8dafcb519fd066e04d0d6c33dffaf8aa4052a39166500fb0343b66
generated: "2024-11-22T09:31:01.633697-05:00"
2 changes: 1 addition & 1 deletion charts/directory/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ dependencies:
- name: aserto-lib
version: ~0.1.5
# repository: oci://ghcr.io/aserto-dev/helm
repository: file:///Users/ronenhilewicz/aserto-dev/helm/charts/aserto-lib
repository: file://../aserto-lib
23 changes: 14 additions & 9 deletions tools/ktest/ktest.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

from kubernetes import config

from model import Spec, Test
from model import Deployment, Spec, Test
from namespace import Namespace

logger = logging.getLogger("k3stest")
Expand Down Expand Up @@ -41,21 +41,15 @@ def run(self):

for config_map in self.test.config_maps:
click.echo(
f"📋 {click.style("Creating sconfig map", fg=COLOR_HARNESS)} {config_map.name}"
f"📋 {click.style("Creating ssssig map", fg=COLOR_HARNESS)} {config_map.name}"
)
ns.create_config_map(config_map)

for deployment in self.test.deployments:
click.echo(
f"🗺️ {click.style("Installing chart:", fg=COLOR_HARNESS)} {deployment.chart}"
)
ns.helm(
"install",
deployment.chart,
path.join(self.git_root, "charts", deployment.chart),
"-f",
path.join(self.spec_path, deployment.values),
)
self.deploy_chart(deployment, ns)

for deployment in self.test.deployments:
ns.wait(ns.svc_pod(deployment.chart))
Expand All @@ -77,6 +71,17 @@ def run(self):
finally:
self.execute_cleanup()

def deploy_chart(self, deployment: Deployment, ns: Namespace):
chart_path = path.join(self.git_root, "charts", deployment.chart)
ns.helm("dep", "build", chart_path)
ns.helm(
"install",
deployment.chart,
chart_path,
"-f",
path.join(self.spec_path, deployment.values),
)

def execute_steps(self):
click.echo(f"\n🏃 {click.style("Running tests", fg=COLOR_HARNESS)}\n")
for step in self.test.run:
Expand Down

0 comments on commit 5eb1c34

Please sign in to comment.