Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
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
22 changes: 11 additions & 11 deletions .github/cr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@ main() {
RELEASE_NAME=$(yq -e '.name + "-" + .version' deploy/helm/Chart.yaml)

# Check release type
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_CMD="--prerelease --latest=false"
RELEASE="alpha"
if [[ "$RELEASE_NAME" =~ (^|[^a-zA-Z])(alpha|beta|rc)([^a-zA-Z]|$) ]]; then
Copy link
Contributor Author

Choose a reason for hiding this comment

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

alpha, beta and rc are all handled as pre-releases now.

echo "Handling pre-release: $RELEASE_NAME"
PREVIOUS_TAG=$(git tag --sort=version:refname | grep -E "(alpha|beta|rc)" | grep -B1 "^swo-k8s-collector" | tail -n 1)
GH_RELEASE_PARAMS="--prerelease --latest=false"
ADD_ANNOTATION_PARAMS=""
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)
PREVIOUS_TAG=$(git tag --sort=version:refname | grep -vE "(alpha|beta|rc)" | grep -B1 "^swo-k8s-collector" | tail -n 1)
PRE_RELEASE_CMD=""
RELEASE="official"
ADD_ANNOTATION_PARAMS="official"
fi

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

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

echo 'Releasing chart...'
gh release create $RELEASE_NAME \
--title $RELEASE_NAME \
$PRE_RELEASE_CMD \
$GH_RELEASE_PARAMS \
--title $RELEASE_NAME \
--notes-start-tag $PREVIOUS_TAG \
--generate-notes \
Expand All @@ -67,7 +67,7 @@ main() {
}

install_chart_releaser() {
local version="v1.6.0"
local version="v1.8.1"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just an update.

local install_dir="$RUNNER_TOOL_CACHE/cr/$version/$(uname -m)"
if [[ ! -d "$install_dir" ]]; then
mkdir -p "$install_dir"
Expand Down
13 changes: 0 additions & 13 deletions deploy/helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,3 @@ dependencies:
annotations:
artifacthub.io/prerelease: "false"
artifacthub.io/license: Apache-2.0
artifacthub.io/images: |
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is not needed anymore and it disables automatic scan of images in ArtifactHub.

- name: ebpf-kernelCollector
image: solarwinds/opentelemetry-ebpf-kernel-collector:v0.10.3
whitelisted: true
- name: ebpf-k8sCollectorWatcher
image: solarwinds/opentelemetry-ebpf-k8s-watcher:v0.10.3
whitelisted: true
- name: ebpf-k8sCollectorRelay
image: solarwinds/opentelemetry-ebpf-k8s-relay:v0.10.3
whitelisted: true
- name: ebpf-reducer
image: solarwinds/opentelemetry-ebpf-reducer:v0.10.3
whitelisted: true
4 changes: 4 additions & 0 deletions utils/update_images.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,10 @@ def _bump_version(self, old_version: str) -> str:
base_version, beta_part = old_version.split('-beta.', 1)
if beta_part.isdigit():
return f"{base_version}-beta.{int(beta_part) + 1}"
elif '-rc.' in old_version:
base_version, rc_part = old_version.split('-rc.', 1)
if rc_part.isdigit():
return f"{base_version}-rc.{int(rc_part) + 1}"

# Handle standard semantic versions
version_parts = old_version.split('.')
Expand Down