Commit ea2951a0 authored by Julien Boubechtoula's avatar Julien Boubechtoula 🤞🏼

Improve CI/CD

 Use JRE as base image
 Add GitLab-CI
parent fb6b83a3
Pipeline #88225501 passed with stage
in 6 minutes and 33 seconds
image: docker:git
services:
- docker:dind
before_script:
- docker info
build_image:
script:
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.com/
- docker build -t registry.gitlab.com/kathra/kathra/kathra-services/kathra-usermanager/kathra-usermanager-java/kathra-usermanager-keycloak:latest .
- docker push registry.gitlab.com/kathra/kathra/kathra-services/kathra-usermanager/kathra-usermanager-java/kathra-usermanager-keycloak:latest
\ No newline at end of file
FROM openjdk:11-jdk-slim
EXPOSE 8080
FROM maven:3-jdk-11-slim AS build
COPY src /usr/src/app/src
COPY pom.xml /usr/src/app
RUN mvn -f /usr/src/app/pom.xml install
RUN mvn -f /usr/src/app/pom.xml dependency:copy-dependencies
FROM openjdk:11-jre-slim
COPY target/jar-dependencies/* /deployments/java/
COPY target/*.jar /deployments/java/
COPY --from=build /usr/src/app/target/jar-dependencies/* /deployments/java/
COPY --from=build /usr/src/app/target/*.jar /deployments/java/
EXPOSE 8080
ENTRYPOINT exec java $JAVA_OPTS -cp "/deployments/java/*" org.apache.camel.cdi.Main
\ No newline at end of file
ENTRYPOINT exec java $JAVA_OPTS -cp "/deployments/java/*" org.apache.camel.cdi.Main
......@@ -35,6 +35,17 @@
<version>1.0.0-RC-SNAPSHOT</version>
</parent>
<repositories>
<repository>
<id>oss-sonatype</id>
<name>oss-sonatype</name>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<build>
<plugins>
<plugin>
......
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