Skip to content

Commit

Permalink
updated pr according to comments
Browse files Browse the repository at this point in the history
  • Loading branch information
oakrizan committed Mar 19, 2024
1 parent 9fbf70a commit 59d8cde
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 198 deletions.
51 changes: 0 additions & 51 deletions .buildkite/auditbeat/scripts/unit-tests-win.ps1

This file was deleted.

2 changes: 1 addition & 1 deletion .buildkite/env-scripts/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ add_bin_path() {
}

with_go() {
local go_version="${GOLANG_VERSION}"
local go_version="${GO_VERSION}"
echo "Setting up the Go environment..."
create_bin
check_platform_architecture
Expand Down
51 changes: 0 additions & 51 deletions .buildkite/filebeat/scripts/unit-tests-win.ps1

This file was deleted.

51 changes: 0 additions & 51 deletions .buildkite/heartbeat/scripts/unit-tests-win.ps1

This file was deleted.

8 changes: 0 additions & 8 deletions .buildkite/scripts/packaging/package-util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,3 @@ define_tags() {
tags+=("${SOURCE_TAG}" "${aliasVersion}")
fi
}

check_is_arm() {
if [[ ${HW_TYPE} == "aarch64" || ${HW_TYPE} == "arm64" ]]; then
is_arm="-arm64"
else
is_arm=""
fi
}
72 changes: 36 additions & 36 deletions .buildkite/scripts/packaging/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -euo pipefail

#source .buildkite/scripts/packaging/package-util.sh
source .buildkite/scripts/packaging/package-util.sh

IMG_POSTFIX="-SNAPSHOT"
VARIANTS=("" "-ubi" "-oss")
Expand All @@ -13,38 +13,38 @@ TARGET="observability-ci/${BEATS_PROJECT_NAME}"
echo "--- Creating package"
mage -d "${BEATS_PROJECT_NAME}" package

#echo "--- Distribution list"
#dir="${BEATS_PROJECT_NAME}/build/distributions"
#buildkite-agent artifact upload "$dir/*.tar.gz;$dir/*.tar.gz.sha512"
#
#echo "--- Docker image list"
#docker images
#
#define_tags
#
#targetSuffix=""
#if [[ ${HW_TYPE} == "aarch64" || ${HW_TYPE} == "arm64" ]]; then
# targetSuffix="-arm64"
#fi
#
#for variant in "${VARIANTS[@]}"; do
# source="beats/${BEATS_PROJECT_NAME}${variant}"
#
# for tag in "${tags[@]}"; do
# targetTag=$tag${targetSuffix}
#
# sourceName="${DOCKER_REGISTRY}/${source}:${SOURCE_TAG}"
# targetName="${DOCKER_REGISTRY}/${TARGET}:${targetTag}"
# # Remove following line once beats fully migrated
# targetName="${targetName}-buildkite"
#
# if docker image inspect "${sourceName}" &>/dev/null; then
# echo "--- Tag & Push with target: $targetName"
# echo "Source name: $sourceName"
# docker tag "$sourceName" "$targetName"
# docker push "$targetName"
# else
# echo "Docker image ${sourceName} does not exist"
# fi
# done
#done
echo "--- Distribution list"
dir="${BEATS_PROJECT_NAME}/build/distributions"
buildkite-agent artifact upload "$dir/*.tar.gz;$dir/*.tar.gz.sha512"

echo "--- Docker image list"
docker images

define_tags

targetSuffix=""
if [[ ${HW_TYPE} == "aarch64" || ${HW_TYPE} == "arm64" ]]; then
targetSuffix="-arm64"
fi

for variant in "${VARIANTS[@]}"; do
source="beats/${BEATS_PROJECT_NAME}${variant}"

for tag in "${tags[@]}"; do
targetTag=$tag${targetSuffix}

sourceName="${DOCKER_REGISTRY}/${source}:${SOURCE_TAG}"
targetName="${DOCKER_REGISTRY}/${TARGET}:${targetTag}"
# Remove following line once beats fully migrated
targetName="${targetName}-buildkite"

if docker image inspect "${sourceName}" &>/dev/null; then
echo "--- Tag & Push with target: $targetName"
echo "Source name: $sourceName"
docker tag "$sourceName" "$targetName"
docker push "$targetName"
else
echo "Docker image ${sourceName} does not exist"
fi
done
done

0 comments on commit 59d8cde

Please sign in to comment.