Compare commits

...

7 Commits

Author SHA1 Message Date
Roberto Cirillo 5e84d57f91 Update Jenkinsfile
change email address to jenkinsbuilds@d4science.org
2024-11-28 12:25:26 +01:00
Roberto Cirillo 545ec46752 remove hardcoded dry-run 2024-11-11 11:16:06 +01:00
Roberto Cirillo 6a162840a4 hardcoded dryrun mode 2024-11-11 10:01:50 +01:00
Roberto Cirillo 4a89d6b448 Update README.md
fix readme
2024-11-07 10:01:16 +01:00
Roberto Cirillo d678d87ec8 fix checkup method exit condition 2024-11-05 15:06:20 +01:00
Roberto Cirillo 78904c0793 fix checkup method exit condition 2024-11-05 14:43:42 +01:00
Roberto Cirillo fea4741152 Merge pull request 'bug/28263' (#9) from bug/28263 into master
Reviewed-on: #9
2024-11-04 10:02:09 +01:00
2 changed files with 10 additions and 4 deletions

12
Jenkinsfile vendored
View File

@ -82,7 +82,7 @@ pipeline {
//URL to the YAML file. Used alternatively to RELEASE_JOB
RELEASE_URL= "${params.RELEASE_URL}"
// username of ReleaseManager. Used for limiting the preproduction deployments
RELEASE_MANAGER_USER='roberto.cirillo'
RELEASE_MANAGER_USER='giancarlo.panichi'
// name of Smartgears distribution group, defined in the yaml file ( only for release deployments)
DISTRIBUTION_CATEGORY='Distribution'
// name of Portlets group, defined in the yaml file ( only for release deployments)
@ -206,6 +206,9 @@ pipeline {
catchError(buildResult: 'UNSTABLE', stageResult: 'UNSTABLE') {
checkup("${params.TRIGGER_JOB}", "${params.TRIGGER_VERSION}", "${params.TRIGGER_HOST}");
}
if (currentBuild.result == "UNSTABLE") {
return;
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
deploy("${params.TRIGGER_JOB}", "${params.TRIGGER_VERSION}", "${params.TRIGGER_HOST}", "${params.TRIGGER_FOO}");
}
@ -264,14 +267,14 @@ pipeline {
echo 'The deploy pipeline worked!'
emailext attachLog: true,//attachmentsPattern: "**/${ACTION_DEPLOY_FILE}.csv",
to: 'roberto.cirillo@isti.cnr.it',
to: 'jenkinsbuilds@d4science.org',
subject: "[Jenkins-gCubeDeployer] Deploy report",
body: "${currentBuild.fullDisplayName}. Build time: ${currentBuild.durationString}. See ${env.BUILD_URL}. "
}
failure {
echo 'The deploy pipeline has failed'
emailext attachLog: true,
to: 'roberto.cirillo@isti.cnr.it',
to: 'jenkinsbuilds@d4science.org',
subject: "[Jenkins-gCubeDeployer] deploy ${currentBuild.fullDisplayName} failed",
body: "Something is wrong with ${env.BUILD_URL}"
}
@ -337,6 +340,9 @@ def deployJobs(def serviceList){
catchError(buildResult: 'UNSTABLE', stageResult: 'UNSTABLE') {
checkup(service[0], service[ 1 ], service[2]);
}
if (currentBuild.result == "UNSTABLE") {
return;
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
deploy(service[0], service[ 1 ], service[2]);
}

View File

@ -20,7 +20,7 @@ Jenkins Pipeline script to manage one or more gCube components deployment
The variables below must be specified as environment variables on the agent where the deployments will be executed:
* IS_SCHEDULED (True | False): if true all the deployment requests will be performed periodically as specified by cron
* ENVIRONMENT: ( DEV | PREPROD | PROD) Indicates the target environment where will be deployed all the artifacts
* DEPLOY_CATEGORY: (Related to release build) one or more Component group on yaml file where search the components to deploy
* DEPLOY_CATEGORY: (Related to release build) one or more Component group (separated by commas) on yaml file where search the components to deploy
* CD: (Continuous Deployment: True | False) if True the remote deploy will be performed
## References