Regenerate TLS certificates after docker machine resumes
After the system reboots, the docker machine is created, but in a stopped state. As stated in the docker docs, you might get errors when attempting to connect to a machine or pull an image from Docker Hub. For instance, Error checking TLS connection: ... The solution is to regenerate TLS certificates of docker machine after machine resums. Change-Id: I8781ac0f0790aeda6cc778aee9c44d03c2b788d3 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
parent
698078680f
commit
481db443d5
@ -154,12 +154,14 @@ isEmpty(TESTSERVER_VERSION) {
|
|||||||
MACHINE_STATE_CMD = \
|
MACHINE_STATE_CMD = \
|
||||||
docker-machine ls -q --filter "State=Running" --filter "Name=^qt-test-server\$\$"
|
docker-machine ls -q --filter "State=Running" --filter "Name=^qt-test-server\$\$"
|
||||||
MACHINE_START_CMD = docker-machine start qt-test-server
|
MACHINE_START_CMD = docker-machine start qt-test-server
|
||||||
|
MACHINE_RECERT = docker-machine regenerate-certs -f qt-test-server
|
||||||
PowerShell {
|
PowerShell {
|
||||||
testserver_pretest.commands += \
|
testserver_pretest.commands += \
|
||||||
$$TEST_CMD if (!($$MACHINE_STATE_CMD)) {$$MACHINE_START_CMD} &&
|
$$TEST_CMD if (!($$MACHINE_STATE_CMD)) {$$MACHINE_START_CMD; $$MACHINE_RECERT} &&
|
||||||
} else {
|
} else {
|
||||||
testserver_pretest.commands += \
|
testserver_pretest.commands += \
|
||||||
$(if $(shell $$MACHINE_STATE_CMD),,$(shell $$MACHINE_START_CMD > /dev/null))
|
$(if $(shell $$MACHINE_STATE_CMD),,\
|
||||||
|
$(shell $$MACHINE_START_CMD > /dev/null && $$MACHINE_RECERT > /dev/null))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user