Skip to content

Commit

Permalink
nix: fix write-coordinator-yaml after refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
burgerdev committed Feb 29, 2024
1 parent 5176ade commit b68e967
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ jobs:
- name: Create portable coordinator resource definitions
run: |
mkdir -p workspace
nix run .#scripts.write-coordinator-yaml -- "${container_registry}/nunki/coordinator" > workspace/coordinator.yaml
nix run .#scripts.write-coordinator-yaml -- "${container_registry}/nunki/coordinator:${{ inputs.version }}" > workspace/coordinator.yaml
- name: Update coordinator policy hash
run: |
yq < workspace/coordinator.yaml \
Expand Down
8 changes: 4 additions & 4 deletions packages/scripts.nix
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,10 @@ with pkgs;
name = "write-coordinator-policy";
runtimeInputs = [
yq-go
genpolicy
genpolicy-msft
];
text = ''
imageRef=$1:v${version}
imageRef=$1
tmpdir=$(mktemp -d)
trap 'rm -rf $tmpdir' EXIT
Expand All @@ -162,8 +162,8 @@ with pkgs;
(select(.kind == \"Service\") | .spec.type) = \"LoadBalancer\" "
pushd "$tmpdir" >/dev/null
# TODO(burgerdev): this should not be dev, but there are unknown env vars
cp ${genpolicy.settings}/genpolicy-settings.json .
cp ${genpolicy-msft.rules-coordinator}/genpolicy-rules.rego rules.rego
cp ${genpolicy-msft.settings}/genpolicy-settings.json .
genpolicy < "$tmpdir/coordinator.yml"
popd >/dev/null
'';
Expand Down

0 comments on commit b68e967

Please sign in to comment.