-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathJenkinsfile
32 lines (29 loc) · 898 Bytes
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
pipeline {
agent any
stages {
stage('scm') {
steps {
echo 'It is scm stages'
git branch: 'main', url: 'https://github.com/MDMOQADDAS/RegistrationApp.git'
}
}
stage('build'){
steps{
sh 'docker build -t moqaddas/registrationapp:$app_version .'
}
}
stage('test'){
steps{
sh 'docker rm -f test || date'
sh "docker run -d --name test -t -p 80:80 moqaddas/registrationapp:$app_version"
sh "curl localhost | grep Registration"
}
}
stage("Centralized Container Registery"){
steps{
sh 'docker login https://docker.io -u $dockerUser -p $dockerpassword'
sh 'docker push moqaddas/registrationapp:$app_version'
}
}
}
}