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

fix(ci): Secrets unavailable for deploy jobs #4215

Merged
merged 10 commits into from
Jun 24, 2024
Merged

Conversation

khvn26
Copy link
Member

@khvn26 khvn26 commented Jun 24, 2024

Thanks for submitting a PR! Please check the boxes below:

  • I have run pre-commit to check linting
  • I have added information to docs/ if required so people know about the feature!
  • I have filled in the "Changes" section below?
  • I have filled in the "How did you test this code" section below?
  • I have used a Conventional Commit title for this Pull Request

Changes

Fixes deploy jobs.

How did you test this code?

This is a CI change.

Copy link

vercel bot commented Jun 24, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

3 Ignored Deployments
Name Status Preview Comments Updated (UTC)
docs ⬜️ Ignored (Inspect) Visit Preview Jun 24, 2024 0:45am
flagsmith-frontend-preview ⬜️ Ignored (Inspect) Visit Preview Jun 24, 2024 0:45am
flagsmith-frontend-staging ⬜️ Ignored (Inspect) Visit Preview Jun 24, 2024 0:45am

@github-actions github-actions bot added the fix label Jun 24, 2024
Copy link
Contributor

github-actions bot commented Jun 24, 2024

Uffizzi Preview deployment-53396 was deleted.

@github-actions github-actions bot added fix and removed fix labels Jun 24, 2024
Copy link

codecov bot commented Jun 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.53%. Comparing base (5e87f39) to head (d5162f9).
Report is 6 commits behind head on main.

Current head d5162f9 differs from pull request most recent head 8d16f3f

Please upload reports for the commit 8d16f3f to get more accurate results.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4215      +/-   ##
==========================================
+ Coverage   96.51%   96.53%   +0.01%     
==========================================
  Files        1177     1177              
  Lines       38307    38368      +61     
==========================================
+ Hits        36973    37037      +64     
+ Misses       1334     1331       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@khvn26 khvn26 force-pushed the fix/ecs-deploy-secrets branch from d9f442c to 84e8c70 Compare June 24, 2024 10:11
@github-actions github-actions bot added fix and removed fix labels Jun 24, 2024
@khvn26 khvn26 changed the title fix: Secrets unavailable for deploy jobs fix(ci): Secrets unavailable for deploy jobs Jun 24, 2024
@khvn26 khvn26 requested a review from matthewelwell June 24, 2024 10:52
.github/workflows/.reusable-deploy-ecs.yml Show resolved Hide resolved
Dockerfile Outdated
mv /root/.gnupg /app/; \
chown -R nobody /app/.gnupg
mv /root/.gnupg/ /app/
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm keen to get @gagantrivedi's review here as well to make sure we know what we need to test.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure. The image has been deployed to staging so we just need to verify SSE there.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, we have to make sure sse events are still reaching influx

@@ -167,8 +167,8 @@ FROM api-runtime-private as saas-api
RUN --mount=type=secret,id=sse_pgp_pkey \
apt-get update && apt-get install -y gnupg && \
gpg --import /run/secrets/sse_pgp_pkey && \
mv /root/.gnupg /app/; \
chown -R nobody /app/.gnupg
mv /root/.gnupg/ /app/ && \
Copy link
Member

Choose a reason for hiding this comment

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

Are you able to build this image without any GPG key?

Copy link
Member Author

Choose a reason for hiding this comment

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

Are you able to build this image without any GPG key?

There's no need as saas-api target is only intended for building with the key.

Copy link
Member

Choose a reason for hiding this comment

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

Are you able to build this image without any GPG key?

There's no need as saas-api target is only intended for building with the key.

Hmm, I am little confused… Is this file not used for private cloud? What if we want to build an image locally to test something?

Copy link
Member Author

@khvn26 khvn26 Jun 24, 2024

Choose a reason for hiding this comment

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

This file is used for all of our targets now. To build the private-cloud target, you don't need the key; the GPG import is the only layer added by the saas-api target stage.

I'd love to make the key a runtime dependency and shave off one target, though! Let me know if you have an idea how to do that.

See Dockerfile comments and the PR description for details.

@github-actions github-actions bot added fix and removed fix labels Jun 24, 2024
@khvn26 khvn26 added this pull request to the merge queue Jun 24, 2024
Merged via the queue into main with commit d56ad08 Jun 24, 2024
20 checks passed
@khvn26 khvn26 deleted the fix/ecs-deploy-secrets branch June 24, 2024 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants