Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
checkit_tiff_plugin4rosetta
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Digital Preservation
checkit_tiff_plugin4rosetta
Commits
ac1191f1
Commit
ac1191f1
authored
2 years ago
by
Andreas Romeyke
Browse files
Options
Downloads
Patches
Plain Diff
- added CI/CD support
parent
30a9e06e
No related branches found
No related tags found
No related merge requests found
Pipeline
#3143
passed
2 years ago
Stage: build
Stage: test
Stage: packaging
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+89
-0
89 additions, 0 deletions
.gitlab-ci.yml
Makefile
+9
-9
9 additions, 9 deletions
Makefile
gitlab-ci/Dockerfile
+26
-0
26 additions, 0 deletions
gitlab-ci/Dockerfile
with
124 additions
and
9 deletions
.gitlab-ci.yml
0 → 100644
+
89
−
0
View file @
ac1191f1
# This file is a template, and might need editing before it works on your project.
# To contribute improvements to CI/CD templates, please follow the Development guide at:
# https://docs.gitlab.com/ee/development/cicd/templates.html
# This specific template is located at:
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Getting-Started.gitlab-ci.yml
# This is a sample GitLab CI/CD configuration file that should run without any modifications.
# It demonstrates a basic 3 stage CI/CD pipeline. Instead of real tests or scripts,
# it uses echo commands to simulate the pipeline execution.
#
# A pipeline is composed of independent jobs that run scripts, grouped into stages.
# Stages run in sequential order, but jobs within stages run in parallel.
#
# For more information, see: https://docs.gitlab.com/ee/ci/yaml/index.html#stages
stages
:
# List of stages for jobs, and their order of execution
-
build
-
test
-
packaging
variables
:
EXLIBRIS_SDK_DIR
:
"
/exlibris"
ROSETTASDK
:
"
${EXLIBRIS_SDK_DIR}/7.3/lib/"
IMAGE_TARGET
:
"
$CI_REGISTRY_IMAGE/bullseye_subapp"
FF_USE_FASTZIP
:
"
true"
# These can be specified per job or per pipeline
ARTIFACT_COMPRESSION_LEVEL
:
"
fast"
CACHE_COMPRESSION_LEVEL
:
"
fast"
# CI_DEBUG_TRACE: "true"
default
:
image
:
# use this image for all later stages that happen after the build stage
name
:
"
${IMAGE_TARGET}:latest"
before_script
:
# These steps are run before EACH job.
-
export ROSETTASDK="${ROSETTASDK}"
build-env-job
:
# This job runs in the build stage, which runs first.
stage
:
build
timeout
:
30m
tags
:
-
"
docker"
image
:
# Use Kaniko base image to build a Docker image to use as the base image for later jobs.
name
:
gcr.io/kaniko-project/executor:debug
entrypoint
:
[
"
"
]
# Do not run the before_script tasks here, they wouldn't be included in the Docker image. Instead, provide an empty list of tasks.
before_script
:
[]
# docu: https://docs.gitlab.com/ee/ci/docker/using_kaniko.html, this is basically copy-pasted from there
script
:
-
mkdir -p /kaniko/.docker
-
echo "{\"auths\":{\"$CI_REGISTRY\":{\"auth\":\"$(printf "%s:%s" "$CI_REGISTRY_USER" "$CI_REGISTRY_PASSWORD" | base64 | tr -d '\n')\"},\"$(printf "%s" "$CI_DEPENDENCY_PROXY_SERVER" | cut -d':' -f1)\":{\"auth\":\"$(printf "%s:%s" "$CI_DEPENDENCY_PROXY_USER" "$CI_DEPENDENCY_PROXY_PASSWORD" | base64 | tr -d '\n')\"}}}" > /kaniko/.docker/config.json
# In this task, Kaniko executor is called to build the Image based on the Dockerfile provided with "--dockerfile".
-
echo "CI_PROJECT_DIR=${CI_PROJECT_DIR}"
-
>-
/kaniko/executor
--context "${CI_PROJECT_DIR}"
--dockerfile "${CI_PROJECT_DIR}/gitlab-ci/Dockerfile"
--destination "${IMAGE_TARGET}:latest"
--build-arg "GITDIR=${CI_PROJECT_DIR}"
--cache=true
--cache-repo=${CI_REGISTRY_IMAGE}
--cache-copy-layers=true
--snapshotMode=redo
--use-new-run
--ignore-var-run
test-job
:
stage
:
test
timeout
:
3h
tags
:
-
"
docker"
script
:
-
ls -lha /exlibris/
-
ROSETTASDK=$ROSETTASDK make -e check_prerequisites
-
ROSETTASDK=$ROSETTASDK make -e test
packaging-job
:
stage
:
packaging
timeout
:
3h
tags
:
-
"
docker"
script
:
-
ROSETTASDK=$ROSETTASDK make -e
artifacts
:
paths
:
-
SLUBRetroMonographieTIFFFormatValidationPlugin.jar
This diff is collapsed.
Click to expand it.
Makefile
+
9
−
9
View file @
ac1191f1
...
@@ -7,26 +7,26 @@ JAVAPATH=/usr/lib/jvm/java-1.17.0-openjdk-*/bin/
...
@@ -7,26 +7,26 @@ JAVAPATH=/usr/lib/jvm/java-1.17.0-openjdk-*/bin/
JAVARELEASE
=
17
JAVARELEASE
=
17
# Verwendete Rosetta-Version
# Verwendete Rosetta-Version
ROSETTAVERSION
=
7.3.0
ROSETTAVERSION
:
=
7.3.0
# Pfad zum Rosetta-SDK
# Pfad zum Rosetta-SDK
ROSETTASDK
=
/exlibris/dps/d4_1/system.dir/dps-sdk-
${
ROSETTAVERSION
}
/lib/
ROSETTASDK
=
/exlibris/dps/d4_1/system.dir/dps-sdk-
${
ROSETTAVERSION
}
/lib/
# Pfad zum Rosetta-SDK, Deposit-Module
# Pfad zum Rosetta-SDK, Deposit-Module
ROSETTASDKDEPOSIT
=
${
ROSETTASDK
}
/../dps-sdk-projects/dps-sdk-deposit/lib
ROSETTASDKDEPOSIT
:
=
${
ROSETTASDK
}
/../dps-sdk-projects/dps-sdk-deposit/lib
ROSETTASDKPLUGINS
=
${
ROSETTASDK
}
/../../bundled_plugins/
ROSETTASDKPLUGINS
:
=
${
ROSETTASDK
}
/../../bundled_plugins/
# classpath
# classpath
JUNITCLASSPATH
=
/usr/share/java/junit4.jar
JUNITCLASSPATH
:
=
/usr/share/java/junit4.jar
#SOURCESCLASSPATH=org/slub/rosetta/dps/repository/plugin/storage/nfs
#SOURCESCLASSPATH=org/slub/rosetta/dps/repository/plugin/storage/nfs
CLASSPATH
=
${
ROSETTASDKDEPOSIT
}
/dps-sdk-
${
ROSETTAVERSION
}
.jar
CLASSPATH
:
=
${
ROSETTASDKDEPOSIT
}
/dps-sdk-
${
ROSETTAVERSION
}
.jar
#BUILDPATH=$(CLASSPATH)
#BUILDPATH=$(CLASSPATH)
# sources
# sources
SOURCES
=
java/org/slub/rosetta/dps/repository/plugin/SLUBRetroMonographieTIFFFormatValidationPlugin.java
SOURCES
:
=
java/org/slub/rosetta/dps/repository/plugin/SLUBRetroMonographieTIFFFormatValidationPlugin.java
OBJS
=
$(
SOURCES:.java
=
.class
)
OBJS
:
=
$(
SOURCES:.java
=
.class
)
JAR
=
SLUBRetroMonographieTIFFFormatValidationPlugin.jar
JAR
:
=
SLUBRetroMonographieTIFFFormatValidationPlugin.jar
BUILD
=
build/
BUILD
:
=
build/
all
:
$(BUILD) $(JAR)
all
:
$(BUILD) $(JAR)
...
...
This diff is collapsed.
Click to expand it.
gitlab-ci/Dockerfile
0 → 100644
+
26
−
0
View file @
ac1191f1
FROM
git.slub-dresden.de/debian-packaging/dependency_proxy/containers/debian:bullseye-slim
ARG
GITDIR
ENV
DEBIAN_FRONTEND=noninteractive
ENV
EXLIBRIS_REPO=https://github.com/ExLibrisGroup/Rosetta.dps-sdk-projects.git
ENV
EXLIBRIS_REPODIR=Rosetta.dps-sdk-projects
ENV
EXLIBRIS_PATH=/exlibris
RUN
apt-get update
;
\
apt-get
install
-y
--no-install-recommends
gnupg wget
;
\
wget
-O
- http://sdvdebianrepo.slub-dresden.de/deb-repository/pub.gpg.key | apt-key add -
;
\
echo
"deb http://sdvdebianrepo.slub-dresden.de/deb-repository bullseye main"
>
/etc/apt/sources.list.d/slub.list
;
RUN
apt-get update
;
\
apt-get
-y
upgrade
;
\
apt-get
install
-y
\
apt-file
\
apt-utils
\
make
\
openjdk-17-jdk
\
junit4
\
git
\
;
RUN
apt-file update
;
RUN
git clone https://github.com/ExLibrisGroup/Rosetta.dps-sdk-projects.git
RUN
ln
-s
${
EXLIBRIS_REPODIR
}
${
EXLIBRIS_PATH
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment