Derploy
This commit is contained in:
parent
dba69a6e01
commit
0750119fc6
|
@ -1,34 +1,22 @@
|
|||
#!/usr/bin/env groovy
|
||||
|
||||
parallel(jdk7: {
|
||||
node('docker') {
|
||||
docker.image('openjdk:7').inside {
|
||||
echo 'im building'
|
||||
sh 'echo "HELLO" > artifact.txt'
|
||||
stash name: 'thething', includes: 'artifact.txt'
|
||||
}
|
||||
}
|
||||
},
|
||||
jdk8: {
|
||||
node('docker') {
|
||||
docker.image('openjdk:8').inside {
|
||||
echo 'im building on 8'
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
node('docker') {
|
||||
def container
|
||||
stage('Build') {
|
||||
checkout scm
|
||||
container = docker.build('clusterhq:dameetup')
|
||||
}
|
||||
|
||||
stage('Test') {
|
||||
docker.image('redis').withRun { container ->
|
||||
docker.image('maven').inside("--link ${container.id}:redis") {
|
||||
unstash 'thething'
|
||||
sh 'cat artifact.txt'
|
||||
sh 'ls -lah'
|
||||
}
|
||||
container.withRun {
|
||||
sh 'curl http://localhost'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Deploy') {
|
||||
docker.withRegistry {
|
||||
container.push()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue