* [PATCH] gitlab: compare CIRRUS_nn vars against 'null' not ""
@ 2022-06-08 16:06 Daniel P. Berrangé
2022-06-08 16:57 ` Richard Henderson
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Daniel P. Berrangé @ 2022-06-08 16:06 UTC (permalink / raw)
To: qemu-devel
Cc: Alex Bennée, Beraldo Leal, Thomas Huth, Richard Henderson,
Philippe Mathieu-Daudé, Wainer dos Santos Moschetta,
Daniel P. Berrangé
The GitLab variable comparisons don't have shell like semantics where
an unset variable compares equal to empty string. We need to explicitly
test against 'null' to detect an unset variable.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
.gitlab-ci.d/base.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.gitlab-ci.d/base.yml b/.gitlab-ci.d/base.yml
index f334f3ded7..69b36c148a 100644
--- a/.gitlab-ci.d/base.yml
+++ b/.gitlab-ci.d/base.yml
@@ -13,7 +13,7 @@
#############################################################
# Cirrus jobs can't run unless the creds / target repo are set
- - if: '$QEMU_JOB_CIRRUS && ($CIRRUS_GITHUB_REPO == "" || $CIRRUS_API_TOKEN == "")'
+ - if: '$QEMU_JOB_CIRRUS && ($CIRRUS_GITHUB_REPO == null || $CIRRUS_API_TOKEN == null)'
when: never
# Publishing jobs should only run on the default branch in upstream
--
2.36.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] gitlab: compare CIRRUS_nn vars against 'null' not ""
2022-06-08 16:06 [PATCH] gitlab: compare CIRRUS_nn vars against 'null' not "" Daniel P. Berrangé
@ 2022-06-08 16:57 ` Richard Henderson
2022-06-09 6:28 ` Thomas Huth
2022-06-09 11:08 ` Alex Bennée
2 siblings, 0 replies; 4+ messages in thread
From: Richard Henderson @ 2022-06-08 16:57 UTC (permalink / raw)
To: Daniel P. Berrangé, qemu-devel
Cc: Alex Bennée, Beraldo Leal, Thomas Huth,
Philippe Mathieu-Daudé, Wainer dos Santos Moschetta
On 6/8/22 09:06, Daniel P. Berrangé wrote:
> The GitLab variable comparisons don't have shell like semantics where
> an unset variable compares equal to empty string. We need to explicitly
> test against 'null' to detect an unset variable.
>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
> .gitlab-ci.d/base.yml | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/.gitlab-ci.d/base.yml b/.gitlab-ci.d/base.yml
> index f334f3ded7..69b36c148a 100644
> --- a/.gitlab-ci.d/base.yml
> +++ b/.gitlab-ci.d/base.yml
> @@ -13,7 +13,7 @@
> #############################################################
>
> # Cirrus jobs can't run unless the creds / target repo are set
> - - if: '$QEMU_JOB_CIRRUS && ($CIRRUS_GITHUB_REPO == "" || $CIRRUS_API_TOKEN == "")'
> + - if: '$QEMU_JOB_CIRRUS && ($CIRRUS_GITHUB_REPO == null || $CIRRUS_API_TOKEN == null)'
> when: never
>
> # Publishing jobs should only run on the default branch in upstream
Tested-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] gitlab: compare CIRRUS_nn vars against 'null' not ""
2022-06-08 16:06 [PATCH] gitlab: compare CIRRUS_nn vars against 'null' not "" Daniel P. Berrangé
2022-06-08 16:57 ` Richard Henderson
@ 2022-06-09 6:28 ` Thomas Huth
2022-06-09 11:08 ` Alex Bennée
2 siblings, 0 replies; 4+ messages in thread
From: Thomas Huth @ 2022-06-09 6:28 UTC (permalink / raw)
To: Daniel P. Berrangé, qemu-devel
Cc: Alex Bennée, Beraldo Leal, Richard Henderson,
Philippe Mathieu-Daudé, Wainer dos Santos Moschetta
On 08/06/2022 18.06, Daniel P. Berrangé wrote:
> The GitLab variable comparisons don't have shell like semantics where
> an unset variable compares equal to empty string. We need to explicitly
> test against 'null' to detect an unset variable.
>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
> .gitlab-ci.d/base.yml | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/.gitlab-ci.d/base.yml b/.gitlab-ci.d/base.yml
> index f334f3ded7..69b36c148a 100644
> --- a/.gitlab-ci.d/base.yml
> +++ b/.gitlab-ci.d/base.yml
> @@ -13,7 +13,7 @@
> #############################################################
>
> # Cirrus jobs can't run unless the creds / target repo are set
> - - if: '$QEMU_JOB_CIRRUS && ($CIRRUS_GITHUB_REPO == "" || $CIRRUS_API_TOKEN == "")'
> + - if: '$QEMU_JOB_CIRRUS && ($CIRRUS_GITHUB_REPO == null || $CIRRUS_API_TOKEN == null)'
> when: never
>
> # Publishing jobs should only run on the default branch in upstream
Reviewed-by: Thomas Huth <thuth@redhat.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] gitlab: compare CIRRUS_nn vars against 'null' not ""
2022-06-08 16:06 [PATCH] gitlab: compare CIRRUS_nn vars against 'null' not "" Daniel P. Berrangé
2022-06-08 16:57 ` Richard Henderson
2022-06-09 6:28 ` Thomas Huth
@ 2022-06-09 11:08 ` Alex Bennée
2 siblings, 0 replies; 4+ messages in thread
From: Alex Bennée @ 2022-06-09 11:08 UTC (permalink / raw)
To: Daniel P. Berrangé
Cc: qemu-devel, Beraldo Leal, Thomas Huth, Richard Henderson,
Philippe Mathieu-Daudé, Wainer dos Santos Moschetta
Daniel P. Berrangé <berrange@redhat.com> writes:
> The GitLab variable comparisons don't have shell like semantics where
> an unset variable compares equal to empty string. We need to explicitly
> test against 'null' to detect an unset variable.
>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Queued to testing/next, thanks.
--
Alex Bennée
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-06-09 13:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-08 16:06 [PATCH] gitlab: compare CIRRUS_nn vars against 'null' not "" Daniel P. Berrangé
2022-06-08 16:57 ` Richard Henderson
2022-06-09 6:28 ` Thomas Huth
2022-06-09 11:08 ` Alex Bennée
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).