public class FlexDeployFunctions extends BaseFunctions
Constructor and Description |
---|
FlexDeployFunctions(boolean isExecute,
LogFunctions pFLOG) |
Modifier and Type | Method and Description |
---|---|
void |
addFilesToPackage(java.lang.Long pProjectId,
java.lang.String pPackageName,
java.util.List<java.lang.String> pFiles)
Adds files to a given package.
|
void |
addProjectsToRelease(java.lang.String pReleaseName,
java.util.List<ReleaseProjectsPojo> pReleaseProjects)
Add FlexDeploy projects to a given release.
|
void |
approveTask(java.lang.String pUsername,
java.lang.String pTaskIdentifier,
java.lang.String pNotes)
Approve a FlexDeploy Task.
|
java.lang.Long |
buildPackage(java.lang.Long pStreamId,
ProjectPackagePojo projectPackage)
Builds a FlexDeploy Package.
|
java.lang.Long |
buildPackage(java.lang.Long pStreamId,
ProjectPackagePojo projectPackage,
BuildOptions pBuildOptions)
Builds a FlexDeploy Package.
|
java.lang.Long |
buildPackage(java.lang.Long pStreamId,
ProjectPackagePojo projectPackage,
PollingResult pPollingResult)
Builds a FlexDeploy Package using a PollingResult.
|
java.lang.Long |
buildPackage(java.lang.Long pStreamId,
ProjectPackagePojo projectPackage,
PollingResult pPollingResult,
BuildOptions pBuildOptions)
Builds a FlexDeploy Package using a PollingResult.
|
java.lang.Long |
buildProject(java.lang.Long pStreamId,
java.lang.Long pProjectId)
Builds a FlexDeploy Project.
|
java.lang.Long |
buildProject(java.lang.Long pStreamId,
java.lang.Long pProjectId,
BuildOptions pBuildOptions)
Builds a FlexDeploy Project.
|
java.lang.Long |
buildProject(java.lang.Long pStreamId,
java.lang.Long pProjectId,
PollingResult pPollingResult)
Builds a FlexDeploy Project using a PollingResult.
|
java.lang.Long |
buildProject(java.lang.Long pStreamId,
java.lang.Long pProjectId,
PollingResult pPollingResult,
BuildOptions pBuildOptions)
Builds a FlexDeploy Project using a PollingResult.
|
void |
cleanup() |
java.lang.Long |
createPackage(java.lang.Long pProjectId,
java.lang.String pPackageName,
java.lang.String pDescription,
java.util.List<java.lang.String> pFiles)
Creates a package for a given project and list of files.
|
java.lang.Long |
createPackage(java.lang.Long pProjectId,
java.lang.String pPackageName,
java.lang.String pDescription,
java.lang.Long pStreamId,
PollingResult pPollingResult)
Creates a package for a given project relative to a PollingResult.
|
java.lang.Long |
createProject(ProjectPojo pProjectPojo)
Creates and configures a project with the provided data.
|
java.lang.Long |
createRelease(java.lang.String pReleaseName,
java.lang.String pPipelineName,
java.lang.String pDescription)
Create an empty FlexDeploy Release that defaults to 'Not Started' status.
|
java.lang.Long |
createRelease(java.lang.String pReleaseName,
java.lang.String pPipelineName,
java.lang.String pDescription,
java.lang.String pCronSchedule)
Create an empty scheduled FlexDeploy Release that defaults to 'Not Started' status.
|
java.lang.Long |
createSCMInstance(SCMInstancePojo pSCMInstancePojo)
Creates and configures an SCM instance with the given data.
|
java.lang.Long |
createSCMInstance(java.lang.String pSCMInstanceName,
java.lang.String pDescription,
java.lang.Boolean pIsActive,
java.lang.String pInstanceCode,
java.util.List<PropertyValuePojo> pProperties,
java.lang.String pSCMType)
Creates and configures an SCM Instance with the provided data.
|
java.lang.Long |
createSnapshot(java.lang.Long pReleaseId)
Create a Snapshot for a given Release.
|
java.lang.Long |
createStream(java.lang.Long pProjectId,
ProjectStreamPojo pStream)
Create a FlexDeploy Stream on a given project.
|
java.lang.Long |
createStream(java.lang.Long pProjectId,
java.lang.String pStreamName)
Create a FlexDeploy Stream on a given project.
|
java.lang.Long |
createStream(java.lang.Long pProjectId,
java.lang.String pStreamName,
java.lang.String pVersionSyntax)
Create a FlexDeploy Stream on a given project.
|
void |
deletePackage(java.lang.Long pProjectId,
java.lang.String pPackageName)
Deletes a project package
|
void |
downloadLogs(java.lang.Long pWorkflowExecutionId,
java.lang.String pDestinationPath)
Downloads the plugin logs from the workflow execution based on Id.
|
void |
downloadSnapshotCommitDetails(java.lang.Long pSnapshotId,
java.lang.String pDestinationPath)
Gets the commit details of a snapshot and downloads a csv file to the destination path.
|
void |
endRelease(java.lang.Long pReleaseId)
End a FlexDeploy Release.
|
void |
endRelease(java.lang.String pReleaseName)
End a FlexDeploy Release.
|
java.lang.Long |
executeUtility(java.lang.Long pProjectId,
java.lang.String pEnvironmentCode)
Executes a FlexDeploy Utility Project for a single environment on all instances configured in Project Configuration.
|
java.lang.Long |
executeUtility(java.lang.Long pProjectId,
java.lang.String pEnvironmentCode,
ExecuteOptions pExecuteOptions)
Executes a FlexDeploy Utility Project for a single environment with specified ExecuteOptions.
|
CMSInstancePojo |
findCMSInstance(java.lang.String pCMSInstanceCode)
Gets a CMSInstance based on the CMS Instance Code passed.
|
ChangeManagementSystemService |
findCMSService(java.lang.String pCode,
java.lang.String pName)
Returns a CMS service for a particular CMS Instance by searching with Instance Name and Instance Code.
|
java.util.List<EnvironmentPojo> |
findEnvironment(java.lang.String pEnvironmentCode)
Gets the environment with the specified Code.
|
java.util.List<InstancePojo> |
findInstance(java.lang.String pInstanceCode)
Gets the instance with the specified Code.
|
AccountInstancePojo |
findIntegrationInstance(java.lang.String pIntegrationInstanceCode,
java.lang.String pType)
Gets an integration instance based on the Id.
|
PollingResult |
findLocalChangeLogs(java.lang.String pUrl,
java.lang.String pBranch,
java.lang.String pCurrentRevision,
java.lang.String pFromRevision)
Finds change logs for a local ssh enabled git repository.
|
PollingResult |
findLocalChangeLogs(java.lang.String pUrl,
java.lang.String pBranch,
java.lang.String pCurrentRevision,
java.lang.String pFromRevision,
boolean pIgnoreTargetBranchMerge)
Finds change logs for a local ssh enabled git repository.
|
PollingResult |
findLocalChangeLogs(java.lang.String pUrl,
java.lang.String pBranch,
java.lang.String pCurrentRevision,
java.lang.String pFromRevision,
java.lang.String pUser,
java.lang.String pPassword)
Finds change logs for a local git repository.
|
PollingResult |
findLocalChangeLogs(java.lang.String pUrl,
java.lang.String pBranch,
java.lang.String pCurrentRevision,
java.lang.String pFromRevision,
java.lang.String pUser,
java.lang.String pPassword,
boolean pIgnoreTargetBranchMerge)
Finds change logs for a local ssh enabled git repository.
|
java.util.Set<ProjectPackagePojo> |
findPackagesForChange(java.lang.String pRepositoryName,
java.lang.String pStreamName,
java.util.List<java.lang.String> pChangedFiles)
Finds relevant FlexDeploy Packages for a list of changed files.
|
java.util.Set<ProjectPackagePojo> |
findPackagesForChange(java.lang.String pRepositoryName,
java.lang.String pStreamName,
PollingResult pPollingResult)
Finds relevant FlexDeploy Packages for any given PollingResult.
|
java.lang.Long |
findProjectId(java.lang.String pProjectName)
Finds the FlexDeploy Project id for any given name
|
java.util.Set<java.lang.Long> |
findProjectsForChange(java.lang.String pRepositoryName,
java.lang.String pStreamName,
java.util.List<java.lang.String> pChangedFiles)
Finds relevant FlexDeploy Projects for a list of changed files.
|
java.util.Set<java.lang.Long> |
findProjectsForChange(java.lang.String pRepositoryName,
java.lang.String pStreamName,
PollingResult pPollingResult)
Finds relevant FlexDeploy Projects for any given PollingResult and stream.
|
java.util.Set<java.lang.Long> |
findProjectsForNewBranch(java.lang.String pRepositoryName)
Finds relevant FlexDeploy Projects for a new branch event.
|
java.util.Set<java.lang.Long> |
findProjectsForNewBranch(java.lang.String pRepositoryName,
PollingResult pPollingResult)
Finds relevant FlexDeploy Projects for a new branch event.
|
java.util.List<ReleasePojo> |
findReleases(java.lang.String pName)
Finds Releases matching the specified name.
|
java.lang.Long |
findStreamId(java.lang.Long pProjectId,
java.lang.String pStreamName)
Finds a FlexDeploy stream id from the Stream name.
|
CMSInstancePojo |
getCMSInstance(java.lang.Long pCMSInstanceId)
Gets a CMSInstance based on the CMS Instance Id passed.
|
ChangeManagementSystemService |
getCMSService(java.lang.Long pCMSInstanceId)
Returns a CMS service for a particular CMS Instance.
|
EnvironmentPojo |
getEnvironment(java.lang.Long pEnvironmentId)
Gets the environment with the specified Id.
|
java.lang.String |
getFlexDeployBaseUrl()
Returns the FlexDeploy Server base url configured in System Settings.
|
java.lang.String |
getGroovyKey() |
InstancePojo |
getInstance(java.lang.Long pInstanceId)
Gets the instance with the specified Id.
|
AccountInstancePojo |
getIntegrationInstance(java.lang.Long pIntegrationInstanceId,
java.lang.String pType)
Gets an integration instance based on the Id.
|
PackageDetailsResponsePojo |
getPackage(java.lang.Long pProjectId,
java.lang.String pPackageName)
Returns a PackageDetailsResponsePojo given a Project Id and Package Name
|
StageExecutionInformationPOJO |
getPipelineStageExecutionInfo(java.lang.Long pStageExecId)
Gets pipeline stage execution info based on the stage exec Id given.
|
StepProjectsRequestPojo |
getPipelineStepProjectsExecution(java.lang.Long pStageExecId,
java.lang.Long pStepId)
Get the project request and execution statuses for a given pipeline step execution
|
StepProjectsRequestPojo |
getPipelineStepProjectsExecution(java.lang.Long pStageExecId,
java.lang.String pStepName)
Get the project request and execution statuses for a given pipeline step execution
|
java.util.Map<java.lang.Long,java.io.InputStream> |
getPluginLogInputStreams(java.lang.Long pWorkflowExecutionId)
Returns plugin logs from a workflow execution as a map with the key being the plugin execution id and value as an InputStream of log data.
|
java.util.Map<java.lang.Long,java.io.InputStream> |
getPluginLogInputStreams(java.lang.Long pWorkflowExecutionId,
java.lang.Boolean pOnlyError)
Returns plugin logs from a workflow execution as a map with the key being the plugin execution id and value as an InputStream of log data.
|
java.util.Collection<PluginLogPojo> |
getPluginLogs(java.lang.Long pWorkflowExecutionId)
Gets the plugin logs from the workflow execution based on Id.
|
ProjectPojo |
getProject(java.lang.Long pProjectId)
Returns project information for a given projectId.
|
ReleasePojo |
getRelease(java.lang.Long pId)
Gets a release by a specific id.
|
java.util.List<ReleaseProjectDetailsPojo> |
getReleaseProjectInfo(java.lang.Long pReleaseDefId)
Gets release project info based on the release definition Id.
|
java.io.InputStream |
getSnapshotCommitDetailInputStreams(java.lang.Long pSnapshotId)
Gets the commit details of a snapshot and returns an input stream of the data.
|
java.util.List<ReleaseSnapshotCommitDetailsPojo> |
getSnapshotCommitDetails(java.lang.Long pSnapshotId)
Gets the commit details of a snapshot and returns an object with the data.
|
FdUserDataObject |
getUser(java.lang.String pUsername)
Returns user information for a given username.
|
java.util.List<FDUser> |
getUsersFromGroupId(java.lang.Long pGroupId)
Gets a list of FDUser objects that are members of the group with the given group Id.
|
java.util.List<FDUser> |
getUsersFromRoleId(java.lang.Long pRoleId)
Gets a list of the users that are members of the pipeline role with the specified role Id.
|
void |
inactivateStream(java.lang.Long pProjectId,
java.lang.String pStreamName)
Inactive a FlexDeploy Stream on a project.
|
void |
pauseRelease(java.lang.Long pReleaseId)
Pause a FlexDeploy Release.
|
void |
pauseRelease(java.lang.String pReleaseName)
Pause a FlexDeploy Release.
|
java.lang.Integer |
populateFiles(java.lang.Long pProjectId,
java.lang.Long pStreamId)
Populate partial deployment files for a given project.
|
void |
rejectTask(java.lang.String pUsername,
java.lang.String pTaskIdentifier,
java.lang.String pNotes)
Reject a FlexDeploy Task.
|
void |
removeProjectsFromRelease(java.lang.String pReleaseName,
java.util.List<ReleaseProjectsPojo> pReleaseProjects)
Remove FlexDeploy projects from a given release.
|
void |
startRelease(java.lang.Long pReleaseId)
Start a FlexDeploy Release.
|
void |
startRelease(java.lang.String pReleaseName)
Start a FlexDeploy Release.
|
void |
updatePackage(java.lang.Long pProjectId,
java.lang.String pPackageName,
java.lang.Long pStreamId,
PollingResult pPollingResult)
Updates a given package relative to a PollingResult.
|
void |
updatePackage(java.lang.Long pProjectId,
java.lang.String pPackageName,
java.lang.Long pStreamId,
PollingResult pPollingResult,
boolean pSortFiles)
Updates a given package relative to a PollingResult.
|
void |
updatePackageStatus(java.lang.Long pProjectId,
java.lang.String pPackageName,
java.lang.String pPackageStatus)
Updates a given package status.
|
java.lang.Long |
updateProject(java.lang.Long pProjectId,
ProjectPojo pProjectPojo)
Updates a project with the provided data.
|
java.lang.Long |
updateProjectProperties(java.lang.Long pProjectId,
java.util.List<PropertyValuePojo> pPropertyPojos)
Updates a project's properties with the provided data.
|
java.lang.Long |
updateSCMInstance(java.lang.Long pSCMInstanceId,
SCMInstancePojo pSCMInstancePojo)
Updates an SCM instance with the given data.
|
java.lang.Long |
updateSCMInstance(java.lang.Long pSCMInstanceId,
java.lang.String pSCMInstanceName,
java.lang.String pDescription,
java.lang.Boolean pIsActive,
java.lang.String pInstanceCode,
java.util.List<PropertyValuePojo> pProperties,
java.lang.String pSCMType)
Updates an SCM instance with the given data.
|
void |
updateStream(java.lang.Long pProjectId,
java.lang.Long pStreamId,
ProjectStreamPojo pStream)
Updates a FlexDeploy Stream on a given project.
|
approveTask, approveTaskByEmails, decryptIntegrationInstance, doSimpleGet, findIntegrationInstance, getLogFunctions, getServerBaseUrl, rejectTask, rejectTaskByEmails
public FlexDeployFunctions(boolean isExecute, LogFunctions pFLOG)
public PollingResult findLocalChangeLogs(java.lang.String pUrl, java.lang.String pBranch, java.lang.String pCurrentRevision, java.lang.String pFromRevision) throws FlexCheckedException
findLocalChangeLogs
pUrl
- Url of the git repository to find logs againstpBranch
- Branch to find logs againstpCurrentRevision
- Current revision after the pushpFromRevision
- Previous revision before the pushFlexCheckedException
- If an invalid revision is passed.public PollingResult findLocalChangeLogs(java.lang.String pUrl, java.lang.String pBranch, java.lang.String pCurrentRevision, java.lang.String pFromRevision, boolean pIgnoreTargetBranchMerge) throws FlexCheckedException
findLocalChangeLogs
pUrl
- Url of the git repository to find logs againstpBranch
- Branch to find logs againstpCurrentRevision
- Current revision after the pushpFromRevision
- Previous revision before the pushpIgnoreTargetBranchMerge
- Exclude commits that were merged from the target branch into this branch. When using git flow this will ignore merges
done from the target branch 'develop' into your feature branch. Default value is trueFlexCheckedException
- If an invalid revision is passed.public PollingResult findLocalChangeLogs(java.lang.String pUrl, java.lang.String pBranch, java.lang.String pCurrentRevision, java.lang.String pFromRevision, java.lang.String pUser, java.lang.String pPassword) throws FlexCheckedException
pUrl
- Url of the git repository to find logs againstpBranch
- Branch to find logs againstpCurrentRevision
- Current revision after the pushpFromRevision
- Previous revision before the pushpUser
- User to use for local credentialspPassword
- Password of the userFlexCheckedException
- If an invalid revision is passed.public PollingResult findLocalChangeLogs(java.lang.String pUrl, java.lang.String pBranch, java.lang.String pCurrentRevision, java.lang.String pFromRevision, java.lang.String pUser, java.lang.String pPassword, boolean pIgnoreTargetBranchMerge) throws FlexCheckedException
findLocalChangeLogs
pUrl
- Url of the git repository to find logs againstpBranch
- Branch to find logs againstpCurrentRevision
- Current revision after the pushpFromRevision
- Previous revision before the pushpUser
- User to use for local credentialspPassword
- Password of the userpIgnoreTargetBranchMerge
- Exclude commits that were merged from the target branch into this branch. When using git flow this will ignore merges
done from the target branch 'develop' into your feature branch. Default value is trueFlexCheckedException
- If an invalid revision is passed.public ProjectPojo getProject(java.lang.Long pProjectId) throws FlexNotFoundException
pProjectId
- Project Id of the project to retrieveFlexNotFoundException
- When no project is found for given Idpublic ReleasePojo getRelease(java.lang.Long pId) throws FlexNotFoundException
pId
- Release IdFlexNotFoundException
- When no Release is found for the given idpublic java.util.List<ReleasePojo> findReleases(java.lang.String pName) throws FlexNotFoundException
getRelease
this method returns a list of Releases.pName
- Name to search byFlexNotFoundException
- When no releases match the naming criteriapublic java.lang.Long createProject(ProjectPojo pProjectPojo)
pProjectPojo
- - Object containing project configuration information.public java.lang.Long updateProject(java.lang.Long pProjectId, ProjectPojo pProjectPojo)
pProjectPojo
- public java.lang.Long updateProjectProperties(java.lang.Long pProjectId, java.util.List<PropertyValuePojo> pPropertyPojos)
pProjectId
- - Id of the project that is to be updated.pPropertyPojos
- - List of property values to be updated on project.public void addFilesToPackage(java.lang.Long pProjectId, java.lang.String pPackageName, java.util.List<java.lang.String> pFiles) throws FlexCheckedException
pProjectId
- Parent project id of the packagepPackageName
- Name of the packagepFiles
- Filepaths to add to the package.FlexCheckedException
public java.lang.Integer populateFiles(java.lang.Long pProjectId, java.lang.Long pStreamId)
pProjectId
- Project id to populate files for. This should be a project using partial deployment.pStreamId
- Stream id to use when populating.findStreamId(java.lang.Long, java.lang.String)
public void updatePackageStatus(java.lang.Long pProjectId, java.lang.String pPackageName, java.lang.String pPackageStatus) throws FlexNotFoundException, FlexCheckedException
pProjectId
- Parent project id of the packagepPackageName
- Name of the packagepPackageStatus
- The updated package status [ACTIVE, COMPLETED, or INACTIVE]FlexNotFoundException
- Project id is not found or package doesnt exist on project.FlexCheckedException
- All other exceptionspublic void updatePackage(java.lang.Long pProjectId, java.lang.String pPackageName, java.lang.Long pStreamId, PollingResult pPollingResult) throws FlexNotFoundException, FlexCheckedException
addFilesToPackage
method.
This function will automatically populate files if new files are detected.
Files added to this package are always added to the end of the list.pProjectId
- Parent project id of the packagepPackageName
- Name of the packagepStreamId
- Stream to use when populating files if new files are foundpPollingResult
- PollingResult object to use for finding differencesFlexNotFoundException
- Project id is not found or package doesnt exist on project.FlexCheckedException
- All other exceptionsBitbucketFunctions.getChangeLogs(java.lang.Object, java.lang.String, java.lang.String)
,
GithubFunctions.getChangeLogs(java.lang.Object)
public void updatePackage(java.lang.Long pProjectId, java.lang.String pPackageName, java.lang.Long pStreamId, PollingResult pPollingResult, boolean pSortFiles) throws FlexNotFoundException, FlexCheckedException
addFilesToPackage
method.
This function will automatically populate files if new files are detected.
The files in this package can optionally be sorted by their project files sequence number.pProjectId
- Parent project id of the packagepPackageName
- Name of the packagepStreamId
- Stream to use when populating files if new files are foundpPollingResult
- PollingResult object to use for finding differencespSortFiles
- Sort package files after updateFlexNotFoundException
- Project id is not found or package doesnt exist on project.FlexCheckedException
- All other exceptionsBitbucketFunctions.getChangeLogs(java.lang.Object, java.lang.String, java.lang.String)
,
GithubFunctions.getChangeLogs(java.lang.Object)
public java.lang.Long createPackage(java.lang.Long pProjectId, java.lang.String pPackageName, java.lang.String pDescription, java.util.List<java.lang.String> pFiles) throws FlexCheckedException
pProjectId
- Parent project id to create package under.pPackageName
- Package name to use.pDescription
- Description to give the package.pFiles
- List of files to add to the package. File paths should be as they appear in the project files tab of the project.FlexCheckedException
public java.lang.Long createPackage(java.lang.Long pProjectId, java.lang.String pPackageName, java.lang.String pDescription, java.lang.Long pStreamId, PollingResult pPollingResult) throws FlexNotFoundException, FlexCheckedException
pProjectId
- Parent project id of the packagepPackageName
- Name of the packagepDescription
- Description to give the package.pPollingResult
- PollingResult object to use for finding differencesFlexNotFoundException
- Project id is not found or package doesnt exist on project.FlexCheckedException
- All other exceptionsBitbucketFunctions.getChangeLogs(java.lang.Object, java.lang.String, java.lang.String)
,
GithubFunctions.getChangeLogs(java.lang.Object)
public void deletePackage(java.lang.Long pProjectId, java.lang.String pPackageName) throws FlexCheckedException
pProjectId
- Parent project id package is under.pPackageName
- Name of package to delete.FlexCheckedException
public java.lang.Long buildPackage(java.lang.Long pStreamId, ProjectPackagePojo projectPackage) throws FlexCheckedException
PollingResult variant
pStreamId
- Stream to use when building package. See findStreamId
.projectPackage
- Wrapper object containing project id and package name to build.FlexCheckedException
public java.lang.Long buildPackage(java.lang.Long pStreamId, ProjectPackagePojo projectPackage, BuildOptions pBuildOptions) throws FlexCheckedException
PollingResult variant
pStreamId
- Stream to use when building package. See findStreamId
.projectPackage
- Wrapper object containing project id and package name to build.pBuildOptions
- Additional build object where optional options can be set.FlexCheckedException
public java.lang.Long buildPackage(java.lang.Long pStreamId, ProjectPackagePojo projectPackage, PollingResult pPollingResult) throws FlexCheckedException
pStreamId
- Stream to use when building package. See findStreamId
.projectPackage
- Wrapper object containing project id and package name to build.pPollingResult
- PollingResult object containing change logs and committer information.FlexCheckedException
BitbucketFunctions.getChangeLogs(java.lang.Object, java.lang.String, java.lang.String)
,
GithubFunctions.getChangeLogs(java.lang.Object)
public java.lang.Long buildPackage(java.lang.Long pStreamId, ProjectPackagePojo projectPackage, PollingResult pPollingResult, BuildOptions pBuildOptions) throws FlexCheckedException
pStreamId
- Stream to use when building package. See findStreamId
.projectPackage
- Wrapper object containing project id and package name to build.pPollingResult
- PollingResult object containing change logs and committer information.pBuildOptions
- Additional build object where optional options can be set.FlexCheckedException
BitbucketFunctions.getChangeLogs(java.lang.Object, java.lang.String, java.lang.String)
,
GithubFunctions.getChangeLogs(java.lang.Object)
public java.lang.Long buildProject(java.lang.Long pStreamId, java.lang.Long pProjectId) throws FlexCheckedException
PollingResult variant
pStreamId
- Stream to use when building project. See findStreamId
.pProjectId
- Project id to build.FlexCheckedException
public java.lang.Long buildProject(java.lang.Long pStreamId, java.lang.Long pProjectId, BuildOptions pBuildOptions) throws FlexCheckedException
PollingResult variant
pStreamId
- Stream to use when building project. See findStreamId
.pProjectId
- Project id to build.pBuildOptions
- Additional build object where optional options can be set.FlexCheckedException
public java.lang.Long buildProject(java.lang.Long pStreamId, java.lang.Long pProjectId, PollingResult pPollingResult) throws FlexCheckedException
pStreamId
- Stream to use when building project. See findStreamId
.pProjectId
- Project id to build.pPollingResult
- PollingResult object containing change logs and committer information.FlexCheckedException
BitbucketFunctions.getChangeLogs(java.lang.Object, java.lang.String, java.lang.String)
,
GithubFunctions.getChangeLogs(java.lang.Object)
public java.lang.Long buildProject(java.lang.Long pStreamId, java.lang.Long pProjectId, PollingResult pPollingResult, BuildOptions pBuildOptions) throws FlexCheckedException
pStreamId
- Stream to use when building project. See findStreamId
.pProjectId
- Project id to build.pPollingResult
- PollingResult object containing change logs and committer information.pBuildOptions
- Additional build object where optional options can be set.FlexCheckedException
BitbucketFunctions.getChangeLogs(java.lang.Object, java.lang.String, java.lang.String)
,
GithubFunctions.getChangeLogs(java.lang.Object)
public java.util.Set<java.lang.Long> findProjectsForNewBranch(java.lang.String pRepositoryName)
pRepositoryName
- Git repository name with the change. Name is of the form (username/repo). e.g. toddmotto/public-apispublic java.util.Set<java.lang.Long> findProjectsForNewBranch(java.lang.String pRepositoryName, PollingResult pPollingResult)
findProjectsForNewBranch
.
This function currently only compares against Git repositories and is not compatible with other scm types.pRepositoryName
- Git repository name with the change. Name is of the form (username/repo). e.g. toddmotto/public-apispPollingResult
- PollingResult object for determining relevant projects.BitbucketFunctions.getChangeLogs(java.lang.Object, java.lang.String, java.lang.String)
,
GithubFunctions.getChangeLogs(java.lang.Object)
public java.util.Set<java.lang.Long> findProjectsForChange(java.lang.String pRepositoryName, java.lang.String pStreamName, PollingResult pPollingResult)
pRepositoryName
- Git repository name with the change. Name is of the form (username/repo). e.g. toddmotto/public-apispStreamName
- Stream/branch name for which the change occurred. e.g. 'master'pPollingResult
- PollingResult object for determining relevant projects.BitbucketFunctions.getChangeLogs(java.lang.Object, java.lang.String, java.lang.String)
,
GithubFunctions.getChangeLogs(java.lang.Object)
public java.util.Set<java.lang.Long> findProjectsForChange(java.lang.String pRepositoryName, java.lang.String pStreamName, java.util.List<java.lang.String> pChangedFiles)
pRepositoryName
- Git repository name with the change. Name is of the form (username/repo). e.g. toddmotto/public-apispStreamName
- Stream/branch name for which the change occurred. e.g. 'master'pChangedFiles
- List of changed files from a push event. If no files are passed then all projects using given repository will be returned.BitbucketFunctions.getChangeLogs(java.lang.Object, java.lang.String, java.lang.String)
,
GithubFunctions.getChangeLogs(java.lang.Object)
public java.util.Set<ProjectPackagePojo> findPackagesForChange(java.lang.String pRepositoryName, java.lang.String pStreamName, PollingResult pPollingResult)
pRepositoryName
- Git repository name with the change. Name is of the form (username/repo). e.g. toddmotto/public-apispStreamName
- Stream/branch name for which the change occurred. e.g. 'master'pPollingResult
- PollingResult object for determining relevant packages.BitbucketFunctions.getChangeLogs(java.lang.Object, java.lang.String, java.lang.String)
,
GithubFunctions.getChangeLogs(java.lang.Object)
public java.util.Set<ProjectPackagePojo> findPackagesForChange(java.lang.String pRepositoryName, java.lang.String pStreamName, java.util.List<java.lang.String> pChangedFiles)
pRepositoryName
- Git repository name with the change. Name is of the form (username/repo). e.g. toddmotto/public-apispStreamName
- Stream/branch name for which the change occurred. e.g. 'master'pChangedFiles
- List of changed files from a push event. If no files are passed then all packages using given repository will be returned.BitbucketFunctions.getChangeLogs(java.lang.Object, java.lang.String, java.lang.String)
,
GithubFunctions.getChangeLogs(java.lang.Object)
public java.lang.Long findProjectId(java.lang.String pProjectName) throws FlexNotFoundException, FlexCheckedException
pProjectName
- Case sensitive project name to search byFlexNotFoundException
- If project name is not found in FlexDeployFlexCheckedException
- All other exceptionspublic java.lang.Long createRelease(java.lang.String pReleaseName, java.lang.String pPipelineName, java.lang.String pDescription) throws FlexCheckedException
pReleaseName
- Name to give Release.pPipelineName
- Pipeline name to use for the Release.pDescription
- Optional description to give the Release.FlexCheckedException
public java.lang.Long createRelease(java.lang.String pReleaseName, java.lang.String pPipelineName, java.lang.String pDescription, java.lang.String pCronSchedule) throws FlexCheckedException
pReleaseName
- Name to give Release.pPipelineName
- Pipeline name to use for the Release.pDescription
- Optional description to give the Release.pCronSchedule
- Cron schedule to give the Release.FlexCheckedException
public void endRelease(java.lang.String pReleaseName) throws FlexCheckedException, FlexNotFoundException
pReleaseName
- Release name to end.FlexNotFoundException
- When Release is not foundFlexCheckedException
- All other exceptionspublic void endRelease(java.lang.Long pReleaseId) throws FlexCheckedException, FlexNotFoundException
pReleaseId
- Release id to end.FlexNotFoundException
- When Release is not foundFlexCheckedException
- All other exceptionspublic void pauseRelease(java.lang.String pReleaseName) throws FlexCheckedException, FlexNotFoundException
pReleaseName
- Release name to pause.FlexNotFoundException
- When Release is not foundFlexCheckedException
- All other exceptionspublic void pauseRelease(java.lang.Long pReleaseId) throws FlexCheckedException, FlexNotFoundException
pReleaseId
- Release id to pause.FlexNotFoundException
- When Release is not foundFlexCheckedException
- All other exceptionspublic void startRelease(java.lang.String pReleaseName) throws FlexCheckedException, FlexNotFoundException
pReleaseName
- Release name to start.FlexNotFoundException
- When Release is not foundFlexCheckedException
- All other exceptionspublic void startRelease(java.lang.Long pReleaseId) throws FlexCheckedException, FlexNotFoundException
pReleaseId
- Release id to start.FlexNotFoundException
- When Release is not foundFlexCheckedException
- All other exceptionspublic void addProjectsToRelease(java.lang.String pReleaseName, java.util.List<ReleaseProjectsPojo> pReleaseProjects) throws FlexCheckedException, FlexNotFoundException
pReleaseName
- Release name to add projects to.pReleaseProjects
- List of ReleaseProjects to add.FlexCheckedException
FlexNotFoundException
public void removeProjectsFromRelease(java.lang.String pReleaseName, java.util.List<ReleaseProjectsPojo> pReleaseProjects) throws FlexCheckedException, FlexNotFoundException
pReleaseName
- Release name to remove projects from.pReleaseProjects
- List of ReleaseProjects to remove.FlexCheckedException
FlexNotFoundException
public java.lang.Long createSnapshot(java.lang.Long pReleaseId) throws FlexCheckedException
pReleaseId
- Release to create the snapshot for.FlexCheckedException
public java.lang.Long findStreamId(java.lang.Long pProjectId, java.lang.String pStreamName) throws FlexCheckedException, FlexNotFoundException
pProjectId
- Project id on which the stream belongs.pStreamName
- Name of the stream. e.g. 'feature/JIRA-12', 'master'.FlexNotFoundException
- If stream name is not found on the project.FlexCheckedException
- All other exceptionspublic java.lang.Long createStream(java.lang.Long pProjectId, java.lang.String pStreamName, java.lang.String pVersionSyntax) throws FlexCheckedException
pProjectId
- Project to create the stream on.pStreamName
- Stream name to create.pVersionSyntax
- Version Syntax to use for the stream. For example: "1.0.mybranch." + SequenceNumber. Note that this is a groovy script and literal strings should be enclosed in quotes.FlexCheckedException
public java.lang.Long createStream(java.lang.Long pProjectId, ProjectStreamPojo pStream) throws FlexCheckedException
pProjectId
- Project to create the stream on.pStream
- ProjectStreamPojo object representing the stream to create.FlexCheckedException
public java.lang.Long createStream(java.lang.Long pProjectId, java.lang.String pStreamName) throws FlexCheckedException
pProjectId
- Project to create the stream on.pStreamName
- Stream name to create.FlexCheckedException
public void updateStream(java.lang.Long pProjectId, java.lang.Long pStreamId, ProjectStreamPojo pStream) throws FlexCheckedException
pProjectId
- Project to create the stream on.pStreamId
- Id of the stream to update.pStream
- ProjectStreamPojo object representing the stream to update.FlexCheckedException
public void inactivateStream(java.lang.Long pProjectId, java.lang.String pStreamName) throws FlexCheckedException
pProjectId
- Project id for which the stream belongs.pStreamName
- Stream name to inactivate.FlexCheckedException
public void approveTask(java.lang.String pUsername, java.lang.String pTaskIdentifier, java.lang.String pNotes) throws FlexCheckedException, FlexNotFoundException
pUsername
- Username to approve the task as, the user passed here needs permission to approve otherwise an error will occur. User must be in local realm.pTaskIdentifier
- Task identifier to approve. This identifier is only available in the TaskCreated webhook payload and is not visible from the UI.pNotes
- Optional notes to assign to the approval.FlexNotFoundException
- If no task found for passed id.FlexCheckedException
- All other exceptions.public void rejectTask(java.lang.String pUsername, java.lang.String pTaskIdentifier, java.lang.String pNotes) throws FlexCheckedException, FlexNotFoundException
pUsername
- Username to reject the task as, the user passed here needs permission to reject otherwise an error will occur. User must be in local realm.pTaskIdentifier
- Task identifier to approve. This identifier is only available in the TaskCreated webhook payload and is not visible from the UI.pNotes
- Optional notes to assign to the rejected task.FlexNotFoundException
- If no task found for passed id.FlexCheckedException
- All other exceptions.public AccountInstancePojo findIntegrationInstance(java.lang.String pIntegrationInstanceCode, java.lang.String pType) throws FlexNotFoundException
pIntegrationInstanceCode
- Code for the integration instace.pType
- Type of the integration instance. {SCM, TEST, ITS, CMS, CLOUD, ARTIFACTREPO, CISERVER, ANALYSISTOOL, MESSAGING, OTHERTOOLS}.FlexNotFoundException
public java.lang.Long createSCMInstance(java.lang.String pSCMInstanceName, java.lang.String pDescription, java.lang.Boolean pIsActive, java.lang.String pInstanceCode, java.util.List<PropertyValuePojo> pProperties, java.lang.String pSCMType)
pSCMInstanceName
- - The unique name of the SCM instance.pDescription
- - The description of the SCM instance.pIsActive
- - Whether or not the SCM instance is active.pInstanceCode
- - The code of the SCM instance.pProperties
- - A list of objects containing the required property values for the specified SCM type. The objects must contain propertyName field as well as either propertyValue if the value is not encrypted or credentialId if the value is encrypted.pSCMType
- - The SCM type of the instance. Must be a valid source control management system. Possible values are SVN, GIT, CVS, TFVC, PERF, PVCS, FILE, or NONE.public java.lang.Long createSCMInstance(SCMInstancePojo pSCMInstancePojo)
pSCMInstancePojo
- - The object containing all of the required data for the SCM instance.public java.lang.Long updateSCMInstance(java.lang.Long pSCMInstanceId, java.lang.String pSCMInstanceName, java.lang.String pDescription, java.lang.Boolean pIsActive, java.lang.String pInstanceCode, java.util.List<PropertyValuePojo> pProperties, java.lang.String pSCMType)
pSCMInstanceId
- - The Id of the instance to be updated.pSCMInstanceName
- - The unique name of the SCM instance.pDescription
- - The description of the SCM instance.pIsActive
- - Whether or not the SCM instance is active.",pInstanceCode
- - The code of the SCM instance.pProperties
- - A list of objects containing the required property values for the specified SCM type. The objects must contain propertyName field as well as either propertyValue if the value is not encrypted or credentialId if the value is encrypted.pSCMType
- - The SCM type of the instance. Must be a valid source control management system. Possible values are SVN, GIT, CVS, TFVC, PERF, PVCS, FILE, or NONE.public java.lang.Long updateSCMInstance(java.lang.Long pSCMInstanceId, SCMInstancePojo pSCMInstancePojo)
pSCMInstanceId
- - The Id of the instance to be updated.pSCMInstancePojo
- - Object containing all of the required data for the SCM instance.public AccountInstancePojo getIntegrationInstance(java.lang.Long pIntegrationInstanceId, java.lang.String pType) throws FlexNotFoundException
pIntegrationInstanceId
- Integration Instance id.pType
- Type of the integration instance. {SCM, TEST, ITS, CMS, CLOUD, ARTIFACTREPO, CISERVER, ANALYSISTOOL, MESSAGING, OTHERTOOLS}.FlexNotFoundException
public CMSInstancePojo findCMSInstance(java.lang.String pCMSInstanceCode) throws FlexNotFoundException, FlexCheckedException
getCMSService(java.lang.Long)
.pCMSInstanceCode
- Code of the instance you wish to retrieve.FlexNotFoundException
- If no instance found for passed id.FlexCheckedException
- All other exceptions.public CMSInstancePojo getCMSInstance(java.lang.Long pCMSInstanceId) throws FlexNotFoundException, FlexCheckedException
getCMSService(java.lang.Long)
.pCMSInstanceId
- Id of the instance you wish to retrieve.FlexNotFoundException
- If no instance found for passed id.FlexCheckedException
- All other exceptions.public ChangeManagementSystemService findCMSService(java.lang.String pCode, java.lang.String pName) throws FlexNotFoundException, FlexCheckedException
pCode
- Instance code to filter by.pName
- Instance name to filter by.FlexNotFoundException
- If no CMS instance was found given the supplied criteria.FlexCheckedException
- If multiple CMS instances were found or any other exception.public ChangeManagementSystemService getCMSService(java.lang.Long pCMSInstanceId) throws FlexNotFoundException, FlexCheckedException
pCMSInstanceId
- Instance id of the implementation you wish to retrieve.FlexNotFoundException
- If no instance found for passed id.FlexCheckedException
- All other exceptions.public java.util.List<ReleaseProjectDetailsPojo> getReleaseProjectInfo(java.lang.Long pReleaseDefId)
pReleaseDefId
- Release Definition Id.public StageExecutionInformationPOJO getPipelineStageExecutionInfo(java.lang.Long pStageExecId)
pStageExecId
- Pipeline Stage Execution Id.public StepProjectsRequestPojo getPipelineStepProjectsExecution(java.lang.Long pStageExecId, java.lang.Long pStepId)
pStageExecId
- The pipeline stage execution idpStepid
- The pipeline stage step id to get results for.public StepProjectsRequestPojo getPipelineStepProjectsExecution(java.lang.Long pStageExecId, java.lang.String pStepName)
pStageExecId
- The pipeline stage execution idpStepName
- The pipeline stage step name to get results for.public java.util.List<FDUser> getUsersFromGroupId(java.lang.Long pGroupId)
pGroupId
- FlexDeploy Group id to use.public java.util.List<FDUser> getUsersFromRoleId(java.lang.Long pRoleId)
pRoleId
- Pipeline role id.public java.util.List<EnvironmentPojo> findEnvironment(java.lang.String pEnvironmentCode) throws FlexNotFoundException
pEnvironmentCode
- Code of the enviornment.FlexNotFoundException
- If no environment is found for the given codepublic EnvironmentPojo getEnvironment(java.lang.Long pEnvironmentId) throws FlexNotFoundException
pEnvironmentId
- Id of the enviornment.FlexNotFoundException
- If no environment is found for the given id.public java.util.List<InstancePojo> findInstance(java.lang.String pInstanceCode) throws FlexNotFoundException
pInstanceCode
- Code of the instance.FlexNotFoundException
- If no instance is found for the given code.public InstancePojo getInstance(java.lang.Long pInstanceId) throws FlexNotFoundException
pInstanceId
- Id of the instance.FlexNotFoundException
- If no instance is found for the given id.public void downloadLogs(java.lang.Long pWorkflowExecutionId, java.lang.String pDestinationPath) throws FlexCheckedException
pWorkflowExecutionId
- Workflow Execution Id to capture logs for.pDestinationPath
- The path where the log files folder will be saved.FlexCheckedException
public java.util.Map<java.lang.Long,java.io.InputStream> getPluginLogInputStreams(java.lang.Long pWorkflowExecutionId) throws FlexCheckedException
pWorkflowExecutionId
- Workflow Execution Id to capture logs for.FlexCheckedException
public java.util.Map<java.lang.Long,java.io.InputStream> getPluginLogInputStreams(java.lang.Long pWorkflowExecutionId, java.lang.Boolean pOnlyError) throws FlexCheckedException
pWorkflowExecutionId
- Workflow Execution Id to capture logs for.pOnlyError
- Return only the failed plugin log input stream, otherwise all plugin logs for the workflow will be returned.FlexCheckedException
public PackageDetailsResponsePojo getPackage(java.lang.Long pProjectId, java.lang.String pPackageName) throws FlexNotFoundException, FlexCheckedException
pProjectId
- Parent project id package is under.pPackageName
- Name of packageFlexNotFoundException
- If no project package found for passed id.FlexCheckedException
- All other exceptions.public java.util.Collection<PluginLogPojo> getPluginLogs(java.lang.Long pWorkflowExecutionId)
pWorkflowExecutionId
- Workflow Execution Id to capture logs for.public java.io.InputStream getSnapshotCommitDetailInputStreams(java.lang.Long pSnapshotId)
pSnapshotId
- - Id of the snapshot which details will be returnedpublic void downloadSnapshotCommitDetails(java.lang.Long pSnapshotId, java.lang.String pDestinationPath) throws FlexCheckedException
pSnapshotId
- - Id of the snapshot whose commit details will be returned.pDestinationPath
- - Path where the csv will be downloaded.FlexCheckedException
public java.util.List<ReleaseSnapshotCommitDetailsPojo> getSnapshotCommitDetails(java.lang.Long pSnapshotId)
pSnapshotId
- - Id of the snapshot whose commit details will be returned.public java.lang.String getFlexDeployBaseUrl()
public java.lang.String getGroovyKey()
getGroovyKey
in class BaseFunctions
public void cleanup()
cleanup
in class BaseFunctions
public java.lang.Long executeUtility(java.lang.Long pProjectId, java.lang.String pEnvironmentCode) throws FlexCheckedException
pProjectId
- Project id to execute.pEnvironmentCode
- Environment code to use for the utility request.FlexCheckedException
public java.lang.Long executeUtility(java.lang.Long pProjectId, java.lang.String pEnvironmentCode, ExecuteOptions pExecuteOptions) throws FlexCheckedException
pProjectId
- Project id to execute.pEnvironmentCode
- Environment code to use for the utility request.pInstanceCode
- Instance code to use for the utility request.pExecuteOptions
- Execute options contains list of instances to execute on, with inputs and flexfieldsFlexCheckedException
public FdUserDataObject getUser(java.lang.String pUsername)
pUsername
- - Username of the user to retrieve.