add jenkinsfile
This commit is contained in:
parent
a8ba104dd4
commit
3315bd4afa
29
Jenkinsfile
vendored
Normal file
29
Jenkinsfile
vendored
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
node {
|
||||||
|
def app
|
||||||
|
|
||||||
|
stage('Clone repository') {
|
||||||
|
/* Let's make sure we have the repository cloned to our workspace */
|
||||||
|
|
||||||
|
checkout scm
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Build image') {
|
||||||
|
app = docker.build("romanov73/is:ng-tracker-container-11")
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Test image') {
|
||||||
|
/* Ideally, we would run a test framework against our image.
|
||||||
|
* For this example, we're using a Volkswagen-type approach ;-) */
|
||||||
|
sh ./gradlew bootRun -Dng-tracker.check-run=true
|
||||||
|
app.inside {
|
||||||
|
sh 'echo "Tests passed"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*stage('Push image') {
|
||||||
|
docker.withRegistry('https://registry.hub.docker.com', 'docker-hub-credentials') {
|
||||||
|
app.push("${env.BUILD_NUMBER}")
|
||||||
|
app.push("latest")
|
||||||
|
}
|
||||||
|
}*/
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user