Skip to content

Commit a988bd5

Browse files
authored
upgrade-gitops-maker: Add release v0.1.16 (#114)
The SystemStatus resource is not in the earlier releases, so zero that. Generalize the SystemConfiguration API version for the releases that have to change it. Signed-off-by: Dean Roehrich <dean.roehrich@hpe.com>
1 parent df1c0f6 commit a988bd5

1 file changed

Lines changed: 49 additions & 4 deletions

File tree

upgrade-tester/upgrade-gitops-maker.sh

Lines changed: 49 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,10 @@ configure_v0_1_11_manifests() {
354354
sed -n '1,/^patches/p' environments/"$GITOPS_ENV"/nnf-dm/kustomization.yaml-orig | grep -vE '^patches:' > environments/"$GITOPS_ENV"/nnf-dm/kustomization.yaml
355355

356356
# Roll back the API version in SystemConfiguration.
357-
sed -i.bak -e 's/v1alpha3/v1alpha2/' environments/"$GITOPS_ENV"/site-config/systemconfiguration.yaml && rm environments/"$GITOPS_ENV"/site-config/systemconfiguration.yaml.bak
357+
sed -i.bak -e 's/v1alpha./v1alpha2/' environments/"$GITOPS_ENV"/site-config/systemconfiguration.yaml && rm environments/"$GITOPS_ENV"/site-config/systemconfiguration.yaml.bak
358+
359+
# SystemStatus isn't available yet.
360+
cp /dev/null environments/"$GITOPS_ENV"/site-config/systemstatus.yaml
358361

359362
# Fix indentation bug in nnf-sos DaemonSet that affects the KIND
360363
# environment.
@@ -393,7 +396,10 @@ configure_v0_1_12_manifests() {
393396
sed -n '1,/^patches/p' environments/"$GITOPS_ENV"/nnf-dm/kustomization.yaml-orig | grep -vE '^patches:' > environments/"$GITOPS_ENV"/nnf-dm/kustomization.yaml
394397

395398
# Roll back the API version in SystemConfiguration.
396-
sed -i.bak -e 's/v1alpha3/v1alpha2/' environments/"$GITOPS_ENV"/site-config/systemconfiguration.yaml && rm environments/"$GITOPS_ENV"/site-config/systemconfiguration.yaml.bak
399+
sed -i.bak -e 's/v1alpha./v1alpha2/' environments/"$GITOPS_ENV"/site-config/systemconfiguration.yaml && rm environments/"$GITOPS_ENV"/site-config/systemconfiguration.yaml.bak
400+
401+
# SystemStatus isn't available yet.
402+
cp /dev/null environments/"$GITOPS_ENV"/site-config/systemstatus.yaml
397403

398404
# The CRD upgrade helpers were not being used with this release. So remove
399405
# them.
@@ -427,7 +433,10 @@ configure_v0_1_13_manifests() {
427433
sed -n '1,/^patches/p' environments/"$GITOPS_ENV"/nnf-dm/kustomization.yaml-orig | grep -vE '^patches:' > environments/"$GITOPS_ENV"/nnf-dm/kustomization.yaml
428434

429435
# Roll back the API version in SystemConfiguration.
430-
sed -i.bak -e 's/v1alpha3/v1alpha2/' environments/"$GITOPS_ENV"/site-config/systemconfiguration.yaml && rm environments/"$GITOPS_ENV"/site-config/systemconfiguration.yaml.bak
436+
sed -i.bak -e 's/v1alpha./v1alpha2/' environments/"$GITOPS_ENV"/site-config/systemconfiguration.yaml && rm environments/"$GITOPS_ENV"/site-config/systemconfiguration.yaml.bak
437+
438+
# SystemStatus isn't available yet.
439+
cp /dev/null environments/"$GITOPS_ENV"/site-config/systemstatus.yaml
431440

432441
# The CRD upgrade helpers were not being used with this release. So remove
433442
# them.
@@ -477,7 +486,10 @@ configure_v0_1_14_manifests() {
477486
sed -n '1,/^patches/p' environments/"$GITOPS_ENV"/nnf-dm/kustomization.yaml-orig | grep -vE '^patches:' > environments/"$GITOPS_ENV"/nnf-dm/kustomization.yaml
478487

479488
# Roll back the API version in SystemConfiguration.
480-
sed -i.bak -e 's/v1alpha3/v1alpha2/' environments/"$GITOPS_ENV"/site-config/systemconfiguration.yaml && rm environments/"$GITOPS_ENV"/site-config/systemconfiguration.yaml.bak
489+
sed -i.bak -e 's/v1alpha./v1alpha2/' environments/"$GITOPS_ENV"/site-config/systemconfiguration.yaml && rm environments/"$GITOPS_ENV"/site-config/systemconfiguration.yaml.bak
490+
491+
# SystemStatus isn't available yet.
492+
cp /dev/null environments/"$GITOPS_ENV"/site-config/systemstatus.yaml
481493

482494
# The CRD upgrade helpers were not being used with this release. So remove
483495
# them.
@@ -525,6 +537,12 @@ configure_v0_1_15_manifests() {
525537
# Chop off the end of the file, where we think the patches section lives.
526538
sed -n '1,/^patches/p' environments/"$GITOPS_ENV"/nnf-dm/kustomization.yaml-orig | grep -vE '^patches:' > environments/"$GITOPS_ENV"/nnf-dm/kustomization.yaml
527539

540+
# Roll back the API version in SystemConfiguration.
541+
sed -i.bak -e 's/v1alpha./v1alpha3/' environments/"$GITOPS_ENV"/site-config/systemconfiguration.yaml && rm environments/"$GITOPS_ENV"/site-config/systemconfiguration.yaml.bak
542+
543+
# SystemStatus isn't available yet.
544+
cp /dev/null environments/"$GITOPS_ENV"/site-config/systemstatus.yaml
545+
528546
# The storage-version-migrator is the only CRD upgrade helper in this
529547
# release. Remove the other one.
530548
remove_storedversions_maint
@@ -554,12 +572,39 @@ configure_v0_1_15_manifests() {
554572
msg "Created branch $BRANCH2 with support for nnf-storedversions-maint"
555573
}
556574

575+
# =====================================
576+
# Configure v0.1.16 manifests.
577+
#
578+
configure_v0_1_16_manifests() {
579+
TAG=v0.1.16
580+
TARBALL="manifests-$TAG.tar"
581+
BRANCH="rel-$TAG"
582+
git checkout main
583+
git checkout -b "$BRANCH"
584+
get_and_unpack_manfest "$TAG" "$TARBALL"
585+
set_branch_in_bootstraps "$BRANCH"
586+
587+
git mv environments/"$GITOPS_ENV"/nnf-dm/kustomization.yaml environments/"$GITOPS_ENV"/nnf-dm/kustomization.yaml-orig
588+
# Remove the patches section.
589+
# Chop off the end of the file, where we think the patches section lives.
590+
sed -n '1,/^patches/p' environments/"$GITOPS_ENV"/nnf-dm/kustomization.yaml-orig | grep -vE '^patches:' > environments/"$GITOPS_ENV"/nnf-dm/kustomization.yaml
591+
592+
git add environments
593+
git commit -s -m "Release $TAG"
594+
595+
./tools/verify-deployment.sh -e "$GITOPS_ENV"
596+
597+
$NO_PUSH_DBG git push --set-upstream origin "$BRANCH"
598+
msg "Created branch $BRANCH"
599+
}
600+
557601
create_new_repo
558602
configure_v0_1_11_manifests
559603
configure_v0_1_12_manifests
560604
configure_v0_1_13_manifests
561605
configure_v0_1_14_manifests
562606
configure_v0_1_15_manifests
607+
configure_v0_1_16_manifests
563608

564609
if [[ -z $NO_PUSH ]]; then
565610
echo

0 commit comments

Comments
 (0)