-
Notifications
You must be signed in to change notification settings - Fork 0
/
jenkinsfile_old.txt
38 lines (34 loc) · 1.09 KB
/
jenkinsfile_old.txt
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 { dockerfile true }
stages{
stage ('prep-clone') {
steps {
git url: "https://github.com/lavih/jenkins-python-server.git"
}
}
stage ('build&deploy') {
steps{
//docker.build
dockerfile {
filename 'dockerfile-server.txt'
//dir '.'
label 'python-server'
}
}
}
stage ('test'){
steps {
docker.image('alpine:python') //.withRun('-e "MYSQL_ROOT_PASSWORD=my-secret-pw" -p 3306:3306')
//docker.image('alpine:python').pull()
sh 'cat /etc/os-release'
}
}
stage ('artifact'){
steps {
docker.withRegistry('https://index.docker.io/v1/', 'dockerhub') {
docker.build("lavih/jenkins-python:latest", '.').push()
//withDockerRegistry(credentialsId: 'dockerhub', url: 'https://cloud.docker.com/u/lavih/repository/docker/lavih/nodejs-build')
}
}
}
}