Docker compose in jenkins

master
Araozu 2024-05-06 13:57:49 -05:00
parent 8f9f0d8c5d
commit 7aa144369a
2 changed files with 10 additions and 6 deletions

14
Jenkinsfile vendored
View File

@ -1,19 +1,21 @@
pipeline { pipeline {
agent { agent any
docker {
image "gradle:7.6.4-jdk11"
}
}
stages { stages {
stage('Build FAT JAR') { stage('Build FAT JAR') {
agent {
docker {
image "gradle:7.6.4-jdk11"
reuseNode true
}
}
steps { steps {
sh 'gradle shadowJar' sh 'gradle shadowJar'
} }
} }
stage("Deploy jar") { stage("Deploy jar") {
steps { steps {
sh "echo ':D (need to spin up container)'" sh "docker compose up -d"
} }
} }
} }

View File

@ -1,5 +1,7 @@
services: services:
web: web:
container_name: rimajon-be
restart: on-failure
build: . build: .
ports: ports:
- "9124:8080" - "9124:8080"