Skip to content

Commit

Permalink
Merge pull request #769 from solarwinds/fix-annotations
Browse files Browse the repository at this point in the history
Update conditions
  • Loading branch information
jaroslav-fedor-swi authored Oct 25, 2024
2 parents 3d99c31 + 61ea7b1 commit ff06304
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
6 changes: 2 additions & 4 deletions .github/add_annotation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,11 @@ if ! command -v yq &> /dev/null; then
fi


if [ "$RELEASE_TYPE" = "" ]; then
if [ "$RELEASE_TYPE" = "official" ]; then
# Production release
yq eval ".annotations.\"artifacthub.io/prerelease\" = \"false\"" deploy/helm/Chart.yaml -i

else
yq eval ".annotations.\"artifacthub.io/prerelease\" = \"true\"" deploy/helm/Chart.yaml -i

fi


fi
12 changes: 7 additions & 5 deletions .github/cr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,16 @@ main() {
if [[ "$RELEASE_NAME" == *"alpha"* ]]; then
echo "Handling alpha release: $RELEASE_NAME"
PREVIOUS_TAG=$(git tag --sort=version:refname | grep alpha | grep -B1 "^swo-k8s-collector" | tail -n 1)
PRE_RELEASE="--prerelease --latest=false"
PRE_RELEASE_CMD="--prerelease --latest=false"
RELEASE="alpha"
else
echo "Handling standard release: $RELEASE_NAME"
PREVIOUS_TAG=$(git tag --sort=version:refname | grep -v alpha | grep -B1 "^swo-k8s-collector" | tail -n 1)
PRE_RELEASE=""
PRE_RELEASE_CMD=""
RELEASE="official"
fi

.github/add_annotation.sh deploy/helm/Chart.yaml $PRE_RELEASE
.github/add_annotation.sh deploy/helm/Chart.yaml $RELEASE

echo "Packaging chart ..."
cr package "deploy/helm"
Expand All @@ -39,15 +41,15 @@ main() {
echo "Release name: $RELEASE_NAME"
echo "Release file: $RELEASE_FILE"
echo "Previous tag: $PREVIOUS_TAG"
echo "Prerelease opt: $PRE_RELEASE"
echo "Prerelease opt: $PRE_RELEASE_CMD"
echo "****************************************"
echo ""
echo ""

echo 'Releasing chart...'
gh release create $RELEASE_NAME \
--title $RELEASE_NAME \
$PRE_RELEASE \
$PRE_RELEASE_CMD \
--title $RELEASE_NAME \
--notes-start-tag $PREVIOUS_TAG \
--generate-notes \
Expand Down
2 changes: 1 addition & 1 deletion deploy/helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ annotations:
whitelisted: true
- name: ebpf-reducer
image: solarwinds/opentelemetry-ebpf-reducer:v0.10.2
whitelisted: true
whitelisted: true

0 comments on commit ff06304

Please sign in to comment.