Skip to content

Commit a6f61ad

Browse files
authored
Merge pull request #329 from georchestra/gn-out-of-core-georchestra
gn-out-of-core-georchestra
2 parents f2ac24b + 41e8ba0 commit a6f61ad

File tree

5 files changed

+101
-65
lines changed

5 files changed

+101
-65
lines changed

.github/workflows/build-java11.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: build
2+
3+
on:
4+
push:
5+
branches:
6+
- georchestra-gn4.4.x
7+
- gn-out-of-core-georchestra
8+
pull_request:
9+
workflow_dispatch:
10+
11+
jobs:
12+
build:
13+
if: "!startsWith(github.event.head_commit.message, '[skip ci] ')"
14+
name: "📦 Build, test and publish on Docker Hub"
15+
runs-on: ubuntu-latest
16+
timeout-minutes: 40
17+
steps:
18+
- name: "Checking out"
19+
uses: actions/checkout@v2.4.0
20+
with:
21+
submodules: 'recursive'
22+
23+
- name: "Setting up Java"
24+
uses: actions/setup-java@v2
25+
with:
26+
java-version: '11'
27+
distribution: 'adopt'
28+
29+
- name: "Installing GeoNetwork"
30+
run: mvn clean install -DskipTests -Pdatahub-integration
31+
32+
- name: "run tests"
33+
run: mvn verify -Pit
34+
35+
- name: "publish the webapp as artifact"
36+
if: github.repository == 'georchestra/geonetwork' && github.actor != 'dependabot[bot]' && github.ref == 'refs/heads/georchestra-gn4.4.x' && github.event_name != 'pull_request'
37+
uses: actions/upload-artifact@v4
38+
with:
39+
name: geonetwork.war
40+
path: web/target/geonetwork.war
41+
42+
- name: Getting image tag
43+
if: github.repository == 'georchestra/geonetwork' && github.actor != 'dependabot[bot]'
44+
id: version
45+
run: echo "VERSION=$(echo $GITHUB_REF | cut -d / -f 3)" >> $GITHUB_OUTPUT
46+
47+
- name: "🐳 Build GeoNetwork docker image"
48+
if: github.repository == 'georchestra/geonetwork' && github.actor != 'dependabot[bot]'
49+
run: |
50+
cd web
51+
mvn package -Pdocker,datahub-integration -DdockerImageName=georchestra/geonetwork -DdockerImageTags=${{ steps.version.outputs.VERSION }},latest -DskipTests -ntp
52+
53+
- name: "Logging in docker.io"
54+
uses: azure/docker-login@v2
55+
if: github.repository == 'georchestra/geonetwork' && github.actor != 'dependabot[bot]' && github.event_name != 'pull_request'
56+
with:
57+
username: '${{ secrets.DOCKER_HUB_USERNAME }}'
58+
password: '${{ secrets.DOCKER_HUB_PASSWORD }}'
59+
60+
- name: "Pushing latest to docker.io"
61+
if: github.ref == 'refs/heads/master' && github.repository == 'georchestra/geonetwork' && github.actor != 'dependabot[bot]' && github.event_name != 'pull_request'
62+
run: |
63+
docker push georchestra/geonetwork:latest
64+
65+
- name: "Pushing release branch to docker.io"
66+
if: (contains(github.ref, 'refs/tags/') || endsWith(github.ref, '.x')) && github.repository == 'georchestra/geonetwork' && github.actor != 'dependabot[bot]' && github.event_name != 'pull_request'
67+
run: |
68+
docker push georchestra/geonetwork:${{ steps.version.outputs.VERSION }}
69+
70+
- name: "Update Docker Hub Description"
71+
if: github.ref == 'refs/heads/master' && github.repository == 'georchestra/geonetwork' && github.actor != 'dependabot[bot]' && github.event_name != 'pull_request'
72+
uses: peter-evans/dockerhub-description@v3
73+
with:
74+
username: ${{ secrets.DOCKER_HUB_USERNAME }}
75+
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
76+
repository: georchestra/geonetwork
77+
readme-filepath: ./geonetwork/DOCKER_HUB.md
78+
short-description: 'Geonetwork module for the geOrchestra SDI'

.github/workflows/georchestra-gn4.yml

Lines changed: 0 additions & 63 deletions
This file was deleted.

DOCKER_HUB.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ For this specific component, see the section `geonetwork` in the [`georchestra/d
3939

4040
## Where is it built
4141

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

4444
# License
4545

Makefile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
BTAG=4.4.x-SNAPSHOT
2+
3+
deb:
4+
mvn package deb:package -pl web -PdebianPackage,datahub-integration -DskipTests ${DEPLOY_OPTS}
5+
6+
container:
7+
mvn -DskipTests -Pdatahub-integration clean install; \
8+
cd web; \
9+
mvn -Pdocker,datahub-integration -DskipTests package -DdockerImageTags=${BTAG},latest
10+
11+
war:
12+
mvn clean install -Pdatahub-integration -DskipTests

georchestra-integration/pom.xml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,22 @@
1212
<name>geOrchestra integration</name>
1313
<properties>
1414
<rootProjectDir>${basedir}/..</rootProjectDir>
15-
<georchestra.version>25.0.1-SNAPSHOT</georchestra.version>
15+
<georchestra.version>25.0.0</georchestra.version>
1616
</properties>
1717
<modules>
1818
<module>georchestra-utils</module>
1919
<module>externalized-accounts</module>
2020
<module>georchestra-authnz</module>
2121
</modules>
22+
<repositories>
23+
<repository>
24+
<id>geOrchestra-artifactory</id>
25+
<name>geOrchestra Maven repository</name>
26+
<url>https://artifactory.georchestra.org/artifactory/georchestra/</url>
27+
<snapshots><enabled>true</enabled></snapshots>
28+
<releases><enabled>true</enabled></releases>
29+
</repository>
30+
</repositories>
2231
<dependencyManagement>
2332
<dependencies>
2433
<dependency>

0 commit comments

Comments
 (0)