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

Bouw en publiceer de docker images voor de brmo-service stack #1655

Merged
merged 5 commits into from
Jan 16, 2023
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
22 changes: 22 additions & 0 deletions .github/workflows/cleanup_and_maintainance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,17 @@ jobs:
keep-last: 1
prune-untagged: true

- name: "brmo-service-db older than 1 week"
uses: vlaurin/action-ghcr-prune@v0.5.0
with:
token: ${{ secrets.GHCR_CLEANUP_PAT }}
organization: B3Partners
container: brmo-service-db
dry-run: false
keep-younger-than: 7
keep-last: 1
prune-untagged: true

- name: "brmo-bag2-loader older than 1 week"
continue-on-error: true
uses: vlaurin/action-ghcr-prune@v0.5.0
Expand Down Expand Up @@ -67,6 +78,17 @@ jobs:
keep-last: 0
prune-untagged: true

- name: "brmo-service-db older than 4 weeks"
uses: vlaurin/action-ghcr-prune@v0.5.0
with:
token: ${{ secrets.GHCR_CLEANUP_PAT }}
organization: B3Partners
container: brmo-service-db
dry-run: false
keep-younger-than: 28
keep-last: 0
prune-untagged: true

- name: "brmo-bag2-loader older than 4 weeks"
continue-on-error: true
uses: vlaurin/action-ghcr-prune@v0.5.0
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/linux-oracle.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: Ubuntu Oracle build

on:
- push
- pull_request
push:
branches:
- 'master'
pull_request:

concurrency: # cancel on PR pushes
# More info: https://stackoverflow.com/a/68422069/253468
Expand Down
46 changes: 40 additions & 6 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: 'Ubuntu PostgreSQL build'

on:
- push
- pull_request
push:
branches:
- 'master'
pull_request:

concurrency: # cancel on PR pushes
# More info: https://stackoverflow.com/a/68422069/253468
Expand All @@ -17,7 +19,7 @@ env:

jobs:
build:
name: Java ${{ matrix.java }} / PostGIS ${{ matrix.postgis }}
name: "Java ${{ matrix.java }} / PostGIS ${{ matrix.postgis }}"
runs-on: ubuntu-22.04
strategy:
fail-fast: false
Expand All @@ -29,9 +31,9 @@ jobs:
postgis:
# tot 11-2023
- 11-3.3-alpine
- 12-3.3-alpine
- 13-3.3-alpine
- 14-3.3-alpine
# - 12-3.3-alpine
# - 13-3.3-alpine
# - 14-3.3-alpine
- 15-3.3-alpine

steps:
Expand Down Expand Up @@ -180,6 +182,38 @@ jobs:
run: mvn -B -V -fae -DskipQA=false -Dfmt.action=check -Dpom.fmt.action=verify -Ddocker.skip=true -Dtest.onlyITs= -Dmaven.test.skip=true clean package


deploy:
name: 'Deploy docker images'
if: ${{ github.repository == 'B3Partners/brmo' && github.ref == 'refs/heads/main' && github.event_name == 'push' }}
needs: [build, qacheck]
runs-on: ubuntu-22.04
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
with:
lfs: false

- name: 'Set up JDK'
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
cache: 'maven'
server-id: 'ghcr.io'
server-username: GITHUB_ACTOR
server-password: GITHUB_TOKEN

- name: 'Build and Push docker images'
env:
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
mvn -pl docker,datamodel -am -Dmaven.test.skip=true -Dtest.onlyITs= -B -V -fae -DskipQA=true -Ddocker.skip=true install
mvn -pl docker -Dmaven.test.skip=true -Dtest.onlyITs= -B -V -fae -DskipQA=true deploy


cleanup:
name: 'Maven cache cleanup'
if: ${{ always() }}
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/upgrade-oracle.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
name: Oracle Database Upgrade

on:
- push
push:
branches:
- 'master'
pull_request:

concurrency: # cancel on PR pushes
# More info: https://stackoverflow.com/a/68422069/253468
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/upgrade-pgsql.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
name: 'PostgreSQL Database Upgrade'

on:
- push
push:
branches:
- 'master'
pull_request:

concurrency: # cancel on PR pushes
# More info: https://stackoverflow.com/a/68422069/253468
Expand Down
2 changes: 1 addition & 1 deletion bag2-loader/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ FROM eclipse-temurin:11.0.17_8-jre

LABEL org.opencontainers.image.source=https://github.com/b3partners/brmo/bag2-loader

ARG BRMO_VERSION=2.3.3-SNAPSHOT
ARG BRMO_VERSION=3.0.0-SNAPSHOT
ARG DEBIAN_FRONTEND="noninteractive"
ARG TZ="Europe/Amsterdam"

