Skip to content
Snippets Groups Projects
Commit 26ba723f authored by Sonia Zorba's avatar Sonia Zorba
Browse files

Dockerization

parent 7d5288a6
No related branches found
No related tags found
No related merge requests found
Pipeline #758 passed
stages:
- build
- generate-test-env
- test
- dockerize
......@@ -7,6 +8,20 @@ variables:
# to avoid "fatal: git fetch-pack: expected shallow list"
GIT_STRATEGY: clone
build:
stage: build
tags:
- docker
only:
refs:
- ci-test
script:
- mvn clean package -DskipTests -DfinalName=vospace
artifacts:
paths:
- target/vospace.jar
expire_in: 7 days
pre_test:
stage: generate-test-env
tags:
......@@ -37,3 +52,15 @@ test:
coverage: '/coverage=\d+\.\d+/'
only:
- ci-test
dockerize:
stage: dockerize
tags:
- shell
only:
refs:
- ci-test
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build -t $CI_REGISTRY_IMAGE .
- docker push $CI_REGISTRY_IMAGE
FROM openjdk:14-jdk-alpine
ARG JAR_FILE=target/vospace.jar
COPY ${JAR_FILE} vospace.jar
ENTRYPOINT ["java","-jar","/vospace.jar"]
......@@ -18,6 +18,7 @@
<java.version>11</java.version>
<!-- File catalog repository directory -->
<init_database_scripts_path>../../../vospace-file-catalog</init_database_scripts_path>
<finalName>${project.artifactId}-${project.version}</finalName>
</properties>
<dependencies>
......@@ -114,6 +115,7 @@
</repositories>
<build>
<finalName>${finalName}</finalName>
<testResources>
<testResource>
<directory>src/test/resources</directory>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment