Class PlatformReleasePlan

java.lang.Object
fr.paris.lutece.plugins.releaser.business.platform.PlatformReleasePlan
All Implemented Interfaces:
Serializable

public class PlatformReleasePlan extends Object implements 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 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

      public String getCampaignName()
      Returns the campaign name.
      Returns:
      the campaign name
    • setCampaignName

      public void setCampaignName(String strCampaignName)
      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

      public PlatformStepCode getStepCode()
      Returns the step code.
      Returns:
      the step code
    • setStepCode

      public void setStepCode(PlatformStepCode stepCode)
      Sets the step code.
      Parameters:
      stepCode - the step code
    • getReleaseType

      public PlatformReleaseType getReleaseType()
      Returns the release type of the step (stable for the first two steps whatever the campaign type).
      Returns:
      the release type
    • setReleaseType

      public void setReleaseType(PlatformReleaseType releaseType)
      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

      public PlatformStepMode getMode()
      Returns the mode of the build : release, dry run or verification.
      Returns:
      the mode
    • setMode

      public void setMode(PlatformStepMode mode)
      Sets the mode of the build.
      Parameters:
      mode - the mode, RELEASE when null
    • getLaunchedDespite

      public List<String> 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

      public void setLaunchedDespite(List<String> listLaunchedDespite)
      Sets the resources the release was launched with although they were not verified.
      Parameters:
      listLaunchedDespite - the resources
    • getCampaignCoordinates

      public List<String> 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

      public void setCampaignCoordinates(List<String> listCampaignCoordinates)
      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

      public List<PlatformPlanResource> getComponents()
      Returns the components to release, in release order.
      Returns:
      the components
    • setComponents

      public void setComponents(List<PlatformPlanResource> listComponents)
      Sets the components to release.
      Parameters:
      listComponents - the components
    • getAggregate

      public PlatformPlanResource getAggregate()
      Returns the aggregate released after its components, null when the step has no aggregate to release.
      Returns:
      the aggregate
    • setAggregate

      public void setAggregate(PlatformPlanResource aggregate)
      Sets the aggregate.
      Parameters:
      aggregate - the aggregate
    • getPipelineParameters

      public Map<String,String> 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

      public void setPipelineParameters(Map<String,String> mapPipelineParameters)
      Sets the pipeline parameters.
      Parameters:
      mapPipelineParameters - the pipeline parameters