Message ID | 20230522174153.46801-4-cconte@redhat.com |
---|---|
State | New |
Headers | show |
Series | [v2,1/5] Remove redundant CI variables | expand |
On Mon, May 22, 2023 at 06:41:52PM +0100, Camilla Conte wrote: > Wait for docker info to return successfuly to ensure that > the docker server (daemon) started. > This is needed for jobs running on Kubernetes. > See https://wiki.qemu.org/Testing/CI/KubernetesRunners. > > Signed-off-by: Camilla Conte <cconte@redhat.com> > --- > .gitlab-ci.d/container-template.yml | 2 +- > .gitlab-ci.d/opensbi.yml | 1 + > 2 files changed, 2 insertions(+), 1 deletion(-) Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> With regards, Daniel
On 5/22/23 10:41, Camilla Conte wrote:
> + - until docker info; do sleep 1; done
How long are you expecting this to have to wait?
Less than 5 seconds?
r~
On Tue, May 23, 2023 at 2:06 PM Richard Henderson <richard.henderson@linaro.org> wrote: > > On 5/22/23 10:41, Camilla Conte wrote: > > + - until docker info; do sleep 1; done > > How long are you expecting this to have to wait? > Less than 5 seconds? I remember seeing jobs where it took longer than five seconds, but I can't find them at the moment. I guess you wish the "until" loop to fail sooner, rather than having to wait for the whole job timing out. What about setting a five seconds timeout for the loop and raise it later if we see jobs failing? > > > r~ >
diff --git a/.gitlab-ci.d/container-template.yml b/.gitlab-ci.d/container-template.yml index 11569dd900..9ac4a0ee25 100644 --- a/.gitlab-ci.d/container-template.yml +++ b/.gitlab-ci.d/container-template.yml @@ -8,8 +8,8 @@ - export TAG="$CI_REGISTRY_IMAGE/qemu/$NAME:latest" - export COMMON_TAG="$CI_REGISTRY/qemu-project/qemu/qemu/$NAME:latest" - apk add python3 - - docker info - docker login $CI_REGISTRY -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" + - until docker info; do sleep 1; done script: - echo "TAG:$TAG" - echo "COMMON_TAG:$COMMON_TAG" diff --git a/.gitlab-ci.d/opensbi.yml b/.gitlab-ci.d/opensbi.yml index 13070575b6..2e9d51764e 100644 --- a/.gitlab-ci.d/opensbi.yml +++ b/.gitlab-ci.d/opensbi.yml @@ -50,6 +50,7 @@ docker-opensbi: IMAGE_TAG: $CI_REGISTRY_IMAGE:opensbi-cross-build before_script: - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY + - until docker info; do sleep 1; done script: - docker pull $IMAGE_TAG || true - docker build --cache-from $IMAGE_TAG --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
Wait for docker info to return successfuly to ensure that the docker server (daemon) started. This is needed for jobs running on Kubernetes. See https://wiki.qemu.org/Testing/CI/KubernetesRunners. Signed-off-by: Camilla Conte <cconte@redhat.com> --- .gitlab-ci.d/container-template.yml | 2 +- .gitlab-ci.d/opensbi.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)