generated from gCubeCI/Pipeline-Docker-Template
Compare commits
No commits in common. "master" and "testColor" have entirely different histories.
|
@ -1,9 +1,8 @@
|
||||||
#!groovy
|
#!groovy
|
||||||
import org.yaml.snakeyaml.Yaml
|
import org.yaml.snakeyaml.Yaml
|
||||||
import groovy.json.JsonSlurper
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Deploy gCube components on D4Science Infrastructure (dev and preprod environments)
|
* Deploy gCube components on D4Science Infrastructure (dev-only)
|
||||||
*
|
*
|
||||||
* Roberto Cirillo (ISTI-CNR)
|
* Roberto Cirillo (ISTI-CNR)
|
||||||
*/
|
*/
|
||||||
|
@ -58,7 +57,7 @@ pipeline {
|
||||||
AGENT_ROOT_FOLDER = "${agent_root_folder}"
|
AGENT_ROOT_FOLDER = "${agent_root_folder}"
|
||||||
// folder where all the pending deployment will be added
|
// folder where all the pending deployment will be added
|
||||||
PENDING_DEPLOY_FOLDER="${agent_root_folder}/CD/"
|
PENDING_DEPLOY_FOLDER="${agent_root_folder}/CD/"
|
||||||
ANSIBLE_ROOT_FOLDER = "${agent_root_folder}/ansible-repos/ansible-playbooks/d4science-smartgears-services"
|
ANSIBLE_ROOT_FOLDER = "${agent_root_folder}/ansible-repos/ansible-playbooks/d4science-ghn-cluster/CD"
|
||||||
PIPELINE_BUILD_NUMBER = "${env.BUILD_NUMBER}"
|
PIPELINE_BUILD_NUMBER = "${env.BUILD_NUMBER}"
|
||||||
// deploy file related to the current pipeline job
|
// deploy file related to the current pipeline job
|
||||||
DEPLOY_FILE = "${PENDING_DEPLOY_FOLDER}deploy.${PIPELINE_BUILD_NUMBER}.csv"
|
DEPLOY_FILE = "${PENDING_DEPLOY_FOLDER}deploy.${PIPELINE_BUILD_NUMBER}.csv"
|
||||||
|
@ -71,8 +70,6 @@ pipeline {
|
||||||
TRIGGER_HOST="${params.TRIGGER_HOST}"
|
TRIGGER_HOST="${params.TRIGGER_HOST}"
|
||||||
// enable the ContinuousDeployment if TRUE
|
// enable the ContinuousDeployment if TRUE
|
||||||
TRIGGER_CD="${params.TRIGGER_CD}"
|
TRIGGER_CD="${params.TRIGGER_CD}"
|
||||||
// generic parameter that can be passed to the ansible job
|
|
||||||
TRIGGER_FOO="${params.TRIGGER_FOO}"
|
|
||||||
// Useful to identify the remote YAML file
|
// Useful to identify the remote YAML file
|
||||||
GCUBE_RELEASE_NUMBER = "${params.gCube_release_version}"
|
GCUBE_RELEASE_NUMBER = "${params.gCube_release_version}"
|
||||||
//Category name of the components candidates to the remote deployment
|
//Category name of the components candidates to the remote deployment
|
||||||
|
@ -82,11 +79,9 @@ pipeline {
|
||||||
//URL to the YAML file. Used alternatively to RELEASE_JOB
|
//URL to the YAML file. Used alternatively to RELEASE_JOB
|
||||||
RELEASE_URL= "${params.RELEASE_URL}"
|
RELEASE_URL= "${params.RELEASE_URL}"
|
||||||
// username of ReleaseManager. Used for limiting the preproduction deployments
|
// username of ReleaseManager. Used for limiting the preproduction deployments
|
||||||
RELEASE_MANAGER_USER='giancarlo.panichi'
|
RELEASE_MANAGER_USER='roberto.cirillo'
|
||||||
// name of Smartgears distribution group, defined in the yaml file ( only for release deployments)
|
// name of Smartgears distribution group, defined in the yaml file ( only for release deployments)
|
||||||
DISTRIBUTION_CATEGORY='Distribution'
|
DISTRIBUTION_CATEGORY='Distribution'
|
||||||
// name of Portlets group, defined in the yaml file ( only for release deployments)
|
|
||||||
PORTLET_CATEGORY='Portlets'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
parameters {
|
parameters {
|
||||||
|
@ -102,9 +97,6 @@ pipeline {
|
||||||
booleanParam(name: 'TRIGGER_CD',
|
booleanParam(name: 'TRIGGER_CD',
|
||||||
defaultValue: true,
|
defaultValue: true,
|
||||||
description: 'Set to false to avoid current deploy')
|
description: 'Set to false to avoid current deploy')
|
||||||
string(name: 'TRIGGER_FOO',
|
|
||||||
defaultValue: '',
|
|
||||||
description: 'Additional parameter to pass to the ansible job. Leave blank if not used')
|
|
||||||
string(name: 'gCube_release_version',
|
string(name: 'gCube_release_version',
|
||||||
defaultValue: '',
|
defaultValue: '',
|
||||||
description: 'The number of the current gCube release. Leave blank if executed outside gCube release.')
|
description: 'The number of the current gCube release. Leave blank if executed outside gCube release.')
|
||||||
|
@ -168,7 +160,7 @@ pipeline {
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
sh '''
|
sh '''
|
||||||
echo '\033[31;1;4mNew pending deploy/033[0m'
|
echo '\033[31;1;4mNew pending deploy added to the queue/033[0m'
|
||||||
echo "Cron build enabled. Adding ${TRIGGER_JOB} - ${TRIGGER_VERSION} to the queue"
|
echo "Cron build enabled. Adding ${TRIGGER_JOB} - ${TRIGGER_VERSION} to the queue"
|
||||||
touch $DEPLOY_FILE;
|
touch $DEPLOY_FILE;
|
||||||
if grep -q \"\${TRIGGER_JOB}\" \${DEPLOY_FILE}; then
|
if grep -q \"\${TRIGGER_JOB}\" \${DEPLOY_FILE}; then
|
||||||
|
@ -203,14 +195,9 @@ pipeline {
|
||||||
echo '\033[31;1;4mNew upstream deploy ongoing\033[0m'
|
echo '\033[31;1;4mNew upstream deploy ongoing\033[0m'
|
||||||
echo "Cron build disabled. Component: ${params.TRIGGER_JOB} - ${params.TRIGGER_VERSION}"
|
echo "Cron build disabled. Component: ${params.TRIGGER_JOB} - ${params.TRIGGER_VERSION}"
|
||||||
ansiColor('xterm') {
|
ansiColor('xterm') {
|
||||||
catchError(buildResult: 'UNSTABLE', stageResult: 'UNSTABLE') {
|
catchError(buildResult: 'UNSTABLE', stageResult: 'FAILURE') {
|
||||||
checkup("${params.TRIGGER_JOB}", "${params.TRIGGER_VERSION}", "${params.TRIGGER_HOST}");
|
checkup("${params.TRIGGER_JOB}", "${params.TRIGGER_VERSION}", "${params.TRIGGER_HOST}");
|
||||||
}
|
deploy("${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}");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -223,7 +210,7 @@ pipeline {
|
||||||
anyOf{
|
anyOf{
|
||||||
triggeredBy 'BuildUpstreamCause'
|
triggeredBy 'BuildUpstreamCause'
|
||||||
triggeredBy 'UpstreamCause'
|
triggeredBy 'UpstreamCause'
|
||||||
// added just for testing . To Remove.
|
//added just for testing . To Remove.
|
||||||
triggeredBy cause: "UserIdCause", detail: "${RELEASE_MANAGER_USER}"
|
triggeredBy cause: "UserIdCause", detail: "${RELEASE_MANAGER_USER}"
|
||||||
}
|
}
|
||||||
// we should improve this conditional check
|
// we should improve this conditional check
|
||||||
|
@ -232,9 +219,9 @@ pipeline {
|
||||||
steps {
|
steps {
|
||||||
script{
|
script{
|
||||||
if("${DEPLOY_CATEGORY}"){
|
if("${DEPLOY_CATEGORY}"){
|
||||||
echo '\033[31;1;4mGoing to deploy gCube Release \033[0m'
|
println("Going to deploy the Release components")
|
||||||
deployRelease("${DEPLOY_CATEGORY}", yamlConfig);
|
deployRelease("${DEPLOY_CATEGORY}", yamlConfig);
|
||||||
}else println ("CATEGORIES NOT FOUND. ENVIRONMENT NOT SET FOR RELEASE DEPLOYMENT. NOTHING TO DO");
|
}else { println ("CATEGORIES NOT FOUND ON YAML FILE. SKIP TO NEXT STAGE");}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -250,7 +237,7 @@ pipeline {
|
||||||
echo '\033[31;1;4mNew deploy ongoing manually triggered\033[0m'
|
echo '\033[31;1;4mNew deploy ongoing manually triggered\033[0m'
|
||||||
echo "Cron build disabled. Pipeline executed Manually. New deploy of ${params.TRIGGER_JOB} - ${params.TRIGGER_VERSION} ongoing"
|
echo "Cron build disabled. Pipeline executed Manually. New deploy of ${params.TRIGGER_JOB} - ${params.TRIGGER_VERSION} ongoing"
|
||||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
deploy("${params.TRIGGER_JOB}", "${params.TRIGGER_VERSION}", "${params.TRIGGER_HOST}", "${params.TRIGGER_FOO}");
|
deploy("${params.TRIGGER_JOB}", "${params.TRIGGER_VERSION}", "${params.TRIGGER_HOST}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -267,23 +254,30 @@ pipeline {
|
||||||
echo 'The deploy pipeline worked!'
|
echo 'The deploy pipeline worked!'
|
||||||
|
|
||||||
emailext attachLog: true,//attachmentsPattern: "**/${ACTION_DEPLOY_FILE}.csv",
|
emailext attachLog: true,//attachmentsPattern: "**/${ACTION_DEPLOY_FILE}.csv",
|
||||||
to: 'jenkinsbuilds@d4science.org',
|
to: 'roberto.cirillo@isti.cnr.it',
|
||||||
subject: "[Jenkins-gCubeDeployer] Deploy report",
|
subject: "[Jenkins-gCubeDeployer] Deploy report",
|
||||||
body: "${currentBuild.fullDisplayName}. Build time: ${currentBuild.durationString}. See ${env.BUILD_URL}. "
|
body: "${currentBuild.fullDisplayName}. Build time: ${currentBuild.durationString}. See ${env.BUILD_URL}. "
|
||||||
}
|
}
|
||||||
failure {
|
failure {
|
||||||
echo 'The deploy pipeline has failed'
|
echo 'The deploy pipeline has failed'
|
||||||
emailext attachLog: true,
|
emailext attachLog: true,
|
||||||
to: 'jenkinsbuilds@d4science.org',
|
to: 'roberto.cirillo@isti.cnr.it',
|
||||||
subject: "[Jenkins-gCubeDeployer] deploy ${currentBuild.fullDisplayName} failed",
|
subject: "[Jenkins-gCubeDeployer] deploy ${currentBuild.fullDisplayName} failed",
|
||||||
body: "Something is wrong with ${env.BUILD_URL}"
|
body: "Something is wrong with ${env.BUILD_URL}"
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//launch ansible deploy
|
||||||
|
def deploy(String service, String version, String host){
|
||||||
/* CHECKUP METHODS */
|
def now = new Date();
|
||||||
|
println("Going to deploy the service "+service+" with version: "+version+" on target: "+host);
|
||||||
|
def statusCode = sh( script: "cd $ANSIBLE_ROOT_FOLDER;./deployService.sh $service $version $host;", returnStdout: true);
|
||||||
|
sh("""
|
||||||
|
echo " last exit code \$?";
|
||||||
|
""")
|
||||||
|
println("Deploy ended with status: "+statusCode);
|
||||||
|
}
|
||||||
|
|
||||||
//Implement a new method in order to check the input parameters
|
//Implement a new method in order to check the input parameters
|
||||||
def checkup(String service, String version, String host){
|
def checkup(String service, String version, String host){
|
||||||
|
@ -296,6 +290,17 @@ def checkup(String service, String version, String host){
|
||||||
""")
|
""")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//launch ansible deploy
|
||||||
|
def deployRelease(String service, String version, String smartgears){
|
||||||
|
def now = new Date();
|
||||||
|
println("Going to deploy the service "+service+" with version: "+version+" on preproduction ");
|
||||||
|
def statusCode = sh( script: "cd $ANSIBLE_ROOT_FOLDER;git pull;./deployPreprodService.sh $service $version $smartgears ;", returnStdout: true);
|
||||||
|
sh("""
|
||||||
|
echo " last exit code \$?";
|
||||||
|
""")
|
||||||
|
println("Deploy ended with status: "+statusCode);
|
||||||
|
}
|
||||||
|
|
||||||
//Implement a new method in order to check the input parameters
|
//Implement a new method in order to check the input parameters
|
||||||
def checkupRelease(String service, String version){
|
def checkupRelease(String service, String version){
|
||||||
sh("""
|
sh("""
|
||||||
|
@ -306,10 +311,6 @@ def checkupRelease(String service, String version){
|
||||||
esac
|
esac
|
||||||
""")
|
""")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* DEPLOY METHODS*/
|
|
||||||
|
|
||||||
//parse all csv files found in the local folder and deploy the components defined inside
|
//parse all csv files found in the local folder and deploy the components defined inside
|
||||||
def parseDeployPendingJobs( def deployFolder){
|
def parseDeployPendingJobs( def deployFolder){
|
||||||
println ("searching files in folder ${deployFolder}");
|
println ("searching files in folder ${deployFolder}");
|
||||||
|
@ -330,7 +331,6 @@ def parseDeployPendingJobs( def deployFolder){
|
||||||
deployJobs(serviceList.unique())
|
deployJobs(serviceList.unique())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Deploy jobs from an input list with the following elements: serviceName,serviceVersion,targetHost. Create a new stage for any job
|
//Deploy jobs from an input list with the following elements: serviceName,serviceVersion,targetHost. Create a new stage for any job
|
||||||
def deployJobs(def serviceList){
|
def deployJobs(def serviceList){
|
||||||
for (def record : serviceList) {
|
for (def record : serviceList) {
|
||||||
|
@ -339,49 +339,31 @@ def deployJobs(def serviceList){
|
||||||
println("Processing deploy: "+service[ 0 ])
|
println("Processing deploy: "+service[ 0 ])
|
||||||
catchError(buildResult: 'UNSTABLE', stageResult: 'UNSTABLE') {
|
catchError(buildResult: 'UNSTABLE', stageResult: 'UNSTABLE') {
|
||||||
checkup(service[0], service[ 1 ], service[2]);
|
checkup(service[0], service[ 1 ], service[2]);
|
||||||
}
|
|
||||||
if (currentBuild.result == "UNSTABLE") {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
|
||||||
deploy(service[0], service[ 1 ], service[2]);
|
deploy(service[0], service[ 1 ], service[2]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
//Deploy only release components. All the component are passed as: componentName,componentVersion
|
||||||
//Run ansible deploy
|
def deployReleaseJobs(def serviceList, String smartgears){
|
||||||
def deploy(String service, String version, String host, String foo){
|
for (def record : serviceList) {
|
||||||
def now = new Date();
|
service=record.split(",");
|
||||||
println("Going to deploy the service "+service+" with version: "+version+" on target: "+host+" with argument: "+foo);
|
stage(service[0]){
|
||||||
dir("${ANSIBLE_ROOT_FOLDER}/CD/"){
|
println("Processing RELEASE deploy: service "+service[ 0 ]+" with version "+service[ 1 ]+" and SG "+smartgears)
|
||||||
sh("""
|
catchError(buildResult: 'UNSTABLE', stageResult: 'FAILURE') {
|
||||||
git pull;
|
checkupRelease(service[0], service[ 1 ]);
|
||||||
""")
|
if (smartgears)
|
||||||
def statusCode = sh( script: "./deployService.sh $service $version $host $foo;", returnStatus: true);
|
deployRelease(service[0], service[ 1 ], smartgears);
|
||||||
sh("""
|
else
|
||||||
echo " last exit code \$?";
|
deployRelease(service[0], service[ 1 ], null);
|
||||||
""")
|
}
|
||||||
println("Deploy statusCode value: "+statusCode);
|
|
||||||
if (statusCode != 0){
|
|
||||||
currentBuild.result = 'FAILURE'
|
|
||||||
sh("""
|
|
||||||
exit $statusCode;
|
|
||||||
""")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
// collects all the components defined inside one or more yaml categories matching categoryList
|
||||||
|
|
||||||
/* DEPLOY RELEASE METHODS*/
|
|
||||||
|
|
||||||
// collects all the components defined inside one or more yaml categories matching categoryList and invoke the deploy
|
|
||||||
def deployRelease(def categoryList, def yaml){
|
def deployRelease(def categoryList, def yaml){
|
||||||
def isPortlet= false
|
|
||||||
def releaseList = []
|
def releaseList = []
|
||||||
def portlets = []
|
|
||||||
String smartgears
|
String smartgears
|
||||||
def categories=categoryList.split(',')
|
def categories=categoryList.split(',')
|
||||||
yaml.gCube_release.Components.each { group_name, component_list ->
|
yaml.gCube_release.Components.each { group_name, component_list ->
|
||||||
|
@ -389,16 +371,9 @@ def deployRelease(def categoryList, def yaml){
|
||||||
for ( def category : categories){
|
for ( def category : categories){
|
||||||
if("${group_name}" == "$category"){
|
if("${group_name}" == "$category"){
|
||||||
if (category == "${DISTRIBUTION_CATEGORY}"){
|
if (category == "${DISTRIBUTION_CATEGORY}"){
|
||||||
//searching smartgears-distribution (os smartgears-distribution-legacy) version in Distribution component defined inside the yaml file
|
//searching smartgears-distribution version in Distribution component of defined inside the yaml file
|
||||||
def sg= component_list?.collect{ if ("$it.name" == 'smartgears-distribution' || "$it.name" == 'smartgears-distribution-legacy' ){ return "$it.version"; }}
|
def sg= component_list?.collect{ if ("$it.name" == 'smartgears-distribution'){ return "$it.version"; }}
|
||||||
smartgears=(sg !=null ) ? sg[0] : ''
|
smartgears=(sg !=null ) ? sg[0] : null
|
||||||
}else if (category =="${PORTLET_CATEGORY}"){
|
|
||||||
portlets += component_list?.collect{ if ("${it.group_id}" != "null") return "{\"group_id\": \"$it.group_id\", \"name\": \"$it.name\", \"version\": \"$it.version\", \"extension\": \"war\"} "; else return "{\"name\": \"$it.name\", \"version\": \"$it.version\", \"extension\": \"war\"}"}
|
|
||||||
def jsonContent= "{\"generic_portlets\": "+portlets+"}"
|
|
||||||
echo "json: $jsonContent"
|
|
||||||
writeJSON file: 'portlets.json', json: jsonContent
|
|
||||||
def output = sh(returnStdout: true, returnStdoutTrim: true, script: "mv portlets.json $ANSIBLE_ROOT_FOLDER")
|
|
||||||
isPortlet= true
|
|
||||||
}else{
|
}else{
|
||||||
releaseList += component_list?.collect {return "$it.name,$it.version" }
|
releaseList += component_list?.collect {return "$it.name,$it.version" }
|
||||||
}
|
}
|
||||||
|
@ -407,58 +382,5 @@ def deployRelease(def categoryList, def yaml){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
deployReleaseJobs(releaseList, smartgears, isPortlet);
|
deployReleaseJobs(releaseList, smartgears);
|
||||||
}
|
|
||||||
|
|
||||||
//Deploy only release components, starting from a servicelist. All the component are passed as: componentName,componentVersion
|
|
||||||
def deployReleaseJobs(def serviceList, String smartgears, boolean isPortlet){
|
|
||||||
if (serviceList || isPortlet){
|
|
||||||
println("Going to deploy release components");
|
|
||||||
for (def record : serviceList) {
|
|
||||||
service=record.split(",");
|
|
||||||
stage(service[0]){
|
|
||||||
println("Processing RELEASE deploy: service "+service[ 0 ]+" with version "+service[ 1 ]+" and SG "+smartgears)
|
|
||||||
catchError(buildResult: 'UNSTABLE', stageResult: 'FAILURE') {
|
|
||||||
checkupRelease(service[0], service[ 1 ]);
|
|
||||||
if (smartgears)
|
|
||||||
deployReleaseJob(service[0], service[ 1 ], smartgears);
|
|
||||||
else
|
|
||||||
deployReleaseJob(service[0], service[ 1 ], '');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (isPortlet){
|
|
||||||
stage("portlets"){
|
|
||||||
deployReleaseJob('generic-portlet', '','');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}else{
|
|
||||||
println("Release components not found. Skip this stage");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//Run ansible deploy related to a single service
|
|
||||||
def deployReleaseJob(String service, String version, String smartgears){
|
|
||||||
def now = new Date();
|
|
||||||
println("Going to deploy "+service+" "+version+" on preproduction ");
|
|
||||||
dir("${ANSIBLE_ROOT_FOLDER}/CD/"){
|
|
||||||
sh("""
|
|
||||||
git pull;
|
|
||||||
""")
|
|
||||||
def statusCode = sh( script: "./deployPreprodService.sh $service $version $smartgears ;", returnStatus: true);
|
|
||||||
sh("""
|
|
||||||
echo " last exit code \$?";
|
|
||||||
""")
|
|
||||||
println("Deploy ended with status: "+statusCode);
|
|
||||||
if (statusCode != 0){
|
|
||||||
currentBuild.result = 'FAILURE'
|
|
||||||
sh("""
|
|
||||||
exit $statusCode;
|
|
||||||
""")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
403
README.html
403
README.html
File diff suppressed because one or more lines are too long
17
README.md
17
README.md
|
@ -20,27 +20,14 @@ 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:
|
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
|
* 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
|
* 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 (separated by commas) on yaml file where search the components to deploy
|
* DEPLOY_CATEGORY: (Related to release build) one or more Component group on yaml file where search the components to deploy
|
||||||
* CD: (Continuous Deployment: True | False) if True the remote deploy will be performed
|
* CD: (Continuous Deployment: True | False) if True the remote deploy will be performed
|
||||||
|
|
||||||
## References
|
## References
|
||||||
* [Jenkins Pipeline](https://jenkins.io/doc/book/pipeline/)
|
* [Jenkins Pipeline](https://jenkins.io/doc/book/pipeline/)
|
||||||
* [Pipeline Syntax](https://jenkins.io/doc/book/pipeline/syntax/)
|
* [Pipeline Syntax](https://jenkins.io/doc/book/pipeline/syntax/)
|
||||||
|
|
||||||
## Examples
|
## Wiki doc
|
||||||
* When configured as post step build on jenkinsjob, there are some variables to pass as triggered parameters. All the values are dinamically set as shown below:
|
|
||||||
|
|
||||||
[[images/gCubeDeployer-JenkinsJob.png]]
|
|
||||||
|
|
||||||
* The pipeline can run manually. This option is conceived for debug purpose:
|
|
||||||
|
|
||||||
[[images/gCubeDeployer-manualRun.png]]
|
|
||||||
|
|
||||||
* Follows a stage view example when the pipeline was scheduled by system, but there were any action to do:
|
|
||||||
|
|
||||||
[[images/gCubeDeployer-stageview.png]]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Flow Chart
|
## Flow Chart
|
||||||
|
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 253 KiB |
Binary file not shown.
Before Width: | Height: | Size: 194 KiB |
Binary file not shown.
Before Width: | Height: | Size: 403 KiB |
Loading…
Reference in New Issue