From 2d6d61b150c135840151b01b6f4a637e7046461b Mon Sep 17 00:00:00 2001
From: "andrew.greene" <1195-andrew.greene@users.noreply.gitlab.example.com>
Date: Wed, 8 Jun 2022 18:04:05 +0000
Subject: [PATCH] feat: add package wait script [SKIP INTEGRATION]

---
 CHANGELOG.md          |  3 +++
 README.md             |  2 +-
 chart/Chart.yaml      |  2 +-
 tests/package_wait.sh | 15 +++++++++++++++
 4 files changed, 20 insertions(+), 2 deletions(-)
 create mode 100644 tests/package_wait.sh

diff --git a/CHANGELOG.md b/CHANGELOG.md
index fa17b91..e4efeb2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,5 +2,8 @@
 
 Format: [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
 
+## [0.1.3-alpha-bb.1] - unreleased
+- Pipeline fixes
+
 ## [0.1.3-alpha-bb.0] - 2022-06-24
 - Initial Chart creation
\ No newline at end of file
diff --git a/README.md b/README.md
index 75419f7..4ea823e 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
 # kubevirt
 
-![Version: 0.1.3-alpha-bb.0](https://img.shields.io/badge/Version-0.1.3--alpha--bb.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.53.0](https://img.shields.io/badge/AppVersion-0.53.0-informational?style=flat-square)
+![Version: 0.1.3-alpha-bb.1](https://img.shields.io/badge/Version-0.1.3--alpha--bb.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.53.0](https://img.shields.io/badge/AppVersion-0.53.0-informational?style=flat-square)
 
 KubeVirt Big Bang package
 
diff --git a/chart/Chart.yaml b/chart/Chart.yaml
index 4bfaed9..c308d94 100644
--- a/chart/Chart.yaml
+++ b/chart/Chart.yaml
@@ -2,5 +2,5 @@ apiVersion: v2
 name: kubevirt
 description: KubeVirt Big Bang package
 type: application
-version: 0.1.3-alpha-bb.0
+version: 0.1.3-alpha-bb.1
 appVersion: "0.53.0"
diff --git a/tests/package_wait.sh b/tests/package_wait.sh
new file mode 100644
index 0000000..6779183
--- /dev/null
+++ b/tests/package_wait.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+custom_package_wait() {
+  timeElapsed=0
+  sleepTime=3
+  timeout=600
+  while [[ $timeElapsed -le $timeout ]]; do
+    podCount=$(kubectl get pods -n kubevirt | grep "1/1" -c)
+    #Note: podCount = 7  assumes .Values.deployment.spec.replicas = 2
+    if [[ "$podCount" -eq "7" ]]; then
+      break
+    fi
+    sleep $sleepTime
+    timeElapsed=$(($timeElapsed + $sleepTime))
+  done
+}
-- 
GitLab