Skip to content

Commit e56dfe2

Browse files
soenkeliebaurazvan
andauthored
Add Omid versions 1.1.1 & 1.1.2 (#553)
* Add Omid 1.1.1 * Add missing newline * fix hadolint warning * Fix missing dependencies for HBase and Omid * change ownership of the tso dir * Set omid.log.dir sys prop and some refactoring * run pre-commit to fix formatting * update delete_caches * Add omid 1.1.2 * successfully ran on OpenShift * works in both kind and openshift * Removed building of the same omid version with multiple java versions. Renamed m2 cache volume. * Typo * Fixed race condition where build containers were fighting over the .m2 cache, when running in parallel by making the cache name unique per version to be built. Removed debug statements. Changed java version for omid 1.1.2 back to 11. * Removed duplicate link definition from CHANGELOG.md * Update omid/Dockerfile Co-authored-by: Razvan-Daniel Mihai <[email protected]> --------- Co-authored-by: Razvan-Daniel Mihai <[email protected]>
1 parent 59b96f6 commit e56dfe2

File tree

4 files changed

+85
-3
lines changed

4 files changed

+85
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ All notable changes to this project will be documented in this file.
66

77
### Added
88

9+
- omid: Add version `1.1.1` & `1.1.2` ([#553])
910
- ubi9-rust-builder: A builder image using UBI9 instead of the current UBI8 ([#583])
1011
- Build all `0.0.0-dev` product images as multi-arch and push them to Nexus and Harbor.
1112
Also SBOMs are generated and everything is signed ([#614], [#616]).
@@ -136,6 +137,7 @@ All notable changes to this project will be documented in this file.
136137
[#762]: https://github.com/stackabletech/docker-images/pull/762
137138
[#767]: https://github.com/stackabletech/docker-images/pull/767
138139
[#768]: https://github.com/stackabletech/docker-images/pull/768
140+
[#553]: https://github.com/stackabletech/docker-images/pull/553
139141
[#771]: https://github.com/stackabletech/docker-images/pull/771
140142
[#777]: https://github.com/stackabletech/docker-images/pull/777
141143
[#778]: https://github.com/stackabletech/docker-images/pull/778

omid/Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ USER stackable
1414
WORKDIR /stackable
1515

1616
# hadolint ignore=DL3003
17-
RUN --mount=type=cache,id=maven,uid=1000,target=/stackable/.m2/repository <<EOF
18-
curl --fail -L https://dist.apache.org/repos/dist/release/phoenix/phoenix-omid-${PRODUCT}/phoenix-omid-${PRODUCT}-src.tar.gz | tar -xzC .
17+
RUN --mount=type=cache,id=maven-omid-${PRODUCT},uid=1000,target=/stackable/.m2/repository <<EOF
18+
set -x
19+
curl --fail -L https://repo.stackable.tech/repository/packages/omid/phoenix-omid-${PRODUCT}-src.tar.gz | tar -xzC .
1920
cd /stackable/phoenix-omid-${PRODUCT} || exit
20-
mvn package -Phbase-2 -DskipTests
21+
mvn --batch-mode --no-transfer-progress package -Phbase-2 -DskipTests
2122
tar -xf tso-server/target/omid-tso-server-${PRODUCT}-bin.tar.gz -C /stackable
2223
tar -xf examples/target/omid-examples-${PRODUCT}-bin.tar.gz -C /stackable
2324

omid/upload_new_omid_version.sh

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
VERSION=${1:?"Missing version number argument (arg 1)"}
6+
NEXUS_USER=${2:?"Missing Nexus username argument (arg 2)"}
7+
8+
read -r -s -p "Nexus Password: " NEXUS_PASSWORD
9+
echo ""
10+
11+
# https://stackoverflow.com/questions/4632028/how-to-create-a-temporary-directory
12+
# Find the directory name of the script
13+
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
14+
15+
# the temp directory used, within $DIR
16+
WORK_DIR=$(mktemp -d -p "$DIR")
17+
18+
# check if tmp dir was created
19+
if [[ ! "$WORK_DIR" || ! -d "$WORK_DIR" ]]; then
20+
echo "Could not create temp dir"
21+
exit 1
22+
fi
23+
24+
# deletes the temp directory
25+
function cleanup {
26+
rm -rf "$WORK_DIR"
27+
}
28+
29+
# register the cleanup function to be called on the EXIT signal
30+
trap cleanup EXIT
31+
32+
cd "$WORK_DIR" || exit
33+
src_file=phoenix-omid-$VERSION-src.tar.gz
34+
35+
echo "Downloading Omid (this can take a while, it is intentionally downloading from a slow mirror that contains all old versions)"
36+
curl --fail -LOs "https://downloads.apache.org/phoenix/phoenix-omid-${VERSION}/${src_file}"
37+
curl --fail -LOs "https://downloads.apache.org/phoenix/phoenix-omid-$VERSION/$src_file.asc"
38+
curl --fail -LOs "https://downloads.apache.org/phoenix/phoenix-omid-$VERSION/$src_file.sha512"
39+
40+
41+
# It is probably redundant to check both the checksum and the signature but it's cheap and why not
42+
echo "Validating SHA512 Checksums"
43+
if ! (gpg --print-md SHA512 "$src_file" | diff - "$src_file.sha512"); then
44+
echo "ERROR: One of the SHA512 sums does not match"
45+
exit 1
46+
fi
47+
48+
echo "Validating signatures"
49+
echo '--> NOTE: Make sure you have downloaded and added the KEYS file (https://downloads.apache.org/phoenix/KEYS) to GPG: https://www.apache.org/info/verification.html'
50+
if ! (gpg --verify "$src_file.asc" "$src_file" 2> /dev/null); then
51+
echo "ERROR: One of the signatures could not be verified"
52+
exit 1
53+
fi
54+
55+
echo "Uploading everything to Nexus"
56+
EXIT_STATUS=0
57+
curl --fail -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "$src_file" 'https://repo.stackable.tech/repository/packages/omid/' || EXIT_STATUS=$?
58+
curl --fail -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "$src_file.asc" 'https://repo.stackable.tech/repository/packages/omid/' || EXIT_STATUS=$?
59+
curl --fail -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "$src_file.sha512" 'https://repo.stackable.tech/repository/packages/omid/' || EXIT_STATUS=$?
60+
61+
if [ $EXIT_STATUS -ne 0 ]; then
62+
echo "ERROR: Upload failed"
63+
exit 1
64+
fi
65+
66+
echo "Successfully uploaded version $VERSION of Omid to Nexus"
67+
echo "https://repo.stackable.tech/service/rest/repository/browse/packages/omid/"

omid/versions.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,16 @@
55
"java-devel": "11",
66
"jmx_exporter": "1.0.1",
77
},
8+
{
9+
"product": "1.1.1",
10+
"java-base": "11",
11+
"java-devel": "11",
12+
"jmx_exporter": "1.0.1",
13+
},
14+
{
15+
"product": "1.1.2",
16+
"java-base": "11",
17+
"java-devel": "11",
18+
"jmx_exporter": "1.0.1",
19+
},
820
]

0 commit comments

Comments
 (0)