Skip to content
This repository has been archived by the owner on Oct 20, 2022. It is now read-only.

Patch kuttl test to work with releases #307

Merged
merged 6 commits into from
May 5, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions test/e2e/kuttl/ScaleUpAndDown/00-createCluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ kind: TestStep
commands:
- script: |
BASEDIR=../../../..
VERSION=$(awk -F\" '/Version =/ {print $2}' $BASEDIR/version/version.go)-$CIRCLE_BRANCH
if [ $CIRCLE_TAG ]
then
VERSION="$(awk -F\" '/Version =/ {print $2}' $BASEDIR/version/version.go)-release"
else
VERSION="$(awk -F\" '/Version =/ {print $2}' $BASEDIR/version/version.go)-$CIRCLE_BRANCH"
fi
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fdehay I would rather do

VERSION=${CIRCLE_TAG:-CIRCLE_BRANCH}

I don't think we need to check the file at any point as we already use the right version in the tag

fdehay marked this conversation as resolved.
Show resolved Hide resolved
helm install casskop $BASEDIR/helm/cassandra-operator --set image.tag=$VERSION --namespace $NAMESPACE
---
apiVersion: db.orange.com/v1alpha1
Expand All @@ -27,4 +32,4 @@ spec:
dc:
- name: dc1
rack:
- name: rack1
- name: rack1