From 944f0ccac75a077384584e2e00bbe223a04b83ca Mon Sep 17 00:00:00 2001 From: dawncoll Date: Mon, 24 Jun 2024 17:41:45 +0200 Subject: [PATCH] Prova marraneta posant codi infraestructura en codi app --- Dockerfile | 3 +++ Jenkinsfile | 16 ++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 Dockerfile create mode 100644 Jenkinsfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..525571bad --- /dev/null +++ b/Dockerfile @@ -0,0 +1,3 @@ +FROM anapsix/alpine-java +COPY /target/spring-petclinic-1.5.1.jar /home/spring-petclinic-1.5.1.jar +CMD ["java","-jar","/home/spring-petclinic-1.5.1.jar"] \ No newline at end of file diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 000000000..a8d3131a3 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,16 @@ +#!groovy +pipeline { + agent none + stages { + stage('Maven Install') { + agent { + docker { + image 'maven:3.5.0' + } + } + steps { + sh 'mvn clean install' + } + } + } + } \ No newline at end of file