I am very new to jenkins pipeline and groovy . Please ignore environment variable i will use it in future
Here i want to send start to slack and upon git pull if have to send success or failure based on project status. I am getting error at try for something
pipeline {
agent any
environment {
val = 1
}
stages {
stage('Started') {
steps{
slackSend(message: "STARTED")
}
}
try {
stage('SCM Checkout') {
steps {
git url:'https://github.com/Abhishek24094/dev.git'
}
}
}
catch(Exception e) {
slackSend(message: "Failure")
}
stage('finished') {
steps{
slackSend(message: "STARTED")
}
}
}
}