diff --git a/Jenkinsfile b/Jenkinsfile index e16cea7..9cec035 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -97,6 +97,31 @@ pipeline { } } } + stage('Promoting release v5.0') { + when { + branch 'v5.0' + } + stages { + stage('Generating release') { + steps { + sh 'docker tag registry.sonata-nfv.eu:5000/tng-api-gtw:latest registry.sonata-nfv.eu:5000/tng-api-gtw:v5.0' + sh 'docker tag registry.sonata-nfv.eu:5000/tng-api-gtw:latest sonatanfv/tng-api-gtw:v5.0' + sh 'docker push registry.sonata-nfv.eu:5000/tng-api-gtw:v5.0' + sh 'docker push sonatanfv/tng-api-gtw:v5.0' + } + } + stage('Deploying in v5.0 servers') { + steps { + 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=sta-sp-v5-0 component=gatekeeper"' + sh 'ansible-playbook roles/vnv.yml -i environments -e "target=sta-vnv-v5-0 component=gatekeeper"' + } + } + } + } + } } post { success {