Skip to content

Commit

Permalink
remove cd update scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
jashan-lco authored Dec 18, 2024
1 parent 759bf45 commit b9815ab
Showing 1 changed file with 0 additions and 47 deletions.
47 changes: 0 additions & 47 deletions cd.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,52 +32,5 @@
kustomize build prod/ --output output/prod/manifest.yaml
popd
'';

scripts.cd-update-staging.exec = ''
set -ex
if test -z "$1"; then
echo "first argument should be an absolute path to the skaffold build output"
exit 1
fi
if test -z "$2"; then
echo "second argument should be the git commit hash"
exit 1
fi
pushd $DEVENV_ROOT
pushd staging/
kpt pkg update --strategy force-delete-replace base@$2
if test -f "$1"; then
pushd cd-set-images
sh -xe <(cat $1 | jq -r '.builds[] | "kustomize edit set image \(.imageName)=\(.tag)"')
popd
fi
popd
kustomize build staging/ --output output/staging/manifest.yaml
popd
'';

scripts.cd-update-prod.exec = ''
set -ex
if test -z "$1"; then
echo "first argument should be git commit hash of staging"
exit 1
fi
pushd $DEVENV_ROOT
kpt pkg update --strategy force-delete-replace prod/base@$2
kpt pkg update --strategy force-delete-replace prod/cd-set-images@$2
kustomize build prod/ --output output/prod/manifest.yaml
popd
'';
};
}

0 comments on commit b9815ab

Please sign in to comment.