Class PlatformReleasePlan
java.lang.Object
fr.paris.lutece.plugins.releaser.business.platform.PlatformReleasePlan
- All Implemented Interfaces:
Serializable
The plan of a platform step sent to the Jenkins step pipeline (JSON contract releaser to Jenkins) : the ordered components to release, then
the aggregate to release.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the aggregate released after its components, null when the step has no aggregate to release.Returns the "groupId:artifactId" of every SNAPSHOT of the campaign (step 0) : a SNAPSHOT dependency outside this list will never be released by the campaign.intReturns the campaign id.Returns the campaign name.Returns the components to release, in release order.intReturns the core version (7 or 8).Returns the resources the person confirmed launching the release with although they were not verified, to fix or stale ("groupId:artifactId : status"), written by the pipeline at the head of its report.getMode()Returns the mode of the build : release, dry run or verification.intReturns the number of resources the pipeline verifies at the same time : 1 outside a verification.Returns the parameters of the Jenkins pipeline chosen on the screen of the step (last step : core, release target, next snapshot, SNAPSHOT tolerance), applied over the ones computed from the plan when the job is triggered.Returns the release type of the step (stable for the first two steps whatever the campaign type).intgetStep()Returns the step number (1 to 5).Returns the step code.booleanisDryRun()Whether the pipeline must simulate without pushing, tagging or deploying.booleanisVerify()Whether the pipeline must verify every resource without committing nor pushing anything : verification of a step or step 0.voidsetAggregate(PlatformPlanResource aggregate) Sets the aggregate.voidsetCampaignCoordinates(List<String> listCampaignCoordinates) Sets the coordinates of every SNAPSHOT of the campaign.voidsetCampaignId(int nCampaignId) Sets the campaign id.voidsetCampaignName(String strCampaignName) Sets the campaign name.voidsetComponents(List<PlatformPlanResource> listComponents) Sets the components to release.voidsetCoreMajor(int nCoreMajor) Sets the core version.voidsetDryRun(boolean bDryRun) Sets the dry run flag, kept in the JSON for the pipelines reading it : true sets the DRY_RUN mode, false leaves a VERIFY mode as is whatever the order the JSON fields are read in.voidsetLaunchedDespite(List<String> listLaunchedDespite) Sets the resources the release was launched with although they were not verified.voidsetMode(PlatformStepMode mode) Sets the mode of the build.voidsetParallelism(int nParallelism) Sets the number of resources verified at the same time.voidsetPipelineParameters(Map<String, String> mapPipelineParameters) Sets the pipeline parameters.voidsetReleaseType(PlatformReleaseType releaseType) Sets the release type of the step.voidsetStep(int nStep) Sets the step number.voidsetStepCode(PlatformStepCode stepCode) Sets the step code.
-
Constructor Details
-
PlatformReleasePlan
public PlatformReleasePlan()
-
-
Method Details
-
getCampaignId
public int getCampaignId()Returns the campaign id.- Returns:
- the campaign id
-
setCampaignId
public void setCampaignId(int nCampaignId) Sets the campaign id.- Parameters:
nCampaignId- the campaign id
-
getCampaignName
Returns the campaign name.- Returns:
- the campaign name
-
setCampaignName
Sets the campaign name.- Parameters:
strCampaignName- the campaign name
-
getStep
public int getStep()Returns the step number (1 to 5).- Returns:
- the step number
-
setStep
public void setStep(int nStep) Sets the step number.- Parameters:
nStep- the step number
-
getStepCode
Returns the step code.- Returns:
- the step code
-
setStepCode
Sets the step code.- Parameters:
stepCode- the step code
-
getReleaseType
Returns the release type of the step (stable for the first two steps whatever the campaign type).- Returns:
- the release type
-
setReleaseType
Sets the release type of the step.- Parameters:
releaseType- the release type
-
getCoreMajor
public int getCoreMajor()Returns the core version (7 or 8).- Returns:
- the Lutece major
-
setCoreMajor
public void setCoreMajor(int nCoreMajor) Sets the core version.- Parameters:
nCoreMajor- the Lutece major
-
getParallelism
public int getParallelism()Returns the number of resources the pipeline verifies at the same time : 1 outside a verification.- Returns:
- the parallelism
-
setParallelism
public void setParallelism(int nParallelism) Sets the number of resources verified at the same time.- Parameters:
nParallelism- the parallelism, at least 1
-
isDryRun
public boolean isDryRun()Whether the pipeline must simulate without pushing, tagging or deploying.- Returns:
- true for a dry run
-
setDryRun
public void setDryRun(boolean bDryRun) Sets the dry run flag, kept in the JSON for the pipelines reading it : true sets the DRY_RUN mode, false leaves a VERIFY mode as is whatever the order the JSON fields are read in.- Parameters:
bDryRun- true for a dry run
-
getMode
Returns the mode of the build : release, dry run or verification.- Returns:
- the mode
-
setMode
Sets the mode of the build.- Parameters:
mode- the mode, RELEASE when null
-
getLaunchedDespite
Returns the resources the person confirmed launching the release with although they were not verified, to fix or stale ("groupId:artifactId : status"), written by the pipeline at the head of its report.- Returns:
- the resources, empty when every resource was verified
-
setLaunchedDespite
Sets the resources the release was launched with although they were not verified.- Parameters:
listLaunchedDespite- the resources
-
getCampaignCoordinates
Returns the "groupId:artifactId" of every SNAPSHOT of the campaign (step 0) : a SNAPSHOT dependency outside this list will never be released by the campaign.- Returns:
- the coordinates, empty outside step 0
-
setCampaignCoordinates
Sets the coordinates of every SNAPSHOT of the campaign.- Parameters:
listCampaignCoordinates- the coordinates
-
isVerify
public boolean isVerify()Whether the pipeline must verify every resource without committing nor pushing anything : verification of a step or step 0.- Returns:
- true for a verification
-
getComponents
Returns the components to release, in release order.- Returns:
- the components
-
setComponents
Sets the components to release.- Parameters:
listComponents- the components
-
getAggregate
Returns the aggregate released after its components, null when the step has no aggregate to release.- Returns:
- the aggregate
-
setAggregate
Sets the aggregate.- Parameters:
aggregate- the aggregate
-
getPipelineParameters
Returns the parameters of the Jenkins pipeline chosen on the screen of the step (last step : core, release target, next snapshot, SNAPSHOT tolerance), applied over the ones computed from the plan when the job is triggered.- Returns:
- the pipeline parameters, by Jenkins parameter name
-
setPipelineParameters
Sets the pipeline parameters.- Parameters:
mapPipelineParameters- the pipeline parameters
-