Expand Down
42 changes: 21 additions & 21 deletions bag2-loader/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -295,27 +295,27 @@ SPDX-License-Identifier: MIT
</plugins>
</build>
</profile>
<profile>
<id>windows</id>
<activation>
<os>
<family>Windows</family>
</os>
</activation>
<build>
<plugins>
<plugin>
<!-- skip op Windows -->
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<configuration>
<verbose>false</verbose>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<!-- <profile>-->
<!-- <id>windows</id>-->
<!-- <activation>-->
<!-- <os>-->
<!-- <family>Windows</family>-->
<!-- </os>-->
<!-- </activation>-->
<!-- <build>-->
<!-- <plugins>-->
<!-- <plugin>-->
<!-- &lt;!&ndash; skip op Windows &ndash;&gt;-->
<!-- <groupId>io.fabric8</groupId>-->
<!-- <artifactId>docker-maven-plugin</artifactId>-->
<!-- <configuration>-->
<!-- <verbose>false</verbose>-->
<!-- <skip>true</skip>-->
<!-- </configuration>-->
<!-- </plugin>-->
<!-- </plugins>-->
<!-- </build>-->
<!-- </profile>-->
<profile>
<id>postgresql</id>
<build>
Expand Down
2 changes: 1 addition & 1 deletion bgt-loader/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ FROM eclipse-temurin:11.0.17_8-jre

LABEL org.opencontainers.image.source=https://github.com/b3partners/brmo/bgt-citygml-loader

ARG BRMO_VERSION=2.3.3-SNAPSHOT
ARG BRMO_VERSION=3.0.0-SNAPSHOT
ARG DEBIAN_FRONTEND="noninteractive"
ARG TZ="Europe/Amsterdam"

Expand Down
42 changes: 21 additions & 21 deletions bgt-loader/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -341,26 +341,26 @@ SPDX-License-Identifier: MIT
</plugins>
</build>
</profile>
<profile>
<id>windows</id>
<activation>
<os>
<family>Windows</family>
</os>
</activation>
<build>
<plugins>
<plugin>
<!-- skip op Windows -->
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<configuration>
<verbose>false</verbose>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<!-- <profile>-->
<!-- <id>windows</id>-->
<!-- <activation>-->
<!-- <os>-->
<!-- <family>Windows</family>-->
<!-- </os>-->
<!-- </activation>-->
<!-- <build>-->
<!-- <plugins>-->
<!-- <plugin>-->
<!-- &lt;!&ndash; skip op Windows &ndash;&gt;-->
<!-- <groupId>io.fabric8</groupId>-->
<!-- <artifactId>docker-maven-plugin</artifactId>-->
<!-- <configuration>-->
<!-- <verbose>false</verbose>-->
<!-- <skip>true</skip>-->
<!-- </configuration>-->
<!-- </plugin>-->
<!-- </plugins>-->
<!-- </build>-->
<!-- </profile>-->
</profiles>
</project>
6 changes: 6 additions & 0 deletions brmo-dist/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
<name>BRMO distributie</name>
<description>Distributie zipfile van de B3Partners BRMO applicaties</description>
<dependencies>
<dependency>
<groupId>nl.b3p</groupId>
<artifactId>datamodel</artifactId>
<version>${project.version}</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>nl.b3p</groupId>
<artifactId>brmo-proxyservice</artifactId>
Expand Down
10 changes: 5 additions & 5 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ mvn clean deploy
Start een stack met de bijvoorbeeld volgende command line:

```shell
docker compose --env-file /home/mark/dev/projects/brmo/docker/localhost.env \
-f /home/mark/dev/projects/brmo/docker/docker-compose.yml \
-f /home/mark/dev/projects/brmo/docker/docker-compose-ports.yml \
-p brmo-service up --always-recreate-deps --remove-orphans -d --build
docker compose --env-file docker/localhost.env \
-f docker/docker-compose.yml \
-f docker/docker-compose-ports.yml \
-p brmo-service up --always-recreate-deps --remove-orphans -d
```

Het default password dient te worden aangepast voordat er data wordt geladen.
Het default password van de brmo-service dient te worden aangepast voordat er data wordt geladen.
Gebruik de procedure op https://github.com/B3Partners/brmo/wiki/update-wachtwoord-procedure#versies-vanaf-210

```shell
Expand Down
7 changes: 1 addition & 6 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ volumes:

services:
db:
build:
context: ./src/main/docker
dockerfile: pg_conf/Dockerfile
image: ghcr.io/b3partners/brmo-service-db:${BRMO_VERSION:-snapshot}
shm_size: '2gb'
command: >
-c shared_buffers=8GB
Expand All @@ -31,9 +29,6 @@ services:

brmo:
image: ghcr.io/b3partners/brmo-service:${BRMO_VERSION:-snapshot}
build:
context: ./src/main/docker
dockerfile: Dockerfile
shm_size: '512mb'
volumes:
- brmo-logs:/usr/local/tomcat/logs
Expand Down
Loading