Commit b7623308 authored by carignani's avatar carignani
Browse files

environment and script directives

parent 5cf75cb1
Loading
Loading
Loading
Loading
Loading
+13 −5
Original line number Diff line number Diff line
@@ -8,7 +8,9 @@ pipeline {
     
	agent any

	def resolveSucceded = false
	environment {
		def resolveSucceded = "false"
	}
	
	stages {
    	stage('Resolve') {
@@ -39,7 +41,9 @@ pipeline {
                    ]
                }
				updateGitlabCommitStatus name: 'Resolve', state: 'success'
				resolveSucceded = true
				script {
					env.resolveSucceded = "true"
				}
            }
		}
		stage('Validate') {
@@ -59,9 +63,13 @@ pipeline {
	
    post {
		failure {
			if (!resolveSucceded) {
			script {
				if (env.resolveSucceded == "false") {
					updateGitlabCommitStatus name: 'Resolve', state: 'failed'
				}
			}

			
			updateGitlabCommitStatus name: 'Validate', state: 'failed'
			mail to: 'cti_support@etsi.org',
				subject: "Failed Pipeline: ${currentBuild.fullDisplayName}",