example-web/Jenkinsfile

64 lines
1.4 KiB
Plaintext
Raw Normal View History

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 {
2022-11-09 10:43:53 +04:00
docker.image('romanov73/is:ng-tracker-container-11').inside {
2022-11-09 10:47:47 +04:00
sh "sh ./gradlew test"
2022-11-09 10:43:53 +04:00
}
2022-11-09 10:08:13 +04:00
}
}
2022-11-08 12:58:35 +04:00
}
}
2022-11-08 13:01:33 +04:00
}