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

Replace dockerize usage with curl #1999

Closed
legoktm opened this issue May 9, 2024 · 0 comments · Fixed by #2038
Closed

Replace dockerize usage with curl #1999

legoktm opened this issue May 9, 2024 · 0 comments · Fixed by #2038
Assignees
Labels
⚙️ Tooling Improving maintainability and increasing maintainer joy : )

Comments

@legoktm
Copy link
Member

legoktm commented May 9, 2024

Description

In CI, we use the dockerize command to wait for the SD server instance to be up so we can connect to it:

dockerize -wait http://127.0.0.1:8080 -timeout 5m

I was reviewing the web projects' CI a while back and saw that they use plain old curl in a loop for the same functionality - we should do that too.

https://github.com/freedomofpress/securedrop.org/blob/6df3cd790a8cdc7409585c30813d01a5f6a5c37c/.circleci/config.yml#L59

@legoktm legoktm added the ⚙️ Tooling Improving maintainability and increasing maintainer joy : ) label May 9, 2024
legoktm added a commit that referenced this issue May 28, 2024
We just need a tool to wait until the HTTP service is working,
and it turns out we can use curl for that by running it in a
one-line bash loop, avoiding the need to download and extract
dockerize.

This approach was inspired by the securedrop.org repository CI.[1]

[1] https://github.com/freedomofpress/securedrop-client/blob/d0d49fa01c76fbd3019a21a49abcc8f03ba4276b/.github/workflows/sdk.yml#L43

Fixes #1999.
legoktm added a commit that referenced this issue May 28, 2024
We just need a tool to wait until the HTTP service is working,
and it turns out we can use curl for that by running it in a
one-line bash loop, avoiding the need to download and extract
dockerize.

This approach was inspired by the securedrop.org repository CI.[1]

[1] https://github.com/freedomofpress/securedrop.org/blob/6df3cd790a8cdc7409585c30813d01a5f6a5c37c/.circleci/config.yml#L59

Fixes #1999.
@legoktm legoktm self-assigned this May 28, 2024
micahflee pushed a commit that referenced this issue May 29, 2024
We just need a tool to wait until the HTTP service is working,
and it turns out we can use curl for that by running it in a
one-line bash loop, avoiding the need to download and extract
dockerize.

This approach was inspired by the securedrop.org repository CI.[1]

[1] https://github.com/freedomofpress/securedrop.org/blob/6df3cd790a8cdc7409585c30813d01a5f6a5c37c/.circleci/config.yml#L59

Fixes #1999.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚙️ Tooling Improving maintainability and increasing maintainer joy : )
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant