diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..f087b429 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.tar.gz filter=lfs diff=lfs merge=lfs -text diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 70e22f87..328dea92 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -3,6 +3,9 @@ name: Build & publish zooma images on: push: branches: [ "dev", "stable" ] + pull_request: + branches: + - dev env: REGISTRY: ghcr.io @@ -17,6 +20,11 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v2 + with: + lfs: true + + - name: Pull Git LFS files + run: git lfs pull - name: Log in to the Container registry uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 @@ -28,5 +36,10 @@ jobs: - name: Build and push zooma Docker image run: | docker build -t ghcr.io/ebispot/zooma:${{ github.sha }} . - docker tag ghcr.io/ebispot/zooma:${{ github.sha }} ghcr.io/ebispot/zooma:${{ github.ref_name }} + if [[ "${{ github.event_name }}" == "pull_request" ]]; then + TAG="PR-${{ github.event.pull_request.number }}" + else + TAG="${{ github.ref_name }}" + fi + docker tag ghcr.io/ebispot/zooma:${{ github.sha }} ghcr.io/ebispot/zooma:${TAG} docker push --all-tags ghcr.io/ebispot/zooma diff --git a/Dockerfile b/Dockerfile index 0c2b42c5..9ff21471 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,16 +6,22 @@ ENV ZOOMA_OPTS="-Xms1g -Xmx4g" RUN mkdir /opt/zooma_github /opt/zooma RUN apt-get update && apt-get install -y nano maven COPY . /opt/zooma_github/ + +RUN rm -rf /root/.m2/ +RUN tar -xvzf /opt/zooma_github/ols-client/lib/m2directory.tar.gz -C /root/ + ENV OJDBC6="https://www.oracle.com/webapps/redirect/signon?nexturl=https://download.oracle.com/otn/utilities_drivers/jdbc/11204/ojdbc6.jar" RUN wget $OJDBC6 -O /lib/ojdbc6.jar \ && mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc6 -Dpackaging=jar -Dversion=11.2.0.4 -Dfile=/lib/ojdbc6.jar \ && test /root/.m2/repository/com/oracle/ojdbc6/11.2.0.4/ojdbc6-11.2.0.4.jar + RUN mvn install:install-file -DcreateChecksum=true -Dpackaging=jar -Dfile=/opt/zooma_github/zooma-lodestar/lib/jena-core-2.12.0.jar -DgroupId=org.apache.jena -DartifactId=jena-core -Dversion=2.12.0 RUN mvn install:install-file -DcreateChecksum=true -Dpackaging=jar -Dfile=/opt/zooma_github/zooma-lodestar/lib/jena-arq-2.12.0.jar -DgroupId=org.apache.jena -DartifactId=jena-arq -Dversion=2.12.0 RUN mvn install:install-file -DcreateChecksum=true -Dpackaging=jar -Dfile=/opt/zooma_github/zooma-lodestar/lib/lode-core-api-1.3.jar -DgroupId=ebi-lode -DartifactId=lode-core-api -Dversion=1.3 RUN mvn install:install-file -DcreateChecksum=true -Dpackaging=jar -Dfile=/opt/zooma_github/zooma-lodestar/lib/lode-virtuoso-impl-1.3.jar -DgroupId=ebi-lode -DartifactId=lode-virtuoso-impl -Dversion=1.3 RUN mvn install:install-file -DcreateChecksum=true -Dpackaging=jar -Dfile=/opt/zooma_github/zooma-ui/lib/jackson-mapper-asl-1.5.3.jar -DgroupId=org.codehaus.jackson -DartifactId=jackson-mapper-asl -Dversion=1.5.3 RUN mvn install:install-file -DcreateChecksum=true -Dpackaging=jar -Dfile=/opt/zooma_github/zooma-ui/lib/jackson-core-asl-1.5.3.jar -DgroupId=org.codehaus.jackson -DartifactId=jackson-core-asl -Dversion=1.5.3 + RUN cd /opt/zooma_github && mvn clean package RUN mkdir /opt/tmp && unzip /opt/zooma_github/zooma-builder-app/target/zooma-builder.zip -d /opt/tmp RUN cp /opt/zooma_github/zooma-ui/target/zooma.war /usr/local/tomcat/webapps/ diff --git a/ols-client/lib/m2directory.tar.gz b/ols-client/lib/m2directory.tar.gz new file mode 100644 index 00000000..19e93c0e --- /dev/null +++ b/ols-client/lib/m2directory.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5ead688d4717b109b0f0314b6126481244915bd7378184d2b6a4a80c8c1d87bc +size 540467695