Skip to content

Commit

Permalink
contrast-releases: add mysql demo
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Meyer <[email protected]>
  • Loading branch information
katexochen committed Dec 31, 2024
1 parent 61b5f35 commit e788b4d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/contrast-releases.json
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,12 @@
"hash": "sha256-kPVlu+RyADUfQ6PPfR2NANR0BCuarfwDEe/VOvuI48g="
}
],
"mysql-demo.yml": [
{
"version": "v1.2.0",
"hash": "sha256-20oA0xafefkRQhz69E3d9kS1XV0WOBMQockcADA9l+Y="
}
],
"runtime-aks-clh-snp.yml": [
{
"version": "v1.1.0",
Expand Down
12 changes: 12 additions & 0 deletions packages/contrast-releases.nix
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,14 @@ let
passthru.exists = (builtins.compareVersions "v0.8.0" version) <= 0;
};

mysql-demo = fetchurl {
inherit version;
url = "https://github.com/edgelesssys/contrast/releases/download/${version}/mysql-demo.yml";
inherit (findVersion "mysql-demo.yml" version) hash;
# mysql-demo.yml was introduced in version v1.2.0
passthru.exists = (builtins.compareVersions "v1.2.0" version) <= 0;
};

# starting with version v1.1.0 all files have a platform-specific suffix.
platformSpecificFiles = builtins.listToAttrs (
lib.lists.map
Expand Down Expand Up @@ -126,6 +134,10 @@ let
mkdir -p $out/deployment
install -m 644 ${emojivoto} $out/deployment/emojivoto-demo.yml
''
+ lib.optionalString mysql-demo.exists ''
mkdir -p $out/deployment
install -m 644 ${mysql-demo} $out/deployment/mysql-demo.yml
''
+ lib.concatStrings (
lib.attrsets.mapAttrsToList (
platform: files:
Expand Down
1 change: 1 addition & 0 deletions packages/update-contrast-releases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ fields["coordinator.yml"]="./workspace/coordinator.yml"
fields["runtime.yml"]="./workspace/runtime.yml"
fields["emojivoto-demo.zip"]="./workspace/emojivoto-demo.zip"
fields["emojivoto-demo.yml"]="./workspace/emojivoto-demo.yml"
fields["mysql-demo.yml"]="./workspace/mysql-demo.yml"
for platform in aks-clh-snp metal-qemu-tdx k3s-qemu-tdx metal-qemu-snp k3s-qemu-snp rke2-qemu-tdx; do
fields["coordinator-${platform}.yml"]="./workspace/coordinator-${platform}.yml"
fields["runtime-${platform}.yml"]="./workspace/runtime-${platform}.yml"
Expand Down

0 comments on commit e788b4d

Please sign in to comment.