Docker compose in jenkins
This commit is contained in:
parent
8f9f0d8c5d
commit
7aa144369a
14
Jenkinsfile
vendored
14
Jenkinsfile
vendored
@ -1,19 +1,21 @@
|
||||
pipeline {
|
||||
agent {
|
||||
docker {
|
||||
image "gradle:7.6.4-jdk11"
|
||||
}
|
||||
}
|
||||
agent any
|
||||
|
||||
stages {
|
||||
stage('Build FAT JAR') {
|
||||
agent {
|
||||
docker {
|
||||
image "gradle:7.6.4-jdk11"
|
||||
reuseNode true
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'gradle shadowJar'
|
||||
}
|
||||
}
|
||||
stage("Deploy jar") {
|
||||
steps {
|
||||
sh "echo ':D (need to spin up container)'"
|
||||
sh "docker compose up -d"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,7 @@
|
||||
services:
|
||||
web:
|
||||
container_name: rimajon-be
|
||||
restart: on-failure
|
||||
build: .
|
||||
ports:
|
||||
- "9124:8080"
|
||||
|
Loading…
Reference in New Issue
Block a user