Skip to content
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

Workspace gradlization feature merge #739

Merged
merged 41 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
c4bf84b
Gradle pt 1: tests + coverage
MrCreosote Mar 7, 2024
b871872
Remove test.yml cruft
MrCreosote Mar 26, 2024
c5f3d89
Fix quick test coverage
MrCreosote Mar 26, 2024
6fdb23b
Alphabetize deps & update syslog4j comment
MrCreosote Mar 28, 2024
a6ceb5b
Merge pull request #722 from MrCreosote/dev-gradle2
MrCreosote Mar 28, 2024
23a2657
Remove JNA
MrCreosote Mar 21, 2024
cb4f1a8
Build docs
MrCreosote Mar 25, 2024
7c13811
Merge pull request #723 from MrCreosote/dev-gradle2
MrCreosote Mar 28, 2024
5d9b354
Remove unnecessary jackson docks links
MrCreosote Apr 1, 2024
218f09c
Merge pull request #724 from MrCreosote/dev-gradle2
MrCreosote Apr 4, 2024
9903fd2
Build shadow jar
MrCreosote Mar 25, 2024
2c17333
Add workspace controller
MrCreosote Mar 25, 2024
f9a9d31
typo
MrCreosote Apr 10, 2024
ed37ddc
Add codecov token
MrCreosote Apr 10, 2024
602fbdb
Merge pull request #726 from MrCreosote/dev-gradle2
MrCreosote Apr 10, 2024
73e2f7a
Build docker image with gradle
MrCreosote Mar 26, 2024
ae3922a
Remove unnecessary WORKDIR line
MrCreosote Apr 10, 2024
b1bdb86
Merge pull request #728 from MrCreosote/dev-gradle2
MrCreosote Apr 12, 2024
40cab39
Build client jar
MrCreosote Mar 28, 2024
d6f4fcb
strip() -> trim() for java 8 compatibility
MrCreosote Apr 12, 2024
19117a4
Merge pull request #730 from kbase/dev-gradle2_upstream
MrCreosote Apr 17, 2024
a4f5350
Add schema updater script build
MrCreosote Mar 28, 2024
7e58b12
Merge pull request #731 from kbase/dev-gradle2_upstream
MrCreosote Apr 17, 2024
cceb096
Add kb-sdk compile tasks
MrCreosote Mar 28, 2024
661daf7
Merge pull request #732 from kbase/dev-gradle2_upstream
MrCreosote Apr 19, 2024
9b494eb
Add git commit to status() method & build
MrCreosote Mar 29, 2024
26742b9
Merge pull request #733 from kbase/dev-gradle2_upstream
MrCreosote Apr 23, 2024
148dbff
Delete build.xml and Makefile
MrCreosote Mar 29, 2024
c3785c4
Move source files to Gradle default locations
MrCreosote Mar 29, 2024
59f2032
Merge pull request #734 from kbase/dev-gradle2_upstream
MrCreosote Apr 25, 2024
53d7dd4
Update documentation for Gradle changes
MrCreosote Mar 30, 2024
c42c439
Docs clarifications & fixes
MrCreosote Apr 25, 2024
4c5301f
Use jitpack jars and publish shadow jar
MrCreosote Apr 8, 2024
236e2f1
Merge pull request #735 from kbase/dev-gradle2_upstream
MrCreosote Apr 29, 2024
00969f8
Improve release notes re shadow jar
MrCreosote Apr 29, 2024
8e30e60
Merge pull request #736 from kbase/dev-gradle2_upstream
MrCreosote Apr 30, 2024
d3e894d
Make a gradle service module for the main server code
MrCreosote Apr 26, 2024
8c25039
Merge pull request #737 from kbase/dev-gradle2_upstream
MrCreosote May 1, 2024
3827b1f
Add a client module
MrCreosote Apr 26, 2024
b55a0eb
Update docs for subproject structure
MrCreosote Apr 26, 2024
f411a05
Merge pull request #738 from kbase/dev-gradle2_upstream
MrCreosote May 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
113 changes: 0 additions & 113 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

15 changes: 5 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,17 @@ jobs:
fail-fast: false
matrix:
include:
- java: '11'
- 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
34 changes: 25 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,29 @@
FROM eclipse-temurin:11-jdk as build

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

COPY . /tmp/workspace_deluxe
WORKDIR /tmp/workspace

RUN cd workspace_deluxe && \
make docker_deps
# 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 @@ -39,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 @@ -54,6 +67,9 @@ LABEL org.label-schema.build-date=$BUILD_DATE \
us.kbase.vcs-branch=$BRANCH \
maintainer="KBase developers [email protected]"

# 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
Loading