update x notificare Gitlab...

This commit is contained in:
Samuele E. Locatelli
2020-01-09 15:00:53 +01:00
parent 08ccb1ccfb
commit 6aae8a2d73
Vendored
+17 -1
View File
@@ -17,7 +17,7 @@ pipeline {
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
script {
withEnv(['NEXT_BUILD_NUMBER=162']) {
withEnv(['NEXT_BUILD_NUMBER=163']) {
// env.versionNumber = VersionNumber(versionNumberString : '0.7.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true)
env.versionNumber = VersionNumber(versionNumberString : '0.7.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
env.APP_NAME = 'NKC'
@@ -158,12 +158,15 @@ pipeline {
post {
success {
sendSlack("Successful", "good")
sendGitlab("Successful")
}
failure {
sendSlack("Failed", "danger")
sendGitlab("Failed")
}
unstable {
sendSlack("Unstable", "warning")
sendGitlab("Unstable")
}
}
}
@@ -224,6 +227,19 @@ def sendSlack(status, colorCode) {
"Modifiche:\n " + getChangeString() + "\n\n Verifica build: <${env.BUILD_URL}|Apri>" + "\n"
)
}
// Funzione x invio slack
def sendGitlab(status) {
gitlabCommitStatus(
builds: status,
[[connection: gitLabConnection('Gitlab'),
projectId: '1',
revisionHash: '']]
){
// some block
}
}
// funzione x fix pacchetti nuget da NOSTRO repo Nexus con proxy
def fixNuget(solutionFile) {
// bat "e:\\nuget setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source http://nexus.steamware.net/repository/nuget-group"