-
Notifications
You must be signed in to change notification settings - Fork 52
HBASE-29465 [hbase-thirdparty] Update yetus to a newer version #144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
29f841f
40f421d
e45edf1
ad8071a
e8bb9ac
c511ac5
95550b6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,6 +36,8 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get -qq update && \ | |
| wget='1.21.2-*' \ | ||
| shellcheck='0.8.0-*' \ | ||
| patch='2.7.6-*' \ | ||
| libxml2-dev='2.9.13+dfsg-*' \ | ||
| libxml2-utils='2.9.13+dfsg-*' \ | ||
| && \ | ||
| apt-get clean && \ | ||
| rm -rf /var/lib/apt/lists/* \ | ||
|
|
@@ -110,14 +112,56 @@ ENV MAVEN_HOME='/opt/maven' | |
| RUN mv /opt/maven/bin/mvn /opt/maven/bin/mvn-original && \ | ||
| cat > /opt/maven/bin/mvn <<'EOF' | ||
| #!/bin/bash | ||
| TOOLCHAIN="${BASEDIR}/dev-support/toolchains-jenkins.xml" | ||
| if [ -f "$TOOLCHAIN" ]; then | ||
|
|
||
| echo "Maven wrapper called with args: $@" | ||
| echo "Current working directory: $(pwd)" | ||
| echo "BASEDIR environment variable: ${BASEDIR:-'(not set)'}" | ||
| echo "MAVEN_HOME: ${MAVEN_HOME:-'(not set)'}" | ||
|
|
||
| # Ensure Maven home exists | ||
| if [ ! -d "${MAVEN_HOME}" ]; then | ||
| echo "ERROR: MAVEN_HOME directory does not exist: ${MAVEN_HOME}" | ||
| exit 1 | ||
| fi | ||
|
|
||
| if [ ! -f "${MAVEN_HOME}/bin/mvn-original" ]; then | ||
| echo "ERROR: mvn-original not found at: ${MAVEN_HOME}/bin/mvn-original" | ||
| exit 1 | ||
| fi | ||
|
|
||
| # Try multiple possible locations for the toolchains file | ||
| TOOLCHAIN_LOCATIONS=( | ||
| "${BASEDIR}/dev-support/toolchains-jenkins.xml" | ||
| "$(pwd)/dev-support/toolchains-jenkins.xml" | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. may be we do not need to try for different dirs as it should found in 1st dir itself? but why not, not a problem too? WDYT? |
||
| "./dev-support/toolchains-jenkins.xml" | ||
| "../dev-support/toolchains-jenkins.xml" | ||
| ) | ||
|
|
||
| TOOLCHAIN="" | ||
| for location in "${TOOLCHAIN_LOCATIONS[@]}"; do | ||
| echo "Checking for toolchains file at: $location" | ||
| if [ -f "$location" ]; then | ||
| TOOLCHAIN="$location" | ||
| echo "Found toolchains file at: $TOOLCHAIN" | ||
| break | ||
| fi | ||
| done | ||
|
|
||
| if [ -n "$TOOLCHAIN" ]; then | ||
| echo "Added: -t ${TOOLCHAIN} to mvn flags!" | ||
| exec ${MAVEN_HOME}/bin/mvn-original "$@" -t "$TOOLCHAIN" | ||
| echo "Executing: ${MAVEN_HOME}/bin/mvn-original $@ -t $TOOLCHAIN" | ||
| "${MAVEN_HOME}/bin/mvn-original" "$@" -t "$TOOLCHAIN" | ||
NihalJain marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| exit_code=$? | ||
| else | ||
| echo "Unexpected: ${TOOLCHAIN} file is missing!" | ||
| exec ${MAVEN_HOME}/bin/mvn-original "$@" | ||
| echo "Error: toolchains-jenkins.xml file not found in any expected location, please fix the build environment!" | ||
| echo "Proceeding without toolchains configuration..." | ||
| echo "Executing: ${MAVEN_HOME}/bin/mvn-original $@" | ||
| "${MAVEN_HOME}/bin/mvn-original" "$@" | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this fallback at least builds code, should not happen again though, but maybe with some yetus upgrade or dockerfile change |
||
| exit_code=$? | ||
| fi | ||
|
|
||
| echo "Maven execution completed with exit code: $exit_code" | ||
| exit $exit_code | ||
| EOF | ||
| RUN chmod +x /opt/maven/bin/mvn && cat /opt/maven/bin/mvn | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think its good to keep the change as this improves logging and error handling. without this the out files were empty and swallowing errors making difficult to debug