From 8bdb8afd5c5ce43f9ae44539a756cec807df26b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Piliszek?= Date: Tue, 19 Sep 2023 20:18:14 +0200 Subject: [PATCH] Add a component bootstrapping helper Change-Id: I45bae3170ee2914f50c93c8c4efcea030d19d4c0 --- bootstrap-new-component.sh | 17 +++++++++++++++++ zuul.d/project.yaml | 2 -- 2 files changed, 17 insertions(+), 2 deletions(-) create mode 100755 bootstrap-new-component.sh diff --git a/bootstrap-new-component.sh b/bootstrap-new-component.sh new file mode 100755 index 0000000..a9bfdce --- /dev/null +++ b/bootstrap-new-component.sh @@ -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 diff --git a/zuul.d/project.yaml b/zuul.d/project.yaml index fe2a3f7..f09796d 100644 --- a/zuul.d/project.yaml +++ b/zuul.d/project.yaml @@ -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: