2022-11-09 10:08:13 +04:00
|
|
|
// node {
|
|
|
|
// def app
|
|
|
|
//
|
|
|
|
// stage('Clone repository') {
|
|
|
|
// checkout scm
|
|
|
|
// }
|
|
|
|
//
|
|
|
|
// stage('Build image') {
|
|
|
|
// app = docker.build("romanov73/is:ng-tracker-container-11")
|
|
|
|
// }
|
|
|
|
//
|
|
|
|
// stage('Test image') {
|
|
|
|
// sh ./gradlew bootRun -Dng-tracker.check-run=true
|
|
|
|
// app.inside {
|
|
|
|
// sh 'echo "Tests passed"'
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
//
|
|
|
|
// pipeline {
|
|
|
|
// agent none stages {
|
|
|
|
// stage('Maven Install') {
|
|
|
|
// agent {
|
|
|
|
// docker {
|
|
|
|
// image 'romanov73/is:ng-tracker-container-11'
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// steps {
|
|
|
|
// sh 'sh ./gradlew bootRun -Dng-tracker.check-run=true'
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// stage('Docker Build') {
|
|
|
|
// agent any
|
|
|
|
// steps {
|
|
|
|
// sh 'docker build -t shanem/spring-petclinic:latest .'
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// }
|
2022-11-08 12:58:35 +04:00
|
|
|
|
2022-11-09 10:08:13 +04:00
|
|
|
pipeline {
|
|
|
|
environment {
|
|
|
|
imagename = "romanov73/is:ng-tracker-container-11"
|
|
|
|
registryCredential = ''
|
|
|
|
dockerImage = ''
|
2022-11-08 12:58:35 +04:00
|
|
|
}
|
2022-11-09 10:08:13 +04:00
|
|
|
agent any
|
|
|
|
stages {
|
|
|
|
stage('Cloning Git') {
|
|
|
|
steps {
|
|
|
|
git([url: 'https://git.athene.tech/romanov73/example-web.git', branch: 'master'])
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Building image') {
|
|
|
|
steps{
|
|
|
|
script {
|
|
|
|
dockerImage = docker.build imagename
|
|
|
|
}
|
|
|
|
}
|
2022-11-08 12:58:35 +04:00
|
|
|
}
|
|
|
|
}
|
2022-11-08 13:01:33 +04:00
|
|
|
}
|