Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 78 additions & 0 deletions .github/workflows/build-java11.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: build

on:
push:
branches:
- georchestra-gn4.4.x
- gn-out-of-core-georchestra
pull_request:
workflow_dispatch:

jobs:
build:
if: "!startsWith(github.event.head_commit.message, '[skip ci] ')"
name: "📦 Build, test and publish on Docker Hub"
runs-on: ubuntu-latest
timeout-minutes: 40
steps:
- name: "Checking out"
uses: actions/checkout@v2.4.0
with:
submodules: 'recursive'

- name: "Setting up Java"
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'

- name: "Installing GeoNetwork"
run: mvn clean install -DskipTests -Pdatahub-integration

- name: "run tests"
run: mvn verify -Pit

- name: "publish the webapp as artifact"
if: github.repository == 'georchestra/geonetwork' && github.actor != 'dependabot[bot]' && github.ref == 'refs/heads/georchestra-gn4.4.x' && github.event_name != 'pull_request'
uses: actions/upload-artifact@v4
with:
name: geonetwork.war
path: web/target/geonetwork.war

- name: Getting image tag
if: github.repository == 'georchestra/geonetwork' && github.actor != 'dependabot[bot]'
id: version
run: echo "VERSION=$(echo $GITHUB_REF | cut -d / -f 3)" >> $GITHUB_OUTPUT

- name: "🐳 Build GeoNetwork docker image"
if: github.repository == 'georchestra/geonetwork' && github.actor != 'dependabot[bot]'
run: |
cd web
mvn package -Pdocker,datahub-integration -DdockerImageName=georchestra/geonetwork -DdockerImageTags=${{ steps.version.outputs.VERSION }},latest -DskipTests -ntp

- name: "Logging in docker.io"
uses: azure/docker-login@v2
if: github.repository == 'georchestra/geonetwork' && github.actor != 'dependabot[bot]' && github.event_name != 'pull_request'
with:
username: '${{ secrets.DOCKER_HUB_USERNAME }}'
password: '${{ secrets.DOCKER_HUB_PASSWORD }}'

- name: "Pushing latest to docker.io"
if: github.ref == 'refs/heads/master' && github.repository == 'georchestra/geonetwork' && github.actor != 'dependabot[bot]' && github.event_name != 'pull_request'
run: |
docker push georchestra/geonetwork:latest

- name: "Pushing release branch to docker.io"
if: (contains(github.ref, 'refs/tags/') || endsWith(github.ref, '.x')) && github.repository == 'georchestra/geonetwork' && github.actor != 'dependabot[bot]' && github.event_name != 'pull_request'
run: |
docker push georchestra/geonetwork:${{ steps.version.outputs.VERSION }}

- name: "Update Docker Hub Description"
if: github.ref == 'refs/heads/master' && github.repository == 'georchestra/geonetwork' && github.actor != 'dependabot[bot]' && github.event_name != 'pull_request'
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
repository: georchestra/geonetwork
readme-filepath: ./geonetwork/DOCKER_HUB.md
short-description: 'Geonetwork module for the geOrchestra SDI'
63 changes: 0 additions & 63 deletions .github/workflows/georchestra-gn4.yml

This file was deleted.

2 changes: 1 addition & 1 deletion DOCKER_HUB.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ For this specific component, see the section `geonetwork` in the [`georchestra/d

## Where is it built

This image is built using maven : `./mvnw -Pdocker package docker:build` in [`georchestra`](https://github.com/georchestra/georchestra) repository.
This image is built using maven : `mvn -Pdocker package` in [`georchestra`](https://github.com/georchestra/georchestra) repository.

# License

Expand Down
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
BTAG=4.4.x-SNAPSHOT

deb:
mvn package deb:package -pl web -PdebianPackage,datahub-integration -DskipTests ${DEPLOY_OPTS}

container:
mvn -DskipTests -Pdatahub-integration clean install; \
cd web; \
mvn -Pdocker,datahub-integration -DskipTests package -DdockerImageTags=${BTAG},latest

war:
mvn clean install -Pdatahub-integration -DskipTests
11 changes: 10 additions & 1 deletion georchestra-integration/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,22 @@
<name>geOrchestra integration</name>
<properties>
<rootProjectDir>${basedir}/..</rootProjectDir>
<georchestra.version>25.0.1-SNAPSHOT</georchestra.version>
<georchestra.version>25.0.0</georchestra.version>
</properties>
<modules>
<module>georchestra-utils</module>
<module>externalized-accounts</module>
<module>georchestra-authnz</module>
</modules>
<repositories>
<repository>
<id>geOrchestra-artifactory</id>
<name>geOrchestra Maven repository</name>
<url>https://artifactory.georchestra.org/artifactory/georchestra/</url>
<snapshots><enabled>true</enabled></snapshots>
<releases><enabled>true</enabled></releases>
</repository>
</repositories>
<dependencyManagement>
<dependencies>
<dependency>
Expand Down
Loading