-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6ca6f8a
commit bb3caf1
Showing
3 changed files
with
29 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,34 @@ | ||
#!/usr/bin/env bash | ||
|
||
VERSION=${1:?"Missing version number argument (arg 1)"} | ||
NEXUS_USER=${2:?"Missing Nexus username argument (arg 2)"} | ||
RELEASE=${2:?"Missing release number argument (arg 2)"} | ||
NEXUS_USER=${3:?"Missing Nexus username argument (arg 3)"} | ||
|
||
ARCHITECTURES=( | ||
This comment has been minimized.
Sorry, something went wrong. |
||
x86_64 | ||
aarch64 | ||
) | ||
|
||
read -r -s -p "Nexus Password: " NEXUS_PASSWORD | ||
echo "" | ||
|
||
# Vector does not currently publish signatures or SBOMs (as of 2023-06-25, latest version at this point 0.30.0) | ||
# Vector does not currently publish signatures or SBOMs (as of | ||
# 2023-07-31, latest version at this point 0.31.0) | ||
|
||
echo "Downloading X86 Vector" | ||
curl -LOs "https://packages.timber.io/vector/$VERSION/vector-$VERSION-x86_64-unknown-linux-gnu.tar.gz" | ||
for arch in "${ARCHITECTURES[@]}"; do | ||
file="vector-$VERSION-$RELEASE.$arch.rpm" | ||
|
||
echo "Downloading ARM Vector" | ||
curl -LOs "https://packages.timber.io/vector/$VERSION/vector-$VERSION-aarch64-unknown-linux-gnu.tar.gz" | ||
echo "Downloading $file from timber.io" | ||
curl -LOs "https://packages.timber.io/vector/$VERSION/$file" | ||
|
||
echo "Uploading both to Nexus" | ||
curl --fail -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "vector-$VERSION-x86_64-unknown-linux-gnu.tar.gz" 'https://repo.stackable.tech/repository/packages/vector/' | ||
curl --fail -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "vector-$VERSION-aarch64-unknown-linux-gnu.tar.gz" 'https://repo.stackable.tech/repository/packages/vector/' | ||
echo "Uploading $file to Nexus" | ||
curl --fail -u "$NEXUS_USER:$NEXUS_PASSWORD" \ | ||
--upload-file "$file" \ | ||
'https://repo.stackable.tech/repository/packages/vector/' | ||
|
||
rm "vector-$VERSION-x86_64-unknown-linux-gnu.tar.gz" | ||
rm "vector-$VERSION-aarch64-unknown-linux-gnu.tar.gz" | ||
echo "Removing downloaded $file" | ||
rm "$file" | ||
done | ||
|
||
echo "Successfully uploaded new version of Vector ($VERSION) to Nexus" | ||
echo "https://repo.stackable.tech/service/rest/repository/browse/packages/vector/" |
@Maleware should we document this somewhere for multi arch? In case we want to support more...