Skip to content

Commit

Permalink
Merge branch 'georchestra-gn4.2.x' into georchestra-gn4.2.x-rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
f-necas authored Jan 25, 2024
2 parents 05b7f4f + 5dc598b commit 6714b7a
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 19 deletions.
3 changes: 3 additions & 0 deletions .backportrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"autoMerge": true
}
24 changes: 24 additions & 0 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Automatic backport action

on:
pull_request_target:
types: ["closed"]

jobs:
backport:
name: Backport PR
runs-on: ubuntu-latest
steps:
- name: Backport Action
uses: sqren/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
auto_backport_label_prefix: backport-to-

- name: Info log
if: ${{ success() }}
run: cat ~/.backport/backport.info.log

- name: Debug log
if: ${{ failure() }}
run: cat ~/.backport/backport.debug.log
18 changes: 1 addition & 17 deletions .github/workflows/georchestra-gn4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ env:

jobs:
build:
if: "!startsWith(github.event.head_commit.message, '[skip ci] ')"
runs-on: ubuntu-latest
timeout-minutes: 40
steps:
Expand Down Expand Up @@ -68,20 +69,3 @@ jobs:
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' && 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' && github.event_name != 'pull_request'
run: |
docker push georchestra/geonetwork:${DOCKER_TAG}
- name: "Pushing latest image to docker-hub"
if: github.repository == 'georchestra/geonetwork' && github.actor != 'dependabot[bot]' && github.ref == 'refs/heads/georchestra-gn4.2.x' && github.event_name != 'pull_request'
run: |
docker tag georchestra/geonetwork:${DOCKER_TAG} georchestra/geonetwork:latest
docker push georchestra/geonetwork:latest
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,23 @@ void testPropertyIsEqualTo() throws IOException {
bld();

assertFilterEquals(expected, input);


final String input2 =
"<Filter xmlns=\"http://www.opengis.net/ogc\">\n" //
+ " <PropertyIsLike wildCard=\"%\" singleChar=\"_\" escapeChar=\"\\\">\n" //
+ " <PropertyName>AnyText</PropertyName>\n" //
+ " <Literal>OGC:WMS\\%</Literal>\n" //
+ " </PropertyIsLike>\n" //
+ " </Filter>";

// EXPECTED:
final ObjectNode expected2 = EsJsonHelper.boolbdr(). //
must(array(queryStringPart("AnyText", "OGC\\:WMS*"))). //
filter(queryStringPart()). //
bld();

assertFilterEquals(expected2, input2);
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
var map = scope.$eval(prop);
var target = element[0];

var resizeObserver = new ResizeObserver(function () {
var resizeObserver = new ResizeObserver(function() {
map.updateSize();
resizeObserver.unobserve(target);
});
Expand Down
2 changes: 2 additions & 0 deletions web/src/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ COPY --chown=jetty:jetty . /
# Temporary switch to root
USER root

RUN mkdir -p /docker-entrypoint.d
RUN chown jetty:jetty /docker-entrypoint.d
RUN mkdir -p /mnt/geonetwork_datadir && \
chown jetty:jetty /mnt/geonetwork_datadir

Expand Down
12 changes: 11 additions & 1 deletion web/src/docker/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,19 @@

DIR=/docker-entrypoint.d

# Executing custom scripts located in CUSTOM_SCRIPTS_DIRECTORY if environment variable is set
if [[ -z "${CUSTOM_SCRIPTS_DIRECTORY}" ]]; then
echo "[INFO] No CUSTOM_SCRIPTS_DIRECTORY env variable set"
else
echo "[INFO] CUSTOM_SCRIPTS_DIRECTORY env variable set to ${CUSTOM_SCRIPTS_DIRECTORY}"
cp -v "${CUSTOM_SCRIPTS_DIRECTORY}"/* "$DIR"
echo "[INFO] End copying custom scripts"
fi

if [[ -d "$DIR" ]]
then
/bin/run-parts --verbose "$DIR"
# Regex is needed to execute all kind of files, including sh files. Warning : --regex not available in alpine images.
/bin/run-parts --verbose "$DIR" --regex='.*'
fi

exec "$@"

0 comments on commit 6714b7a

Please sign in to comment.