Skip to content

Commit

Permalink
add amalthea to deploy action (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
Panaetius authored Jan 12, 2024
1 parent 2b36bd7 commit 22dad9f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
8 changes: 8 additions & 0 deletions check-pr-description/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ outputs:
renku-data-services:
description: renku-data-services reference as specified in the command string
value: ${{ steps.check-string.outputs.renku-data-services }}
amalthea:
description: amalthea reference as specified in the command string
value: ${{ steps.check-string.outputs.amalthea}}
extra-values:
description: "extra values passed to helm; separate multiple values with commas: key1=val1,key2=val2"
value: ${{ steps.check-string.outputs.extra-values }}
Expand Down Expand Up @@ -78,6 +81,11 @@ runs:
echo "renku-notebooks reference: ${BASH_REMATCH[1]}"
echo "renku-notebooks=@${BASH_REMATCH[1]}" >> $GITHUB_OUTPUT
fi
match="amalthea=(\S*)"
if [[ $command =~ $match ]]; then
echo "amalthea reference: ${BASH_REMATCH[1]}"
echo "amalthea=@${BASH_REMATCH[1]}" >> $GITHUB_OUTPUT
fi
match="renku-ui=(\S*)"
if [[ $command =~ $match ]]; then
echo "renku-ui reference: ${BASH_REMATCH[1]}"
Expand Down
14 changes: 13 additions & 1 deletion deploy-renku/deploy-dev-renku.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
import re
import tempfile
import urllib.request
import yaml
from pathlib import Path
from subprocess import check_call

import json_merge_patch
import yaml
from packaging.version import Version

components = [
Expand All @@ -29,6 +29,7 @@
"renku-notebooks",
"renku-ui",
"renku-data-services",
"amalthea",
]


Expand Down Expand Up @@ -143,6 +144,17 @@ def configure_component_versions(component_versions: dict, values_file: Path) ->
if req.ref:
req.setup()
patches[component] = req.update_values(values_file)
if component == "amalthea":
reqs_path = tempdir / "renku" / "helm-chart/renku/requirements.yaml"
with open(reqs_path) as f:
reqs = yaml.load(f, Loader=yaml.SafeLoader)
for dep in reqs["dependencies"]:
if dep["name"] == component.replace("_", "-"):
dep["version"] = req.version
dep["repository"] = req.helm_repo
continue
with open(reqs_path, "w") as f:
yaml.dump(reqs, f)
return patches


Expand Down

0 comments on commit 22dad9f

Please sign in to comment.