Modificato Jenkinsfile
All checks were successful
WMS - Android (New)/pipeline/head This commit looks good
All checks were successful
WMS - Android (New)/pipeline/head This commit looks good
This commit is contained in:
parent
6d62a7b10e
commit
552b82feda
@ -11,22 +11,47 @@ pipeline {
|
||||
environment {
|
||||
// ANDROID_HOME = "/usr/local/android/sdk" // Cambia in base al tuo sistema
|
||||
JAVA_HOME = tool 'JDK 17.0.6 x64' // Nome dello strumento configurato in Jenkins
|
||||
//GRADLE_HOME = tool 'Gradle 8.13' // Nome dello strumento configurato in Jenkins
|
||||
PATH = "${env.JAVA_HOME}/bin:${env.PATH}"
|
||||
}
|
||||
|
||||
stages {
|
||||
|
||||
// stage('Preparing project') {
|
||||
// steps {
|
||||
// powershell "(gc gradle.properties) -replace 'org.gradle.caching=true', 'org.gradle.caching=false' | Out-File -encoding ASCII gradle.properties"
|
||||
// powershell "(gc gradle.properties) -replace 'org.gradle.unsafe.configuration-cache=ON', 'org.gradle.unsafe.configuration-cache=OFF' | Out-File -encoding ASCII gradle.properties"
|
||||
// }
|
||||
// }
|
||||
|
||||
stage('Build') {
|
||||
steps {
|
||||
bat "./gradlew assembleRelease"
|
||||
archiveArtifacts artifacts: 'app/build/outputs/apk/release/', onlyIfSuccessful: true
|
||||
}
|
||||
}
|
||||
|
||||
stage('Publish') {
|
||||
steps {
|
||||
azureUpload allowAnonymousAccess: true, fileShareName: 'storage-ci', filesPath: 'app/build/outputs/apk/release/*', removePrefixPath: 'app/build/outputs/apk/release/', storageCredentialId: '83a86793-c1d6-4776-b20f-1ff652a57fee', storageType: 'filestorage', uploadArtifactsOnlyIfSuccessful: true, verbose: true, virtualPath: 'wms'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
post {
|
||||
success {
|
||||
script {
|
||||
bat "curl -k https://devservices.studioml.it/ems-api/updateWMSApp"
|
||||
bat "curl -k https://services.studioml.it/ems-api/updateWMSApp"
|
||||
if (env.GIT_BRANCH == "master" || env.GIT_BRANCH == "develop") {
|
||||
office365ConnectorSend adaptiveCards: true, color: '#008000', message: 'WMS è stato compilato con successo', status: 'SUCCESS', webhookUrl: 'https://prod-89.westeurope.logic.azure.com:443/workflows/260580715a9d4447a54dea861a865536/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=EMqPHohvE5o5IGj_gir_iQaAufR4r8ZJxlFx52jklSE'
|
||||
}
|
||||
}
|
||||
}
|
||||
unstable {
|
||||
script {
|
||||
if (env.GIT_BRANCH == "master" || env.GIT_BRANCH == "develop") {
|
||||
office365ConnectorSend adaptiveCards: true, color: '#FFDE21', message: 'WMS è INSTABILE', status: 'UNSTABLE', webhookUrl: 'https://prod-89.westeurope.logic.azure.com:443/workflows/260580715a9d4447a54dea861a865536/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=EMqPHohvE5o5IGj_gir_iQaAufR4r8ZJxlFx52jklSE'
|
||||
}
|
||||
}
|
||||
}
|
||||
failure {
|
||||
script {
|
||||
if (env.GIT_BRANCH == "master" || env.GIT_BRANCH == "develop") {
|
||||
office365ConnectorSend adaptiveCards: true, color: '#FF2C2C', message: 'Errore di compilazione su WMS', status: 'FAILURE', webhookUrl: 'https://prod-89.westeurope.logic.azure.com:443/workflows/260580715a9d4447a54dea861a865536/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=EMqPHohvE5o5IGj_gir_iQaAufR4r8ZJxlFx52jklSE'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user