Merge branch 'master' of...

Merge branch 'master' of gitlab.switch.ch:memoriav/memobase-2020/services/postprocessing/iiif-manifest-ingester
parents 9af6a126 9b479f07
Pipeline #19588 passed with stages
in 4 minutes and 48 seconds
......@@ -10,81 +10,16 @@ variables:
SBT_OPTS: "-Dsbt.global.base=sbt-cache/sbtboot -Dsbt.boot.directory=sbt-cache/boot -Dsbt.ivy.home=sbt-cache/ivy"
DOCKER_TLS_CERTDIR: ""
include:
- project: 'memoriav/memobase-2020/utilities/ci-templates'
file: 'docker-image/docker-image.yml'
- project: 'memoriav/memobase-2020/utilities/ci-templates'
file: 'sbt-build/sbt-build.yml'
cache:
key: "$CI_BUILD_REF_NAME"
paths:
- "sbt-cache/ivy/cache"
- "sbt-cache/boot"
- "sbt-cache/sbtboot"
- "sbt-cache/target"
test:
stage: test
tags: [mbr]
before_script:
- apt-get update && apt-get install -y ffmpeg imagemagick
- wget https://kakadusoftware.com/wp-content/uploads/2020/06/KDU805_Demo_Apps_for_Linux-x86-64_200602.zip
- unzip KDU805_Demo_Apps_for_Linux-x86-64_200602.zip && cd KDU805_Demo_Apps_for_Linux-x86-64_200602/ && mv kdu_compress libkdu_v80R.so ../ && cd ..
- export PATH=$PATH:`pwd`
- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:`pwd`
script:
- sbt test
assembly:
stage: build
tags: [mbr]
script:
- sbt assembly
artifacts:
paths:
- target/scala-2.12/app.jar
expire_in: 60 min
.build-image:
stage: publish
image: docker:stable
services:
- docker:dind
script:
- wget https://kakadusoftware.com/wp-content/uploads/2020/06/KDU805_Demo_Apps_for_Linux-x86-64_200602.zip
- unzip KDU805_Demo_Apps_for_Linux-x86-64_200602.zip && cd KDU805_Demo_Apps_for_Linux-x86-64_200602/ && mv kdu_compress libkdu_v80R.so ../ && cd ..
- docker login -u "$REGISTRY_USER" -p "$REGISTRY_PASSWORD" "$REGISTRY"
- docker build --pull -t "$IMAGE_TAG" .
- docker push "$IMAGE_TAG"
- docker logout
cache:
paths: []
tagged-image:
extends: .build-image
variables:
IMAGE_TAG: "$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG"
REGISTRY_PASSWORD: "$CI_REGISTRY_PASSWORD"
REGISTRY_USER: "$CI_REGISTRY_USER"
REGISTRY: "$CI_REGISTRY"
only:
- tags
master-branch-image:
extends: .build-image
variables:
IMAGE_TAG: "$CI_REGISTRY_IMAGE:latest"
REGISTRY_PASSWORD: "$CI_REGISTRY_PASSWORD"
REGISTRY_USER: "$CI_REGISTRY_USER"
REGISTRY: "$CI_REGISTRY"
only:
- master
feature-branch-image:
extends: .build-image
variables:
IMAGE_TAG: "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
REGISTRY_PASSWORD: "$CI_REGISTRY_PASSWORD"
REGISTRY_USER: "$CI_REGISTRY_USER"
REGISTRY: "$CI_REGISTRY"
except:
- master
- tags
- "sbt-cache/target"
\ No newline at end of file
apiVersion: apps/v1
kind: Deployment
metadata:
name: iiif-manifest-ingester
name: pp-iiif-manifest-ingester-v2
namespace: memobase
labels:
app: iiif-manifest-ingester-app
app: pp-iiif-manifest-ingester-v2-app
spec:
selector:
matchLabels:
app: iiif-manifest-ingester-app
app: iiif-manifest-ingester-v2-app
replicas: 1
template:
metadata:
labels:
app: iiif-manifest-ingester-app
app: iiif-manifest-ingester-v2-app
tier: web
spec:
containers:
......@@ -31,7 +31,7 @@ spec:
memory: "1Gi"
env:
- name: MARIADB_HOST
value: "jdbc:mariadb://mb-db1.memobase.unibas.ch:3306/medienserver"
value: "jdbc:mariadb://mb-db1.memobase.unibas.ch:3306/medienserver_test"
- name: MARIADB_PASSWORD
valueFrom:
secretKeyRef:
......@@ -51,6 +51,4 @@ spec:
value: iiif-manifests-v2
- name: TOPIC_PROCESS
value: postprocessing-reporting
restartPolicy: Always
apiVersion: apps/v1
kind: Deployment
metadata:
name: iiif-manifest-ingester
name: pp-iiif-manifest-ingester-v3
namespace: memobase
labels:
app: iiif-manifest-ingester-app
app: pp-iiif-manifest-ingester-v3-app
spec:
selector:
matchLabels:
app: iiif-manifest-ingester-app
app: pp-iiif-manifest-ingester-v3-app
replicas: 1
template:
metadata:
labels:
app: iiif-manifest-ingester-app
app: pp-iiif-manifest-ingester-v3-app
tier: web
spec:
containers:
- name: iiif-manifest-ingester-container
- name: pp-iiif-manifest-ingester-container-v3
image: cr.gitlab.switch.ch/memoriav/memobase-2020/services/postprocessing/iiif-manifest-ingester:latest
imagePullPolicy: Always
command: ["java"]
args: ["-Xms128m", "-Xmx1g", "-jar", "/app/app.jar"]
command: [ "java" ]
args: [ "-Xms128m", "-Xmx1g", "-jar", "/app/app.jar" ]
resources:
requests:
cpu: "0.2"
......@@ -31,7 +31,7 @@ spec:
memory: "1Gi"
env:
- name: MARIADB_HOST
value: "jdbc:mariadb://mb-db1.memobase.unibas.ch:3306/medienserver"
value: "jdbc:mariadb://mb-db1.memobase.unibas.ch:3306/medienserver_test"
- name: MARIADB_PASSWORD
valueFrom:
secretKeyRef:
......@@ -51,6 +51,4 @@ spec:
value: iiif-manifests-v3
- name: TOPIC_PROCESS
value: postprocessing-reporting
restartPolicy: Always
<scalastyle>
<name>Scalastyle standard configuration</name>
<check level="warning" class="org.scalastyle.file.FileTabChecker" enabled="true"></check>
<check level="warning" class="org.scalastyle.file.FileLengthChecker" enabled="true">
<parameters>
<parameter name="maxFileLength"><![CDATA[800]]></parameter>
</parameters>
</check>
<check level="warning" class="org.scalastyle.file.HeaderMatchesChecker" enabled="true">
<parameters>
<parameter name="header"><![CDATA[/*
* IIIF Manifest Ingester
* Writes IIIF manifests to database
* Copyright (C) 2020 Memoriav
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/]]></parameter>
</parameters>
</check>
<check level="warning" class="org.scalastyle.scalariform.SpacesAfterPlusChecker" enabled="true"></check>
<check level="warning" class="org.scalastyle.file.WhitespaceEndOfLineChecker" enabled="true"></check>
<check level="warning" class="org.scalastyle.scalariform.SpacesBeforePlusChecker" enabled="true"></check>
<check level="warning" class="org.scalastyle.file.FileLineLengthChecker" enabled="true">
<parameters>
<parameter name="maxLineLength"><![CDATA[160]]></parameter>
<parameter name="tabSize"><![CDATA[4]]></parameter>
</parameters>
</check>
<check level="warning" class="org.scalastyle.scalariform.ClassNamesChecker" enabled="true">
<parameters>
<parameter name="regex"><![CDATA[[A-Z][A-Za-z]*]]></parameter>
</parameters>
</check>
<check level="warning" class="org.scalastyle.scalariform.ObjectNamesChecker" enabled="true">
<parameters>
<parameter name="regex"><![CDATA[[A-Z][A-Za-z]*]]></parameter>
</parameters>
</check>
<check level="warning" class="org.scalastyle.scalariform.PackageObjectNamesChecker" enabled="true">
<parameters>
<parameter name="regex"><![CDATA[^[a-z][A-Za-z]*$]]></parameter>
</parameters>
</check>
<check level="warning" class="org.scalastyle.scalariform.EqualsHashCodeChecker" enabled="true"></check>
<check level="warning" class="org.scalastyle.scalariform.IllegalImportsChecker" enabled="true">
<parameters>
<parameter name="illegalImports"><![CDATA[sun._,java.awt._]]></parameter>
</parameters>
</check>
<check level="warning" class="org.scalastyle.scalariform.ParameterNumberChecker" enabled="true">
<parameters>
<parameter name="maxParameters"><![CDATA[8]]></parameter>
</parameters>
</check>
<check level="warning" class="org.scalastyle.scalariform.MagicNumberChecker" enabled="true">
<parameters>
<parameter name="ignore"><![CDATA[-1,0,1,2,3]]></parameter>
</parameters>
</check>
<check level="warning" class="org.scalastyle.scalariform.NoWhitespaceBeforeLeftBracketChecker" enabled="true"></check>
<check level="warning" class="org.scalastyle.scalariform.NoWhitespaceAfterLeftBracketChecker" enabled="true"></check>
<check level="warning" class="org.scalastyle.scalariform.ReturnChecker" enabled="true"></check>
<check level="warning" class="org.scalastyle.scalariform.NullChecker" enabled="true"></check>
<check level="warning" class="org.scalastyle.scalariform.NoCloneChecker" enabled="true"></check>
<check level="warning" class="org.scalastyle.scalariform.NoFinalizeChecker" enabled="true"></check>
<check level="warning" class="org.scalastyle.scalariform.CovariantEqualsChecker" enabled="true"></check>
<check level="warning" class="org.scalastyle.scalariform.StructuralTypeChecker" enabled="true"></check>
<check level="warning" class="org.scalastyle.file.RegexChecker" enabled="true">
<parameters>
<parameter name="regex"><![CDATA[println]]></parameter>
</parameters>
</check>
<check level="warning" class="org.scalastyle.scalariform.NumberOfTypesChecker" enabled="true">
<parameters>
<parameter name="maxTypes"><![CDATA[30]]></parameter>
</parameters>
</check>
<check level="warning" class="org.scalastyle.scalariform.CyclomaticComplexityChecker" enabled="true">
<parameters>
<parameter name="maximum"><![CDATA[10]]></parameter>
</parameters>
</check>
<check level="warning" class="org.scalastyle.scalariform.UppercaseLChecker" enabled="true"></check>
<check level="warning" class="org.scalastyle.scalariform.SimplifyBooleanExpressionChecker" enabled="true"></check>
<check level="warning" class="org.scalastyle.scalariform.IfBraceChecker" enabled="true">
<parameters>
<parameter name="singleLineAllowed"><![CDATA[true]]></parameter>
<parameter name="doubleLineAllowed"><![CDATA[false]]></parameter>
</parameters>
</check>
<check level="warning" class="org.scalastyle.scalariform.MethodLengthChecker" enabled="true">
<parameters>
<parameter name="maxLength"><![CDATA[50]]></parameter>
</parameters>
</check>
<check level="warning" class="org.scalastyle.scalariform.MethodNamesChecker" enabled="true">
<parameters>
<parameter name="regex"><![CDATA[^[a-z][A-Za-z0-9]*$]]></parameter>
</parameters>
</check>
<check level="warning" class="org.scalastyle.scalariform.NumberOfMethodsInTypeChecker" enabled="true">
<parameters>
<parameter name="maxMethods"><![CDATA[30]]></parameter>
</parameters>
</check>
<check level="warning" class="org.scalastyle.scalariform.PublicMethodsHaveTypeChecker" enabled="true"></check>
<check level="warning" class="org.scalastyle.file.NewLineAtEofChecker" enabled="true"></check>
<check level="warning" class="org.scalastyle.file.NoNewLineAtEofChecker" enabled="false"></check>
</scalastyle>
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment