This repository was archived by the owner on Jan 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
37 lines (32 loc) · 1.51 KB
/
Jenkinsfile
File metadata and controls
37 lines (32 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
pipeline {
agent any
environment {
PROJECT_NAME = 'vertstorage'
JAR_NAME = 'vertstorage-1.0.1'
VERSION = '1.0.1'
}
stages {
stage('setup') {
steps {
git(url: "https://github.com/VertCodeDev/${env.PROJECT_NAME}.git", branch: env.BRANCH_NAME, credentialsId: 'github-app-vertcodedev')
}
}
stage('build') {
steps {
sh 'chmod +x gradlew'
sh './gradlew build'
}
}
stage('nexus-publish') {
steps {
nexusPublisher nexusInstanceId: '1', nexusRepositoryId: 'vertcodedev-public', packages: [[$class: 'MavenPackage', mavenAssetList: [[classifier: '', extension: '', filePath: "${env.WORKSPACE}/build/libs/${env.JAR_NAME}.jar"]], mavenCoordinate: [artifactId: "vertstorage", groupId: 'dev.vertcode', packaging: 'jar', version: env.VERSION]]]
}
}
}
post {
always {
discordSend description: "`${env.PROJECT_NAME}` build finished!\n\n__**Build Number**__\n${currentBuild.number}\n\n__**Link**__\n[Click Here](${env.BUILD_URL})", customUsername: "CI | VertCode Development", customAvatarUrl: "https://cdn.vertcodedevelopment.com/logo.png", thumbnail: "https://cdn.vertcodedevelopment.com/logo.png", result: currentBuild.currentResult, webhookURL: "https://canary.discord.com/api/webhooks/1034106603969982484/41HTtCnkDptcbBdRj5l-xzD5xEtFDcztW6aPRKr3BInTkJWM5CMhDPFBxgYLnzCqwSbK"
cleanWs()
}
}
}