-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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] Fix docker pull from internal registry #17683
Comments
I think |
I think https://golang.org/pkg/os/exec ignores de environment variables defined on the parent environment, because of that HOME is incorrect and the Docker credentials are not defined. |
I had to do a little hunting to understand why the docker login was required. IIUC the integration tests for Metricbeat that run when TEST_TAGS=oracle require a non-public image. The integrations tests that are using beats/x-pack/metricbeat/docker-compose.yml Lines 4 to 14 in 6160e20
$ git diff .
diff --git a/x-pack/metricbeat/docker-compose.yml b/x-pack/metricbeat/docker-compose.yml
index c89b55860..83ac016ff 100644
--- a/x-pack/metricbeat/docker-compose.yml
+++ b/x-pack/metricbeat/docker-compose.yml
@@ -10,6 +10,7 @@ services:
volumes:
- ${PWD}/../..:/go/src/github.com/elastic/beats/
- /var/run/docker.sock:/var/run/docker.sock
+ - ${HOME}/.docker:/root/.docker:ro
network_mode: host
command: make And since it's only x-pack/metricbeat's integration tests requiring this maybe it's best to only do the dockerLogin from that particular stage? |
Couchbase needs to login too and more will come sure. |
I have to tested it but this add the credentials to the metricbeat Docker container, Do the metricbeat Docker container build the Oracle image for the tests? |
Yes, I believe docker-compose starts this service on demand when the test asks for it. And the test is running inside of a container. |
if we make a
docker pull
we can pull the image but the commandcd x-pack/metricbeat; mage update build test
cannot pull the image. We have to find why and fix it.When we fix the issue we can remove the workaround from the Jenkinsfile.
related to #17620
The text was updated successfully, but these errors were encountered: