-
Notifications
You must be signed in to change notification settings - Fork 43
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
s390x CI support #85
Open
Nayana-ibm
wants to merge
3
commits into
apache:trunk
Choose a base branch
from
linux-on-ibm-z:s390x_CI
base: trunk
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
s390x CI support #85
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
#!/bin/bash -xe | ||
|
||
################################ | ||
# | ||
# Prep | ||
# | ||
################################ | ||
|
||
# variables, with defaults | ||
[ "x${cassandra_builds_dir}" != "x" ] || cassandra_builds_dir="cassandra-builds" | ||
|
||
# pre-conditions | ||
command -v ant >/dev/null 2>&1 || { echo >&2 "ant needs to be installed"; exit 1; } | ||
command -v pip >/dev/null 2>&1 || { echo >&2 "pip needs to be installed"; exit 1; } | ||
command -v virtualenv >/dev/null 2>&1 || { echo >&2 "virtualenv needs to be installed"; exit 1; } | ||
command -v docker >/dev/null 2>&1 || { echo >&2 "docker needs to be installed"; exit 1; } | ||
(docker info >/dev/null 2>&1) || { echo >&2 "docker needs to running"; exit 1; } | ||
[ -f "build.xml" ] || { echo >&2 "build.xml must exist"; exit 1; } | ||
[ -d "${cassandra_builds_dir}" ] || { echo >&2 "cassandra-builds directory must exist"; exit 1; } | ||
|
||
# print debug information on versions | ||
ant -version | ||
pip --version | ||
virtualenv --version | ||
docker --version | ||
|
||
# Sphinx is needed for the gen-doc target | ||
virtualenv venv | ||
source venv/bin/activate | ||
# setuptools 45.0.0 requires python 3.5+ | ||
python -m pip install "setuptools<45" Sphinx sphinx_rtd_theme | ||
|
||
################################ | ||
# | ||
# Main | ||
# | ||
################################ | ||
|
||
# Setup JDK | ||
java_version=$(java -version 2>&1 | awk -F '"' '/version/ {print $2}' | awk -F. '{print $1}') | ||
if [ "$java_version" -ge 11 ]; then | ||
java_version="11" | ||
export CASSANDRA_USE_JDK11=true | ||
if ! grep -q CASSANDRA_USE_JDK11 build.xml ; then | ||
echo "Skipping build. JDK11 not supported against $(grep 'property\s*name=\"base.version\"' build.xml |sed -ne 's/.*value=\"\([^"]*\)\".*/\1/p')" | ||
exit 0 | ||
fi | ||
fi | ||
|
||
# Loop to prevent failure due to maven-ant-tasks not downloading a jar.. | ||
set +e # disable immediate exit from this point | ||
|
||
ARTIFACTS_BUILD_RUN=0 | ||
ECLIPSE_WARNINGS_RUN=0 | ||
HAS_DEPENDENCY_CHECK_TARGET=0 | ||
# versions starting from 6.4.1 contain "rate limiter" functionality to make builds more stable | ||
# https://github.com/jeremylong/DependencyCheck/pull/3725 | ||
DEPENDENCY_CHECK_VERSION=6.4.1 | ||
|
||
for x in $(seq 1 3); do | ||
if [ "${ARTIFACTS_BUILD_RUN}" -eq "0" ]; then | ||
ant clean artifacts | ||
RETURN="$?" | ||
fi | ||
if [ "${RETURN}" -eq "0" ]; then | ||
ARTIFACTS_BUILD_RUN=1 | ||
if [ "${ECLIPSE_WARNINGS_RUN}" -eq "0" ]; then | ||
# Run eclipse-warnings if build was successful | ||
ant eclipse-warnings | ||
RETURN="$?" | ||
fi | ||
if [ "${RETURN}" -eq "0" ]; then | ||
ECLIPSE_WARNINGS_RUN=1 | ||
if [ "${HAS_DEPENDENCY_CHECK_TARGET}" -eq "1" ]; then | ||
ant -Ddependency-check.version=${DEPENDENCY_CHECK_VERSION} -Ddependency-check.home=/tmp/dependency-check-${DEPENDENCY_CHECK_VERSION} dependency-check | ||
RETURN="$?" | ||
else | ||
RETURN="0" | ||
fi | ||
if [ ! "${RETURN}" -eq "0" ]; then | ||
if [ -f /tmp/dependency-check-${DEPENDENCY_CHECK_VERSION}/dependency-check-ant/dependency-check-ant.jar ]; then | ||
# Break the build here only in case dep zip was downloaded (hence JAR was extracted) just fine | ||
# but the check itself has failed. If JAR does not exist, it is probably | ||
# because the network was down so the ant target did not download the zip in the first place. | ||
echo "Failing the build on OWASP dependency check. Run 'ant dependency-check' locally and consult build/dependency-check-report.html to see the details." | ||
break | ||
else | ||
# sleep here to give the net the chance to resume after probable partition | ||
sleep 10 | ||
continue | ||
fi | ||
fi | ||
set -e | ||
fi | ||
break | ||
fi | ||
# sleep here to give the net the chance to resume after probable partition | ||
sleep 10 | ||
done | ||
|
||
################################ | ||
# | ||
# Clean | ||
# | ||
################################ | ||
|
||
# /virtualenv | ||
deactivate | ||
|
||
exit "${RETURN}" |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
it's unclear to me how this file is different to the existing
build-scripts/cassandra-artifacts.sh
?it is just the deb and rpm packaging that has been removed?
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.
Yes..deb and rpm packaging is removed for s390x for now as apache cassandra needs few code changes to fix test failures on s390x and we have already provided code changes through https://issues.apache.org/jira/browse/CASSANDRA-17723 . Also, chronicle-bytes code used in Apache Cassandra needs s390x support hence we are going ahead with this workaround for now.
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.
Ok. Is the plan to fix those failures as part of 17723 or 18072 ?
If that is the case then this PR should be marked as a draft, as the intention is never to merge it.
If you want to delay fixing the deb and rpm packing, then I suggest adding a conditional around that in the original script. Something like
DEP_PACKAGING_SKIP
andRPM_PACKAGING_SKIP
.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.
Issue-17723 will fix 6 tests out of 13 tests which we are skipping for s390x.
Issue-18072 is a part of CI for s390x. I raised different issue as repository was different.
I think we can go ahead with .deb and .rpm packaging for s390x also. Lets not delay.