pipeline {
    agent any
    stages {
        stage('build') {
            when { branch 'develop' }
            steps {
                sh 'check_java.sh'
            }
            post {
                success {
                    sh "/usr/local/bin/workwechatctl -p ${env.JOB_NAME} -n 张金晓 -c 项目未检查出bug等问题，开始编译发布。"
                }
                failure {
                    sh "/usr/local/bin/workwechatctl -p ${env.JOB_NAME} -n 张金晓 -c 项目已检查出bug等问题，请登陆gitlab查看bug信息。"
                }
            }
        }
    }
}
