CI CD Deployment steps and semi‐manual deployment for PAT expiration - JU-DEV-Bootcamps/ERAS GitHub Wiki
Pre-running recomendation
Log using ssh to the runner machine, 10.24.80.173, perform a (docker system prune) to free hard drive space, and stop the running containers of BE and FE of this machine to free resources and reduce the possible errors of deployment.
Deployment for develop On the ERAS Repository, navigate to actions and select "Deploy process on runner"
Set the branch as Develop and the environment as develop (Default configuration)
and press Run Workflow
Deployment for stagging
Similar to develop navigate to the Github action on the ERAS Project repository, but follow this order of configuration 1 set the branch on main (wait some seconds to have the updated list of devices) 2 set the environment staging. The configuration should look as :
Deployment for Production
Production is a special case because the branch of production should have a different name following the release plan. IMPORTANT: The branch created on ERAS project should have the same name to the branch in Front end and Back end.
1.- Set the permission for the new branch of production on the production environment:
- Navigate to Settings/Secrets and variables/Actions
- Click on the button Manage environment secrets
-
click on production
-
Set the new branch for release in the list of allowed branchs
2.- Set the name of the branch as a variable
- Navigate again to Settings/Secrets and variables/Actions and press the variables tab
- and search the repository variables
- Update the ERAS_RELEASE_BRANCH with the new branch for release
3.- Navigate the Actions of the Eras project
- Press Run Workflow and populate the information on this order: Set the branch on the new production branch, wait for some seconds and when the list is updated select the production environment
4.- Press Run Workflow
Note: The extra steps for production are required for security and confirm that only the changes on the right release branch are used for the final deployment.
Emergency semi manual deployment when the PAT is expired.
Recommended only for Develop environments
When a PAT token expires the first symptom appears on the execution of the submodules
The way to solve is copyng the information for the deploy on the same log
for Back end and for Front end
The navigate to the workflow RW - Test - Package - Runner of Back end and expand Run workflow
populate the data with the copied data from the failed attempt to deploy the BE and press the green button Run Workflow and wait until the process is completed
Do the same with the data of the failed FE deploy on the FE repository Workflows EX:
When you got both processes executed return to the ERAS Project execution of the workflow and Press re-run for the second job Prepare-and-Dispach
The data on the runner should be used for the release, after the workflow is completed, validate that the new versions are deployed in the docker ps command.