Files
AkarinMC/Jenkinsfile
Joseph Robinson 03db17b2b0 Update Jenkinsfile
2020-05-16 14:34:32 -07:00

49 lines
1.1 KiB
Groovy

@Library('forge-shared-library') _
pipeline {
agent any
environment {
DISCORD_WEBHOOK_URL = credentials('3e8105ad-8e03-4550-bc66-a27438ec6fb3')
}
stages {
stage('Initialize') {
steps {
sh '''git fetch origin
git reset --hard origin/1.15.2
git submodule update --init --recursive'''
}
}
stage('Build') {
steps {
sh './akarin jar'
}
}
stage('Archive') {
steps {
archiveArtifacts(artifacts: 'target/*.jar', fingerprint: true)
}
}
stage('Report') {
steps {
discordSend(
description: "**Build:** [${currentBuild.id}](${env.BUILD_URL})\n**Status:** [${currentBuild.currentResult}](${env.BUILD_URL})\n\n**Changes:**```\n' + getChanges(currentBuild) + '\n```",
footer: "JosephWorks Jenkins Server",
link: env.BUILD_URL,
result: currentBuild.currentResult,
title: "${env.JOB_NAME} #${currentBuild.id}",
webhookURL: "$DISCORD_WEBHOOK_URL"
)
}
}
}
//post {
// always {
// cleanWs()
// }
// }
// }
}