-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
38 lines (34 loc) · 1.14 KB
/
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
32
33
34
35
36
37
38
pipeline {
agent none
stages {
stage('Image creation & image push') {
agent any
steps {
echo 'Creating the VDC image...'
sh "docker build -t \"ditas/ideko-use-case\" -f Dockerfile ."
echo "Done"
echo 'Retrieving Docker Hub password from /opt/ditas-docker-hub.passwd...'
script {
password = readFile '/opt/ditas-docker-hub.passwd'
}
echo "Done"
echo 'Login to Docker Hub as ditasgeneric...'
sh "docker login -u ditasgeneric -p ${password}"
echo "Done"
echo "Pushing the image ditas/ideko-use-case:latest..."
sh "docker push ditas/ideko-use-case:latest"
echo "Done "
}
}
stage('Image deploy') {
agent any
options {
skipDefaultCheckout true
}
steps {
// sh './jenkins/deploy/deploy-staging.sh'
echo "For the moment we don't deploy the VDC on Staging."
}
}
}
}