This commit is contained in:
2022-02-14 15:33:56 +09:00
parent eb14f1ae39
commit 2503172911

View File

@@ -0,0 +1,68 @@
pipeline {
agent any
stages {
stage('Prepare') {
agent any
steps {
checkout scm
}
post {
success {
echo 'prepare success'
}
always {
echo 'done prepare'
}
cleanup {
echo 'after all other post conditions'
}
}
}
stage('build gradle') {
steps {
sh './gradlew build'
sh 'ls -al ./build'
}
post {
success {
echo 'gradle build success'
}
failure {
echo 'gradle build failed'
}
}
}
stage('dockerizing'){
steps{
sh 'docker build . -t crypto/drop-the-bit'
}
}
stage('Deploy') {
steps {
sh 'docker run -d -p 40005:40005 --name crypto_drop-the-bit crypto/drop-the-bit'
}
post {
success {
echo 'success'
}
failure {
echo 'failed'
}
}
}
}
}