class Constants {
    static final String RELEASE_BRANCH = 'release'

    static final String QA_BUILD = 'Debug'
    static final String RELEASE_BUILD = 'Release'

    static final String INTERNAL_TRACK = 'internal'
    static final String RELEASE_TRACK = 'release'
}

def getBuildType() {
    switch (env.BRANCH_NAME) {
        case Constants.RELEASE_BRANCH:
            return Constants.RELEASE_BUILD
        default:
            return Constants.QA_BUILD
    }
}

def getTrackType() {
    switch (env.BRANCH_NAME) {
        case Constants.RELEASE_BRANCH:
            return Constants.RELEASE_TRACK
        default:
            return Constants.INTERNAL_TRACK
    }
}

def isDeployCandidate() {
    return ("${env.BRANCH_NAME}" =~ /(${RELEASE_BRANCH}|main|next)/)
}

pipeline {
    agent any

    environment {
        appName = 'Aperture'

        SIGN_STORE = credentials('sign_store_shift_releasekey')
        SIGN_STORE_PASS = credentials('sign_store_pass_shift_releasekey')
        SIGN_KEY_ALIAS = credentials('sign_key_alias_shift_releasekey')
        SIGN_KEY_PASS = credentials('sign_key_pass_shift_releasekey')
    }

    stages {
        stage('Build') {
            steps {
                echo "Building '$appName'"
                script {
                    VARIANT = getBuildType()
                    sh('./gradlew \
                        -Psign_store="$SIGN_STORE" \
                        -Psign_store_pass="$SIGN_STORE_PASS" \
                        -Psign_key_alias="$SIGN_KEY_ALIAS" \
                        -Psign_key_pass="$SIGN_KEY_PASS" '
                        + "assemble$VARIANT")

                    archiveArtifacts \
                        artifacts: 'app/build/outputs/apk/**/*.apk, app/build/outputs/apk/**/*.json', \
                        fingerprint: true, \
                        followSymlinks: false, \
                        onlyIfSuccessful: true
                }
                cleanWs()
            }
        }
    }

    post {
        success {
            mattermostSend \
                color: 'good', \
                message: "SUCCESS -> ${env.JOB_NAME} (#${env.BUILD_NUMBER})\n(<${env.BUILD_URL}|Open>)", \
                text: ':android: :bongo_blob: :blob_dance: :bongo_blob: :android:'
        }
        failure {
            mattermostSend \
                color: 'danger', \
                message: "FAILURE -> ${env.JOB_NAME} (#${env.BUILD_NUMBER})\n(<${env.BUILD_URL}|Open>)", \
                text: ':facepalm: :sarcastic: :dull_: :sarcastic: :facepalm:'
        }
    }
}
