-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Including better logic More description on logic outcomes Usage of grouping to outline steps
- Loading branch information
Showing
1 changed file
with
64 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,68 @@ | ||
@startuml | ||
:User triggers the workflow; | ||
title Release Automation Process | ||
|
||
start | ||
:Create release files; | ||
while(unchecked release files) | ||
if (addHeader) then(true) | ||
:Collapse headers; | ||
:Add new headers; | ||
endif | ||
if (release file on github) then(true) | ||
if(release version is less then version on github) then(true) | ||
:Throw error; | ||
stop | ||
endif | ||
:Create new branch if one has not been made; | ||
:Create the release file; | ||
:Add release file to correct location; | ||
else(false) | ||
if(release on OSF) then(true) | ||
:Create director for osf file storage; | ||
endif | ||
endif | ||
endwhile | ||
:Commit files to new branch; | ||
if(existing release branched/PRs) then(true) | ||
:Delete existing branches and PRs; | ||
endif | ||
:Push changes; | ||
:Create PR to dev with the new branch; | ||
stop | ||
:Release branch merged to main; | ||
start | ||
if(release files found in OSF upload directory) then(true) | ||
if(no release files on OSF) then(false) | ||
if(version on osf is different to current release version) then (true) | ||
if(OSF version is greater then release version) then(true) | ||
:Throw error; | ||
stop | ||
else(false) | ||
:Create archive folder; | ||
:Move old files to archive; | ||
:Create new directory for release; | ||
endif | ||
else(false) | ||
:Delete old files; | ||
endif | ||
endif | ||
endif | ||
:Upload OSF directory to OSF; | ||
stop | ||
:Updates to OSF and github are finished; | ||
start | ||
fork | ||
:Pull in latest dictionary changes to PHESD-doc; | ||
:Create PR to update main with latest changes; | ||
if(CI passes) then(true) | ||
:Merge to main; | ||
endif | ||
fork again | ||
:Pull in latest dictionary changes to PHESD-validation; | ||
:Create PR to update main with latest changes; | ||
if(CI passes) then(true) | ||
:Merge to main; | ||
endif | ||
endfork | ||
group RA-1: Trigerring the Process | ||
:User passes link to excel dictionary on OSF to use for the release; | ||
:User passes OSF personal access token; | ||
:User triggers release process; | ||
end group | ||
|
||
group RA-2: Creating the Release Files | ||
:Retrieve Excel Dictionary; | ||
|
||
:Parse metadata from files sheet; | ||
|
||
:Construct file names; | ||
|
||
:Fill file content; | ||
|
||
:Add optional headers; | ||
end group | ||
|
||
group RA-3: Deploying the files to GitHub | ||
:Check if previous release exists on GitHub; | ||
|
||
if (No previous release on GitHub) then (yes) | ||
:Create new release branch and files on GitHub; | ||
else (no) | ||
if (Previous release is newer) then (yes) | ||
:Stop process and throw an error; | ||
stop | ||
else (no) | ||
:Move old files and create new files on GitHub; | ||
endif | ||
endif | ||
:Create PR from release branch to dev branch; | ||
end group | ||
group RA-4: Deploying the files to OSF | ||
repeat | ||
:Check release status on GitHub; | ||
repeat while(Release branch is merged to main) is (no) | ||
->yes; | ||
:Check if previous release exists on OSF; | ||
|
||
if (No previous release on OSF) then (yes) | ||
:Create new release files on OSF; | ||
else (no) | ||
if (Previous release is newer) then (yes) | ||
:Stop process and throw an error; | ||
stop | ||
else (no) | ||
if (Previous release is same version) then (yes) | ||
:Replace old files with new files on OSF; | ||
else (no) | ||
:Move old files to archive folder; | ||
:Create new release files on OSF; | ||
endif | ||
endif | ||
endif | ||
end group | ||
|
||
:Trigger workflow in PHES-ODM-Doc Repo; | ||
note right: RA-5: Trigger a PR in the PHES-ODM-Doc repo | ||
|
||
:Trigger workflow in PHES-ODM-Validation Repo; | ||
note right: RA-6: Trigger a PR in the PHES-ODM-Validation repo | ||
stop | ||
@enduml |