Closed OskarZaremba closed 2 years ago
I guess these pictures shouldn't be in the project. @przemyslaw-rzasa-cp removed them before they were published. At the moment they are on s3.
I guess these pictures shouldn't be in the project. @przemyslaw-rzasa-cp removed them before they were published. At the moment they are on s3.
I think you're right. I created my branch from main before @przemyslaw-rzasa introduced his changes with pictures on s3. Then I created pr and sorted out conflicts but there was no conflicts with these images hence they are still there. I will check it and eventually remove what is required.
What has been introduced:
npm dependecines caching in cloud-deploy and web-deploy jobs has been added to speed them up a bit
the following custom actions to cloud-deploy job:
Cognito custom action - this action deploys janush autogenerated app stack and extracts: identity pool id, user pool id and user pool web client id data. Extracted values are exported then to the environment variables available for subsequent steps within the current job (cloud-deploy)
Amplify custom action - this action deploys janush autogenerated app ci stack and extracts: s3 bucket name, amplify app id and amplify app branch name data. Extracted values are exported then to the environment variables available for subsequent steps within the current job (cloud-deploy)
Adding this custom actions makes main.yml file more readable and ensures single responsibility rule for each of jobs in workflow. It means that data obtained within one job are obtained in that particular job and exported for further usage in other places. In case of urge to modify those actions, the following steps must be done:
Appropriate index.ts must be modified accordingly to individual needs
Modified index.ts file should be converted to index.js file using e.g. tsc command
To generated index.js file all dependencies used in its imports should be attached. One can use the @vercel/ncc library for that purpose to generated such a file automatically.
action from gitHub marketplace to cloud-deploy job - this action is used to get environment variables created by custom cognito action in cloud-deploy job and set them in repository secrets for further usage in web-deploy job. Thanks of that, secrets generated in one job can be exported safely to another one. In other to make that action work it is required to generate personal access token in codeandpepper github account and add it to secret with name TOKEN in janush.app repository, it must be done otherwise that action will not work.
What should be introduced in future:
There are still places especially in web-deploy job where one can introduce another custom actions to extract some logic form main.yml file making it even more readable.