Skip to content

Commit

Permalink
[SERV-418] Update dependencies and Cantaloupe version (#132)
Browse files Browse the repository at this point in the history
Co-authored-by: Anthony Vuong <[email protected]>
  • Loading branch information
ksclarke and cachemeoutside authored Jun 2, 2022
1 parent 3d3d44b commit 5c64a4a
Show file tree
Hide file tree
Showing 8 changed files with 1,550 additions and 27 deletions.
11 changes: 2 additions & 9 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,5 @@ jobs:
maven_args: >
-Drevision=nightly
-Dcantaloupe.version=dev
-Dcantaloupe.commit.ref=latest
-Dcantaloupe.patchfile=issue-555-v5.0.5.patch
-ntp -Dorg.slf4j.simpleLogger.log.net.sourceforge.pmd=error
-D${{ matrix.build_property }}=${{ secrets.KAKADU_VERSION }}
-DskipNexusStagingDeployMojo=true
-Ddocker.image=${{ secrets.DOCKER_REGISTRY_ACCOUNT}}cantaloupe${{ env.ARTIFACT_QUALIFIER }}:nightly
-Ddocker.registry.username=${{ secrets.DOCKER_USERNAME }}
-Ddocker.registry.account=${{ secrets.DOCKER_REGISTRY_ACCOUNT}}
-Ddocker.registry.password=${{ secrets.DOCKER_PASSWORD }}
-Dcantaloupe.commit.ref=${{ secrets.DEV_COMMIT_REF }}
-Dcantaloupe.apply.patchfiles=${{ secrets.APPLY_PATCHFILES }}
24 changes: 23 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ jobs:
uses: webfactory/ssh-agent@ee29fafb6aa450493bac9136b346e51ea60a8b5e # v0.4.1
with:
ssh-private-key: ${{ secrets.KAKADU_PRIVATE_SSH_KEY }}
- name: Release with Maven
- name: Release with Maven (Public)
uses: samuelmeuli/action-maven-publish@201a45a3f311b2ee888f252ba9f4194257545709 # v1.4.0
if: env.ARTIFACT_QUALIFIER != "-ucla"
with:
gpg_private_key: ${{ secrets.BUILD_KEY }}
gpg_passphrase: ${{ secrets.BUILD_PASSPHRASE }}
Expand All @@ -52,3 +53,24 @@ jobs:
-Ddocker.registry.username=${{ secrets.DOCKER_USERNAME }}
-Ddocker.registry.account=${{ secrets.DOCKER_REGISTRY_ACCOUNT}}
-Ddocker.registry.password=${{ secrets.DOCKER_PASSWORD }}
# Temporary divergence of our build so we can add some IIIF Auth related patches
- name: Release with Maven (UCLA)
uses: samuelmeuli/action-maven-publish@201a45a3f311b2ee888f252ba9f4194257545709 # v1.4.0
if: env.ARTIFACT_QUALIFIER == "-ucla"
with:
gpg_private_key: ${{ secrets.BUILD_KEY }}
gpg_passphrase: ${{ secrets.BUILD_PASSPHRASE }}
nexus_username: ${{ secrets.SONATYPE_USERNAME }} # These are placeholders; we're publishing a Docker image
nexus_password: ${{ secrets.SONATYPE_PASSWORD }}
maven_args: >
-Drevision=${{ github.event.release.tag_name }}
-ntp -Dorg.slf4j.simpleLogger.log.net.sourceforge.pmd=error
-D${{ matrix.build_property }}=${{ secrets.KAKADU_VERSION }}
-DskipNexusStagingDeployMojo=true
-Ddocker.image=${{ secrets.DOCKER_REGISTRY_ACCOUNT}}cantaloupe${{ env.ARTIFACT_QUALIFIER }}:${{ github.event.release.tag_name }}
-Ddocker.registry.username=${{ secrets.DOCKER_USERNAME }}
-Ddocker.registry.account=${{ secrets.DOCKER_REGISTRY_ACCOUNT}}
-Ddocker.registry.password=${{ secrets.DOCKER_PASSWORD }}
-Dcantaloupe.commit.ref=${{ secrets.DEV_COMMIT_REF }}
-Dcantaloupe.apply.patchfiles=${{ secrets.APPLY_PATCHFILES }}
-Dcantaloupe.version=dev
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ To build an older version of Cantaloupe, you can specify a commit hash:

mvn verify -Dcantaloupe.version=dev -Dcantaloupe.commit.ref=fff5425

To apply your own patches to the Cantaloupe source, create a patchfile in `src/main/docker/patches` with a Git diff, then use the following:
To apply your own patches to the Cantaloupe source, create patchfiles with a Git diff, put them into the directory `src/main/docker/patches`:

mvn verify -Dcantaloupe.version=dev -Dcantaloupe.patchfile=hotfix.patch
mvn verify -Dcantaloupe.version=dev -Dcantaloupe.apply.patchfiles=true

Patching an older version of Cantaloupe is possible as well.

Expand Down
23 changes: 12 additions & 11 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@

<properties>
<!-- What versions of Cantaloupe and Kakadu are we using? -->
<cantaloupe.version>5.0.4</cantaloupe.version>
<cantaloupe.version>5.0.5</cantaloupe.version>
<cantaloupe.commit.ref></cantaloupe.commit.ref>
<cantaloupe.patchfile></cantaloupe.patchfile>
<cantaloupe.apply.patchfiles>false</cantaloupe.apply.patchfiles>
<kakadu.version></kakadu.version>

<!-- Git repo with Kakadu source code (ours is private; override with yours) -->
Expand All @@ -77,16 +77,16 @@
<ubuntu.tag>20.04</ubuntu.tag>
<openjdk.version>11.0.15+10-0ubuntu0.20.04.1</openjdk.version>
<gcc.version>4:9.3.0-1ubuntu2</gcc.version>
<python2.version>2.7.17-2ubuntu4</python2.version>
<ffmpeg.version>7:4.2.4-1ubuntu0.1</ffmpeg.version>
<curl.version>7.68.0-1ubuntu2.10</curl.version>
<zip.version>3.0-11build1</zip.version>
<unzip.version>6.0-25ubuntu1</unzip.version>
<libturbojpeg.version>2.0.3-0ubuntu1.20.04.1</libturbojpeg.version>
<libopenjp2.version>2.3.1-1ubuntu4.20.04.1</libopenjp2.version>
<libtiff.version>4.1.0+git191117-2ubuntu0.20.04.2</libtiff.version>
<make.version>4.2.1-1.2</make.version>
<libtiff.version>4.1.0+git191117-2ubuntu0.20.04.3</libtiff.version>
<build.essential.version>12.8ubuntu1.1</build.essential.version>
<libopenjp2.version>2.3.1-1ubuntu4.20.04.1</libopenjp2.version>
<libturbojpeg.version>2.0.3-0ubuntu1.20.04.1</libturbojpeg.version>
<unzip.version>6.0-25ubuntu1</unzip.version>
<zip.version>3.0-11build1</zip.version>
<curl.version>7.68.0-1ubuntu2.11</curl.version>
<ffmpeg.version>7:4.2.4-1ubuntu0.1</ffmpeg.version>
<python2.version>2.7.17-2ubuntu4</python2.version>
<grok.version>9.1.0</grok.version>

<!-- Java dependency versions -->
Expand Down Expand Up @@ -523,6 +523,7 @@
</property>
</activation>
<properties>
<!-- This can be overridden from the command line -->
<artifact.qualifier>-ucla</artifact.qualifier>
</properties>
<build>
Expand Down Expand Up @@ -608,7 +609,7 @@
<parent>
<groupId>info.freelibrary</groupId>
<artifactId>freelib-parent</artifactId>
<version>7.1.2</version>
<version>7.2.2</version>
</parent>

</project>
8 changes: 4 additions & 4 deletions src/main/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ RUN if [ "${cantaloupe.version}" = "dev" ] ; then \
fi && \
\
# We can also supply a patchfile as a defense against a broken upstream
if [ -n "${cantaloupe.patchfile}" ] ; then \
if [ -f "/build/cantaloupe-patches/${cantaloupe.patchfile}" ] ; then \
git apply "/build/cantaloupe-patches/${cantaloupe.patchfile}" ; \
if ${cantaloupe.apply.patchfiles} ; then \
if [ $(ls -la /build/cantaloupe-patches/**.patch | wc -l) -gt 0 ] ; then \
git apply $(ls /build/cantaloupe-patches/**.patch | xargs) ; \
else \
echo "Warning: could not find patchfile \"${cantaloupe.patchfile}\"" ; \
echo "Warning: could not find any patchfiles" ; \
fi ; \
fi && \
\
Expand Down
Loading

0 comments on commit 5c64a4a

Please sign in to comment.