Add a component bootstrapping helper

Change-Id: I45bae3170ee2914f50c93c8c4efcea030d19d4c0
This commit is contained in:
Radosław Piliszek 2023-09-19 20:18:14 +02:00
parent efd67f94ef
commit 8bdb8afd5c
2 changed files with 17 additions and 2 deletions

17
bootstrap-new-component.sh Executable file
View File

@ -0,0 +1,17 @@
#!/usr/bin/env bash
set -u
set -e
NAME=$1
cp -rf .gitignore .yamllint LICENSE noxfile.py java-spring-boot-demo zuul.d ../$NAME/
mkdir -p ../$NAME/charts
rsync --recursive --delete charts/nebulous-component-template/ ../$NAME/charts/nebulous-$NAME/
cd ../$NAME/
sed -i 's/nebulous-component-template-apply-helm-charts/nebulous-platform-apply-helm-charts/g' zuul.d/project.yaml
find -name .git -prune -o -type f -print0 | xargs -0 sed -i "s/component-template/${NAME}/g"
git review -s
git add -A
git commit -m 'Init repo from the component-template'
git review

View File

@ -5,7 +5,6 @@
- nebulous-component-template-helm-lint
- nebulous-component-template-build-container-images
- nebulous-component-template-hadolint
# NOTE(yoctozepto): Replace with nebulous-platform-apply-helm-charts.
- nebulous-component-template-apply-helm-charts
- nox-linters
gate:
@ -14,7 +13,6 @@
- nebulous-component-template-helm-lint
- nebulous-component-template-upload-container-images
- nebulous-component-template-hadolint
# NOTE(yoctozepto): Replace with nebulous-platform-apply-helm-charts.
- nebulous-component-template-apply-helm-charts
- nox-linters
promote: