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

Georchestra gn4.2.x rebase #258

Closed
wants to merge 11 commits into from
15 changes: 8 additions & 7 deletions .github/workflows/georchestra-gn4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ name: Building georchestra-geonetwork4 artifacts
on:
push:
branches:
- georchestra-gn4.2.x
- georchestra-gn4.2.x-23.0.x
pull_request:
workflow_dispatch:

env:
DOCKER_TAG: 4.2.x
DOCKER_TAG: 23.0.x

jobs:
build:
Expand All @@ -23,6 +25,7 @@ jobs:
with:
repository: "georchestra/georchestra"
path: "georchestra"
ref: "23.0.x"

- name: "Setting up Java"
uses: actions/setup-java@v2
Expand Down Expand Up @@ -60,22 +63,20 @@ jobs:
-DdockerImageName=georchestra/geonetwork:${DOCKER_TAG} -DskipTests

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

- name: "Login onto docker-hub"
if: github.repository == 'georchestra/geonetwork' && github.actor != 'dependabot[bot]' && github.ref == 'refs/heads/georchestra-gn4.2.x-23.0.x' && github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
username: '${{ secrets.DOCKER_HUB_USERNAME }}'
password: '${{ secrets.DOCKER_HUB_PASSWORD }}'

- name: "Pushing branch image to docker-hub"
if: github.repository == 'georchestra/geonetwork' && github.actor != 'dependabot[bot]' && github.ref == 'refs/heads/georchestra-gn4.2.x-23.0.x' && github.event_name != 'pull_request'
run: |
docker push georchestra/geonetwork:${DOCKER_TAG}

- name: "Pushing latest image to docker-hub"
run: |
docker tag georchestra/geonetwork:${DOCKER_TAG} georchestra/geonetwork:latest
docker push georchestra/geonetwork:latest
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ git*.properties
*/*/.*
*/*/target/
*/target/
.*/
**/.idea
**/.settings
GeoNetwork*
/geonetwork*
camel-harvesters/wfsfeature-harvester/logs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,19 +201,17 @@ protected static String escapeLikeLiteral(String text) {
protected static String convertLikePattern(PropertyIsLike filter) {
String result = filter.getLiteral();
if (!filter.getWildCard().equals("*")) {
final String wildcardRe =
StringUtils.isNotEmpty(filter.getEscape())
? Pattern.quote(filter.getEscape() + filter.getWildCard())
: filter.getWildCard();
final String wildcardRe = "(?<!" + Pattern.quote(filter.getEscape()) + ")" + Pattern.quote(filter.getWildCard());
result = result.replaceAll(wildcardRe, "*");
}
if (!filter.getSingleChar().equals("?")) {
final String singleCharRe =
StringUtils.isNotEmpty(filter.getEscape())
? Pattern.quote(filter.getEscape() + filter.getSingleChar())
: filter.getSingleChar();
final String singleCharRe = "(?<!" + Pattern.quote(filter.getEscape()) + ")" + Pattern.quote(filter.getSingleChar());
result = result.replaceAll(singleCharRe, "?");
}
if (!filter.getEscape().equals("\\")) {
final String escapeRe = Pattern.quote(filter.getEscape()) + "(.)";
result = result.replaceAll(escapeRe, "\\\\$1");
}
return result;
}

Expand Down Expand Up @@ -365,7 +363,7 @@ public Object visit(PropertyIsEqualTo filter, Object extraData) {
String dataPropertyValue = stack.pop();
String dataPropertyName = stack.pop();

final String filterEqualTo = String.format(templateMatch, dataPropertyName, dataPropertyValue);
final String filterEqualTo = String.format(templateMatch, dataPropertyName, dataPropertyValue.replaceAll("\\/", "\\\\\\\\/"));
stack.push(filterEqualTo);

return this;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n</pattern>
</encoder>
</appender>

<root level="info">
<appender-ref ref="STDOUT"/>
</root>

<logger name="org.testcontainers" level="INFO"/>
<!-- The following logger can be used for containers logs since 1.18.0 -->
<logger name="tc" level="INFO"/>
<logger name="com.github.dockerjava" level="WARN"/>
<logger name="com.github.dockerjava.zerodep.shaded.org.apache.hc.client5.http.wire" level="OFF"/>
</configuration>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# set by GeorchestraDatabaseContainer as a System property,
# so bad it looks like console doesn't resolve ${} placeholders
# so bad it looks like console doesn't resolve ${} placeholders
#pgsqlHost=${jdbc.host}
# set by GeorchestraDatabaseContainer as a System property
#pgsqlPort=${jdbc.port}
Expand Down Expand Up @@ -184,3 +184,9 @@ AreasGroup=INSEE_DEP
# Activates or disable GDPR-related endpoints
# default: true
#gdpr.allowAccountDeletion=true


rabbitmqHost=localhost
rabbitmqUser=
rabbitmqPassword=
rabbitmqPort=5672
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n</pattern>
</encoder>
</appender>

<root level="info">
<appender-ref ref="STDOUT"/>
</root>

<logger name="org.testcontainers" level="INFO"/>
<!-- The following logger can be used for containers logs since 1.18.0 -->
<logger name="tc" level="INFO"/>
<logger name="com.github.dockerjava" level="WARN"/>
<logger name="com.github.dockerjava.zerodep.shaded.org.apache.hc.client5.http.wire" level="OFF"/>
</configuration>
2 changes: 1 addition & 1 deletion georchestra-integration/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<name>geOrchestra integration</name>
<properties>
<rootProjectDir>${basedir}/..</rootProjectDir>
<georchestra.version>23.0.2</georchestra.version>
<georchestra.version>23.0.3-SNAPSHOT</georchestra.version>
</properties>
<modules>
<module>georchestra-utils</module>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -913,7 +913,7 @@ INSERT INTO settings_ui VALUES ('srv', '{
},
"footer": {
"enabled": false,
"showSocialBarInFooter": true
"showSocialBarInFooter": false
},
"geocoder": {
"appUrl": "https://secure.geonames.org/searchJSON",
Expand Down Expand Up @@ -953,6 +953,7 @@ INSERT INTO settings_ui VALUES ('srv', '{
"home": {
"appUrl": "../../{{node}}/{{lang}}/catalog.search#/home",
"enabled": true,
"showMosaic": false,
"facetConfig": {
"cl_hierarchyLevel.key": {
"terms": {
Expand All @@ -965,12 +966,6 @@ INSERT INTO settings_ui VALUES ('srv', '{
"field": "cl_topic.key",
"size": 20
}
},
"inspireThemeUri": {
"terms": {
"field": "inspireThemeUri",
"size": 34
}
}
},
"fluidLayout": true,
Expand Down Expand Up @@ -1071,7 +1066,7 @@ INSERT INTO settings_ui VALUES ('srv', '{
},
"recordview": {
"enabled": true,
"isSocialbarEnabled": true
"isSocialbarEnabled": false
},
"search": {
"appUrl": "../../{{node}}/{{lang}}/catalog.search#/search",
Expand Down Expand Up @@ -1262,7 +1257,7 @@ INSERT INTO settings_ui VALUES ('srv', '{
60,
120
],
"isFilterTagsDisplayedInSearch": true,
"isFilterTagsDisplayedInSearch": false,
"isVegaEnabled": true,
"linkTypes": {
"downloads": [
Expand Down
Loading