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

ci: improve scripts for local development #188

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tommilligan
Copy link
Contributor

I picked up this repo recently to work on while commuting, when I'm often offline. This PR implements some tidyups I found useful.

Support offline test running

Currently cargo make test will fail if you're offline, as it will always attempt to pull the remote docker image.

This PR implements the environment variable DOCKER_PULL_ATTEMPTS to make this optional:

DOCKER_PULL_ATTEMPTS=0 STACK_VERSION=7.14.0 cargo make test

Dump logs for shutdown/errored containers

My test elasticsearch instance failed to start (I was running an older version, 7.10.0, which wasn't supported). This was opaque to debug as the container is instantly deleted on shutdown (docker run --rm).

This PR implements always dumping logging from the elasticsearch instance. It does this by not deleting the container automatically, and instead deleting it explicitly after dumping logs. Previous containers also deleted if found by the next test run.

Please note that the impact of this is that some containers may still be left from the test run on the user's system. I believe this is desirable anyway for inspection after failure.

@elasticmachine
Copy link
Collaborator

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

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.

2 participants