diff --git a/packages/contrast-releases.json b/packages/contrast-releases.json index 64cc316f98..0fc4aa5127 100644 --- a/packages/contrast-releases.json +++ b/packages/contrast-releases.json @@ -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", diff --git a/packages/contrast-releases.nix b/packages/contrast-releases.nix index 61008bb492..fce5d40ced 100644 --- a/packages/contrast-releases.nix +++ b/packages/contrast-releases.nix @@ -62,13 +62,27 @@ let passthru.exists = (builtins.compareVersions "v0.8.0" version) <= 0; }; - # starting with version v1.1.0 all files has a platform-specific suffix. + 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 ( platform: lib.attrsets.nameValuePair platform { - exist = (builtins.compareVersions "v1.1.0" version) <= 0; + exist = + ((builtins.compareVersions "v1.1.0" version) <= 0) + && ( + # These platforms were introduced as part of the v1.2.1 release. + (platform == "metal-qemu-tdx" || platform == "metal-qemu-snp") + && (builtins.compareVersions "v1.2.1" version) <= 0 + ); coordinator = fetchurl { inherit version; url = "https://github.com/edgelesssys/contrast/releases/download/${version}/coordinator-${platform}.yml"; @@ -83,6 +97,8 @@ let ) [ "aks-clh-snp" + "metal-qemu-snp" + "metal-qemu-tdx" "k3s-qemu-tdx" "k3s-qemu-snp" "rke2-qemu-tdx" @@ -94,7 +110,7 @@ let buildInputs = [ unzip installShellFiles - ]; # needed to unzip emojivoto-demo.zip + ]; } ( '' @@ -118,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: diff --git a/packages/update-contrast-releases.sh b/packages/update-contrast-releases.sh index e6ade1354b..abf403594c 100644 --- a/packages/update-contrast-releases.sh +++ b/packages/update-contrast-releases.sh @@ -20,7 +20,8 @@ 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" -for platform in aks-clh-snp k3s-qemu-tdx k3s-qemu-snp rke2-qemu-tdx; do +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" done