Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate secrets from main config #8 #114

Merged
merged 16 commits into from
Sep 30, 2024
Merged

Conversation

DaniilGo
Copy link
Contributor

@DaniilGo DaniilGo commented Sep 26, 2024

@DaniilGo DaniilGo self-assigned this Sep 26, 2024
@DaniilGo DaniilGo requested a review from a team as a code owner September 26, 2024 14:06
@antelman107
Copy link
Contributor

antelman107 commented Sep 26, 2024

Since you are changing a CI/CD pipeline, can you attach a link to the pipeline which is successfully working?
(it's a non-master branch, so you need to modify the conditions of the pipeline)

@DaniilGo
Copy link
Contributor Author

DaniilGo commented Sep 26, 2024

Since you are changing a CI/CD pipeline, can you attach a link to the pipeline is successfully working? (it's a non-master branch, so you need to modify the conditions of the pipeline)

Here it is: https://github.com/CSR-LC/csr-be/actions/runs/11068058471

@DaniilGo DaniilGo marked this pull request as ready for review September 26, 2024 20:34
@@ -95,6 +95,17 @@ jobs:
script: |
mkdir -p /var/www/csr/stage/
echo '${{ secrets.DEPLOY_CONFIG }}' > /var/www/csr/stage/config.json
sudo rm -rf /etc/systemd/system/stage.csr.service.d
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think EnvironmentFile directive might be simplier to work with compared to folder management.
https://www.flatcar.org/docs/latest/setup/systemd/environment-variables/
Could you try this approach and see how it works?
Please create environment file in the same directory with stage.csr.service - do not create unnecessary folders as possible.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your advice! Updated this flow. Here are successful run: https://github.com/CSR-LC/csr-be/actions/runs/11105969158

Copy link
Contributor

@antelman107 antelman107 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The solution is working - good, but env file management could be optimized - https://github.com/CSR-LC/csr-be/pull/114/files#r1778498849

@DaniilGo
Copy link
Contributor Author

Now looks good (IMHO) and works fine, thanks!

Copy link
Contributor

@antelman107 antelman107 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@DaniilGo DaniilGo merged commit d4a3642 into master Sep 30, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants