Skip to content

Commit

Permalink
Merge pull request #741 from kbase/develop
Browse files Browse the repository at this point in the history
0.15.0 release (develop -> master)
  • Loading branch information
MrCreosote authored May 8, 2024
2 parents 81defb3 + 0f6d151 commit 1fd4ee9
Show file tree
Hide file tree
Showing 672 changed files with 12,663 additions and 2,266 deletions.
110 changes: 0 additions & 110 deletions .classpath

This file was deleted.

1 change: 0 additions & 1 deletion .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,4 @@ comment:
require_changes: no

ignore:
- "build"
- "deployment"
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#
# https://help.github.com/articles/dealing-with-line-endings/
#
# These are explicitly windows files and should use crlf
*.bat text eol=crlf

21 changes: 8 additions & 13 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ on:
jobs:

workspace_container_tests:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3

Expand All @@ -37,25 +37,25 @@ jobs:
- name: Run tests
shell: bash
run: |
sh scripts/run_tests.sh
sh test/run_tests.sh
workspace_deluxe_tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- java: '11'
mongo: 'mongodb-linux-x86_64-3.6.23'
- java: '8' # needs to be compatible so jars can be used w/ java 8
mongo: 'mongodb-linux-x86_64-ubuntu2204-7.0.4'
minio: '2019-05-23T00-29-34Z'
wired_tiger: 'true'
ant_test: 'test_quick_coverage'
gradle_test: 'testQuick'
# the current production setup
- java: '11'
mongo: 'mongodb-linux-x86_64-3.6.13'
minio: '2019-05-23T00-29-34Z'
wired_tiger: 'false'
ant_test: 'test_quick_coverage'
gradle_test: 'testQuick'
steps:
- uses: actions/checkout@v3

Expand Down Expand Up @@ -84,10 +84,6 @@ jobs:
# move to parent dir of homedir to install binaries etc
cd ..
# set up jars
git clone https://github.com/kbase/jars
export JARSDIR=$(pwd)/jars/lib/jars/
# set up arango
export ARANGODB_VER=3.9.1
export ARANGODB_V=39
Expand Down Expand Up @@ -142,7 +138,6 @@ jobs:
sed -i "s#^test.mongo.exe.*#test.mongo.exe=$MONGOD#" test.cfg
sed -i "s#^test.minio.exe.*#test.minio.exe=$MINIO#" test.cfg
sed -i "s#^test.mongo.useWiredTiger.*#test.mongo.useWiredTiger=${{matrix.wired_tiger}}#" test.cfg
sed -i "s#^test.jars.dir.*#test.jars.dir=$JARSDIR#" test.cfg
sed -i "s#^test.blobstore.exe.*#test.blobstore.exe=$BLOBEXE#" test.cfg
sed -i "s#^test.handleservice.dir.*#test.handleservice.dir=$HSDIR#" test.cfg
sed -i "s#^test.sampleservice.dir.*#test.sampleservice.dir=$SAMPLE_DIR#" test.cfg
Expand All @@ -153,10 +148,10 @@ jobs:
- name: Run tests
shell: bash
run: |
ant javadoc
ant ${{matrix.ant_test}}
./gradlew ${{matrix.gradle_test}}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
38 changes: 28 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,29 @@
FROM eclipse-temurin:11-jdk as build

COPY . /tmp/workspace_deluxe
WORKDIR /tmp
RUN apt-get update -y && \
apt-get install -y ant git ca-certificates python3-sphinx && \
git clone https://github.com/kbase/jars && \
cd workspace_deluxe && \
make docker_deps
RUN apt update -y && \
apt install -y git ca-certificates python3-sphinx

WORKDIR /tmp/workspace

# dependencies take a while to D/L, so D/L & cache before the build so code changes don't cause
# a new D/L
# can't glob *gradle because of the .gradle dir
COPY gradlew settings.gradle /tmp/workspace/
COPY gradle/ /tmp/workspace/gradle/
RUN ./gradlew dependencies

# Now build the code
COPY workspace.spec /tmp/workspace/workspace.spec
COPY deployment/ /tmp/workspace/deployment/
COPY docshtml /tmp/workspace/docshtml/
COPY docsource /tmp/workspace/docsource/
COPY lib /tmp/workspace/lib/
COPY service /tmp/workspace/service
COPY client /tmp/workspace/client
# for the git commit
COPY .git /tmp/workspace/.git/
RUN ./gradlew war

# updated/slimmed down version of what's in kbase/kb_jre
FROM ubuntu:18.04

# These ARGs values are passed in via the docker build command
Expand Down Expand Up @@ -37,11 +52,11 @@ RUN mkdir -p /var/lib/apt/lists/partial && \
tar xvzf dockerize-${DOCKERIZE_VERSION}.tar.gz && \
rm dockerize-${DOCKERIZE_VERSION}.tar.gz

COPY --from=build /tmp/workspace_deluxe/deployment/ /kb/deployment/
COPY --from=build /tmp/workspace/deployment/ /kb/deployment/

RUN /usr/bin/${TOMCAT_VERSION}-instance-create /kb/deployment/services/workspace/tomcat && \
mv /kb/deployment/services/workspace/WorkspaceService.war /kb/deployment/services/workspace/tomcat/webapps/ROOT.war && \
rm -rf /kb/deployment/services/workspace/tomcat/webapps/ROOT
COPY --from=build /tmp/workspace/service/build/libs/service.war /kb/deployment/services/workspace/tomcat/webapps/ROOT.war

# The BUILD_DATE value seem to bust the docker cache when the timestamp changes, move to
# the end
Expand All @@ -52,6 +67,9 @@ LABEL org.label-schema.build-date=$BUILD_DATE \
us.kbase.vcs-branch=$BRANCH \
maintainer="KBase developers engage@kbase.us"

# TODO BUILD update to no longer use dockerize and take env vars (e.g. like Collections).
# TODO BUILD Use subsections in the ini file / switch to TOML

EXPOSE 7058
ENTRYPOINT [ "/kb/deployment/bin/dockerize" ]
WORKDIR /kb/deployment/services/workspace/tomcat
Expand Down
132 changes: 0 additions & 132 deletions Makefile

This file was deleted.

Loading

0 comments on commit 1fd4ee9

Please sign in to comment.