Docker compose in jenkins
This commit is contained in:
parent
8f9f0d8c5d
commit
7aa144369a
14
Jenkinsfile
vendored
14
Jenkinsfile
vendored
@ -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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
services:
|
services:
|
||||||
web:
|
web:
|
||||||
|
container_name: rimajon-be
|
||||||
|
restart: on-failure
|
||||||
build: .
|
build: .
|
||||||
ports:
|
ports:
|
||||||
- "9124:8080"
|
- "9124:8080"
|
||||||
|
Loading…
Reference in New Issue
Block a user