From 4887356824f87876959936fedcaf4a8ebb42e5ef Mon Sep 17 00:00:00 2001 From: Rishabh Patel <66425093+rishabh-11@users.noreply.github.com> Date: Fri, 15 Dec 2023 10:29:28 +0530 Subject: [PATCH] Fix vpa version file path (#273) (#274) * Switch VPA pipeline to vpa specific branch * Fix path to VPA version file in CI scripts Co-authored-by: Marco Voelz --- .ci/pipeline_definitions | 1 + .ci/read-vpa-version.sh | 4 +++- .ci/write-vpa-version.sh | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.ci/pipeline_definitions b/.ci/pipeline_definitions index bf87bbc2d8de..c51b25bb54e5 100644 --- a/.ci/pipeline_definitions +++ b/.ci/pipeline_definitions @@ -72,6 +72,7 @@ autoscaler: vertical-pod-autoscaler: base_definition: repo: + branch: rel-vertical-pod-autoscaler trigger_paths: include: - 'vertical-pod-autoscaler' diff --git a/.ci/read-vpa-version.sh b/.ci/read-vpa-version.sh index 09c5cb6b4de6..b144dbc1ee1c 100755 --- a/.ci/read-vpa-version.sh +++ b/.ci/read-vpa-version.sh @@ -14,4 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -cat ../vertical-pod-autoscaler/common/version.go | grep 'const VerticalPodAutoscalerVersion' | cut -d " " -f 4 | tr -d '"' \ No newline at end of file +src_dir=$(readlink -f "$(dirname "${0}")/..") + +cat ${src_dir}/vertical-pod-autoscaler/common/version.go | grep 'const VerticalPodAutoscalerVersion' | cut -d " " -f 4 | tr -d '"' \ No newline at end of file diff --git a/.ci/write-vpa-version.sh b/.ci/write-vpa-version.sh index f5fe4d3cd005..e6269935b1cb 100755 --- a/.ci/write-vpa-version.sh +++ b/.ci/write-vpa-version.sh @@ -14,5 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. +src_dir="$(readlink -f "$(dirname "${0}")/..")" new_version=$(cat -) -sed -i s/'^\(const VerticalPodAutoscalerVersion = "\).*"'/\\1${new_version}'"'/ vertical-pod-autoscaler/common/version.go \ No newline at end of file +sed -i s/'^\(const VerticalPodAutoscalerVersion = "\).*"'/\\1${new_version}'"'/ ${src_dir}/vertical-pod-autoscaler/common/version.go \ No newline at end of file