-
Notifications
You must be signed in to change notification settings - Fork 242
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'integration' into bugfix/issue-2469
- Loading branch information
Showing
364 changed files
with
205,945 additions
and
3,575 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,10 @@ jobs: | |
java-version: ${{env.JAVA_VERSION}} | ||
maven-version: 3.9.5 | ||
cache: 'maven' | ||
- name: Extract branch name | ||
shell: bash | ||
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT | ||
id: extract_branch | ||
- name: Format code | ||
env: | ||
USER_NAME: ${{ secrets.USER_NAME }} | ||
|
@@ -42,6 +46,7 @@ jobs: | |
- name: Commit Changes | ||
run: | | ||
if [ "$diffs_found" = true ]; then | ||
git checkout -b ${{ steps.extract_branch.outputs.branch }} | ||
git config --global user.name "GitHub Actions" | ||
git config --global user.email "[email protected]" | ||
git commit -am "Formatting job fix" | ||
|
@@ -219,6 +224,77 @@ jobs: | |
cd docker | ||
docker compose logs | ||
compose-build-and-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Free up some space | ||
run: | | ||
sudo rm -rf /usr/share/dotnet | ||
sudo rm -rf /opt/ghc | ||
sudo rm -rf /usr/local/share/boost | ||
sudo rm -rf $AGENT_TOOLSDIRECTORY | ||
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: 'recursive' | ||
- name: Set up JDK ${{env.JAVA_VERSION}} | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: ${{env.JAVA_DISTRIBUTION}} | ||
java-version: ${{env.JAVA_VERSION}} | ||
- uses: actions/cache@v3 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-build-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-maven-build- | ||
${{ runner.os }}-maven-format- | ||
${{ runner.os }}-maven- | ||
# Builds the quickstart and microservice docker images and runs a query test | ||
- name: Docker Compose Query Tests | ||
env: | ||
USER_NAME: ${{ secrets.USER_NAME }} | ||
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} | ||
run: | | ||
# set some bogus URLs to trigger dependency download via maven | ||
DIST_URLS="-Durl.zookeeper=https://bogus.apache.org/zookeeper/zookeeper-3.7.2/apache-zookeeper-3.7.2-bin.tar.gz.tar.gz \ | ||
-Durl.accumulo=https://bogus.apache.org/accumulo/2.1.3/accumulo-2.1.3-bin.tar.gz \ | ||
-Durl.wildfly=https://bogus.jboss.org/wildfly/17.0.1.Final/wildfly-17.0.1.Final.tar.gz \ | ||
-Durl.hadoop=https://bogus.apache.org/hadoop/common/hadoop-3.3.6/hadoop-3.3.6.tar.gz \ | ||
-Durl.maven=https://bogus.apache.org/maven/maven-3/3.8.8/binaries/apache-maven-3.8.8-bin.tar.gz" | ||
mvn -s $GITHUB_WORKSPACE/.github/workflows/settings.xml -B -V -e -Pcompose -Dmicroservice-docker -Dquickstart-docker -Dquickstart-maven ${DIST_URLS} -Ddeploy -Dtar -DskipTests -Dmaven.build.cache.enabled=false clean install | ||
# free up some space so that we don't run out | ||
docker system prune -f | ||
mvn -s $GITHUB_WORKSPACE/.github/workflows/settings.xml -B -V -e -Pcompose -Dmicroservice-docker -Dquickstart-docker -Dquickstart-maven ${DIST_URLS} -Ddeploy -Dtar -DskipTests -Dmaven.build.cache.enabled=false clean | ||
cd docker | ||
./bootstrap.sh | ||
attempt=0 | ||
max_attempts=20 | ||
while [ $attempt -lt $max_attempts ]; do | ||
attempt=$((attempt+1)) | ||
echo "Starting docker compose (Attempt ${attempt}/${max_attempts})" | ||
nohup docker compose up -d --no-recreate < /dev/null > compose.out 2>&1 & | ||
sleep 60s | ||
cat compose.out | ||
# check to see if the query service is running | ||
QUERY="$(docker compose ps --status running --services | grep query || true)" | ||
if [ "$QUERY" == "query" ] ; then | ||
echo "Docker compose started successfully" | ||
break | ||
elif [ $attempt -eq $max_attempts ] ; then | ||
echo "Failed to start docker compose" | ||
exit 1 | ||
fi | ||
done | ||
cd scripts | ||
./testAll.sh | ||
- name: Dump Logs | ||
if: failure() | ||
run: | | ||
cd docker | ||
docker compose logs | ||
# Here's an example of how you'd deploy the image to the github package registry. | ||
# We don't want to do this by default since packages on github cannot be deleted | ||
# or overwritten. So this could only be done for tags, however it seems the quickstart | ||
|
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
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
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 |
---|---|---|
|
@@ -6,6 +6,13 @@ ARG DATAWAVE_JAVA_HOME | |
ARG DATAWAVE_BUILD_PROFILE | ||
ARG DATAWAVE_SKIP_INGEST=false | ||
ARG DATAWAVE_SKIP_TESTS=false | ||
ARG DATAWAVE_MAVEN_REPO="https://maven.pkg.github.com/NationalSecurityAgency/datawave" | ||
|
||
ARG ACCUMULO_URL | ||
ARG HADOOP_URL | ||
ARG MAVEN_URL | ||
ARG WILDFLY_URL | ||
ARG ZOOKEEPER_URL | ||
|
||
USER root | ||
|
||
|
@@ -51,9 +58,15 @@ RUN rm -f .dockerignore .maven-dockerignore && \ | |
git config user.email "[email protected]" && \ | ||
git config user.name "Root User" && \ | ||
git commit -m "Source Branch :: $DATAWAVE_BRANCH_NAME :: Source Commit :: $DATAWAVE_COMMIT_ID" && \ | ||
echo "export DW_ACCUMULO_DIST_URI=\"$ACCUMULO_URL\"" >> ~/.bashrc && \ | ||
echo "export DW_HADOOP_DIST_URI=\"$HADOOP_URL\"" >> ~/.bashrc && \ | ||
echo "export DW_MAVEN_DIST_URI=\"$MAVEN_URL\"" >> ~/.bashrc && \ | ||
echo "export DW_WILDFLY_DIST_URI=\"$WILDFLY_URL\"" >> ~/.bashrc && \ | ||
echo "export DW_ZOOKEEPER_DIST_URI=\"$ZOOKEEPER_URL\"" >> ~/.bashrc && \ | ||
echo "export DW_DATAWAVE_BUILD_PROFILE=\"$DATAWAVE_BUILD_PROFILE\"" >> ~/.bashrc && \ | ||
echo "export DW_DATAWAVE_INGEST_TEST_SKIP=\"$DATAWAVE_SKIP_INGEST\"" >> ~/.bashrc && \ | ||
echo "export DW_WGET_OPTS=\"-q\"" >> ~/.bashrc && \ | ||
echo "export DW_MAVEN_REPOSITORY=\"$DATAWAVE_MAVEN_REPO\"" >> ~/.bashrc && \ | ||
echo "export DW_WGET_OPTS=\"-q --no-check-certificate\"" >> ~/.bashrc && \ | ||
echo "export JAVA_HOME=\"$DATAWAVE_JAVA_HOME\"" >> ~/.bashrc && \ | ||
echo "export PATH=\$JAVA_HOME/bin:\$PATH" >> ~/.bashrc && \ | ||
echo "source /opt/datawave/contrib/datawave-quickstart/bin/env.sh" >> ~/.bashrc | ||
|
Oops, something went wrong.