Skip to content

Commit

Permalink
add prod cd update scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
jashan-lco committed Jan 8, 2024
1 parent d295d46 commit e419055
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions cd.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@
popd
'';

scripts.kustomize-build-prod.exec = ''
set -xe
pushd $DEVENV_ROOT
kustomize build prod/ --output output/prod/manifest.yaml
popd
'';

scripts.cd-update-staging.exec = ''
set -ex
Expand All @@ -39,6 +46,8 @@
exit 1
fi
pushd $DEVENV_ROOT
pushd staging/
kpt pkg update base@$2
Expand All @@ -51,6 +60,24 @@
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 prod/base@$2
kpt pkg update prod/cd-set-images@$2
kustomize build prod/ --output output/prod/manifest.yaml
popd
'';
};
}

0 comments on commit e419055

Please sign in to comment.