diff --git a/.gitignore b/.gitignore index c81ead1375..3663c16822 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,9 @@ /book/src/tests.ok /farf/ /solana-release/ -solana-release.tar.bz2 +/solana-release.tar.bz2 +/solana-metrics/ +/solana-metrics.tar.bz2 /target/ **/*.rs.bk diff --git a/ci/publish-tarball.sh b/ci/publish-tarball.sh index f7d36b9bc6..7a1fa26c09 100755 --- a/ci/publish-tarball.sh +++ b/ci/publish-tarball.sh @@ -113,6 +113,13 @@ EOF cp solana-release/bin/solana-install-init solana-install-init-$TARGET ) +# Metrics tarball is platform agnostic, only publish it from Linux +MAYBE_METRICS_TARBALL= +if [[ "$CI_OS_NAME" = linux ]]; then + metrics/create-metrics-tarball.sh + MAYBE_METRICS_TARBALL=solana-metrics.tar.bz2 +fi + echo --- Saving build artifacts source ci/upload-ci-artifact.sh upload-ci-artifact solana-release-$TARGET.tar.bz2 @@ -122,7 +129,7 @@ if [[ -n $DO_NOT_PUBLISH_TAR ]]; then exit 0 fi -for file in solana-release-$TARGET.tar.bz2 solana-install-init-"$TARGET"*; do +for file in solana-release-$TARGET.tar.bz2 solana-install-init-"$TARGET"* $MAYBE_METRICS_TARBALL; do if [[ -n $BUILDKITE ]]; then echo --- AWS S3 Store: "$file" ( diff --git a/metrics/create-metrics-tarball.sh b/metrics/create-metrics-tarball.sh new file mode 100755 index 0000000000..f30e0e062c --- /dev/null +++ b/metrics/create-metrics-tarball.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash +set -e + +cd "$(dirname "$0")/.." + +echo --- Creating metrics tarball +( + set -x + rm -rf solana-metrics/ + mkdir solana-metrics/ + + COMMIT="$(git rev-parse HEAD)" + + ( + echo "commit: $COMMIT" + ) > solana-metrics/version.yml + + cp -a metrics/scripts/* solana-metrics + + tar jvcf solana-metrics.tar.bz2 solana-metrics/ +) + +ls -hl "$PWD"/solana-metrics.tar.bz2