Skip to content

Commit

Permalink
Jenkinsfile updated to v4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
anapolg committed Sep 13, 2018
1 parent b2a2426 commit 0ce7c3d
Showing 1 changed file with 5 additions and 19 deletions.
24 changes: 5 additions & 19 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,39 +5,25 @@ pipeline {
stage('Build Docker image') {
steps {
echo 'Building docker image...'
sh 'docker build --no-cache -f ./Dockerfile -t registry.sonata-nfv.eu:5000/tng-portal .'
sh 'docker build --no-cache -f ./Dockerfile -t registry.sonata-nfv.eu:5000/tng-portal:v4.0 .'
}
}
stage('Publishing') {
steps {
echo 'Publishing docker image....'
sh 'docker push registry.sonata-nfv.eu:5000/tng-portal'
sh 'docker push registry.sonata-nfv.eu:5000/tng-portal:v4.0'
}
}
stage('Deploying in pre-int') {
stage('Deploying') {
steps {
echo 'Deploying in pre-integration....'
sh 'rm -rf tng-devops || true'
sh 'git clone https://github.com/sonata-nfv/tng-devops.git'
dir(path: 'tng-devops') {
sh 'ansible-playbook roles/sp.yml -i environments -e "target=pre-int-sp component=portal"'
sh 'ansible-playbook roles/vnv.yml -i environments -e "target=pre-int-vnv component=portal"'
sh 'ansible-playbook roles/sp.yml -i environments -e "target=sta-sp-v4.0 component=portal"'
sh 'ansible-playbook roles/vnv.yml -i environments -e "target=sta-vnv-v4.0 component=portal"'
}
}
}
stage('Deployment in Integration') {
when {
branch 'master'
}
steps {
sh 'docker tag registry.sonata-nfv.eu:5000/tng-portal:latest registry.sonata-nfv.eu:5000/tng-portal:int'
sh 'docker push registry.sonata-nfv.eu:5000/tng-portal:int'
sh 'rm -rf tng-devops || true'
sh 'git clone https://github.com/sonata-nfv/tng-devops.git'
dir(path: 'tng-devops') {
sh 'ansible-playbook roles/sp.yml -i environments -e "target=int-sp component=portal"'
}
}
}
}
}

0 comments on commit 0ce7c3d

Please sign in to comment.