public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH 1/2] CI: install avocado in venv if host does not have it
@ 2021-10-19 10:05 Henning Schild
  2021-10-19 10:05 ` [PATCH 2/2] CI: export avocado junit as gitlab report Henning Schild
  2021-10-19 10:09 ` [PATCH 1/2] CI: install avocado in venv if host does not have it Henning Schild
  0 siblings, 2 replies; 6+ messages in thread
From: Henning Schild @ 2021-10-19 10:05 UTC (permalink / raw)
  To: isar-users; +Cc: Henning Schild

Avodaco can not be properly depended on since it is not packaged in
debian. It just comes via pip.
On hosts that do not have it, let us use a virtualenv and expect they
will be debian based and allow us to sudo. Which works well for the
kas-isar container most people probably care about.

Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
 scripts/ci_build.sh | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/scripts/ci_build.sh b/scripts/ci_build.sh
index 4534957de1ac..74d190781249 100755
--- a/scripts/ci_build.sh
+++ b/scripts/ci_build.sh
@@ -14,6 +14,16 @@ export PATH=$PATH:/sbin
 # Go to Isar root
 cd "$(dirname "$0")/.."
 
+# install avocado in virtualenv in case it is not there already
+if ! command -v avocado > /dev/null; then
+    sudo apt-get update -qq
+    sudo apt-get install -y virtualenv
+    rm -rf /tmp/avocado_venv
+    virtualenv --python python3 /tmp/avocado_venv
+    source /tmp/avocado_venv/bin/activate
+    pip install subprocess32 avocado-framework-plugin-varianter-yaml-to-mux
+fi
+
 # Get Avocado build tests path
 BUILD_TEST_DIR="$(pwd)/testsuite/build_test"
 
-- 
2.32.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 2/2] CI: export avocado junit as gitlab report
  2021-10-19 10:05 [PATCH 1/2] CI: install avocado in venv if host does not have it Henning Schild
@ 2021-10-19 10:05 ` Henning Schild
  2021-10-19 10:10   ` Henning Schild
  2021-10-19 10:09 ` [PATCH 1/2] CI: install avocado in venv if host does not have it Henning Schild
  1 sibling, 1 reply; 6+ messages in thread
From: Henning Schild @ 2021-10-19 10:05 UTC (permalink / raw)
  To: isar-users; +Cc: Henning Schild

Having the artifact as "report" makes sure we get nice rendering in the
gitlab web UI. For that to really work we want the artifacts no matter what
the return will be.

Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
 .gitlab-ci.yml | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index fad42102be89..1693a8ab4037 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -16,7 +16,10 @@ variables:
     paths:
       - build/tmp/work/*/*/*/temp
       - build/job-results
-    when: on_failure
+    reports:
+      junit:
+        - build/job-results/job*/results.xml
+    when: always
     expire_in: 1 week
 
 fast-ci:
-- 
2.32.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] CI: install avocado in venv if host does not have it
  2021-10-19 10:05 [PATCH 1/2] CI: install avocado in venv if host does not have it Henning Schild
  2021-10-19 10:05 ` [PATCH 2/2] CI: export avocado junit as gitlab report Henning Schild
@ 2021-10-19 10:09 ` Henning Schild
  2021-10-19 14:53   ` Baurzhan Ismagulov
  1 sibling, 1 reply; 6+ messages in thread
From: Henning Schild @ 2021-10-19 10:09 UTC (permalink / raw)
  To: isar-users

This should repair gitlab CI, at least the "fast" path does start
again. The "full" path was not tested.

Please feel free to take over and adjust as needed. I think the repair
should happen rather quickly, so no need to wait for me to provide a v2
for potentially minor problems.

Henning 

Am Tue, 19 Oct 2021 12:05:14 +0200
schrieb Henning Schild <henning.schild@siemens.com>:

> Avodaco can not be properly depended on since it is not packaged in
> debian. It just comes via pip.
> On hosts that do not have it, let us use a virtualenv and expect they
> will be debian based and allow us to sudo. Which works well for the
> kas-isar container most people probably care about.
> 
> Signed-off-by: Henning Schild <henning.schild@siemens.com>
> ---
>  scripts/ci_build.sh | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/scripts/ci_build.sh b/scripts/ci_build.sh
> index 4534957de1ac..74d190781249 100755
> --- a/scripts/ci_build.sh
> +++ b/scripts/ci_build.sh
> @@ -14,6 +14,16 @@ export PATH=$PATH:/sbin
>  # Go to Isar root
>  cd "$(dirname "$0")/.."
>  
> +# install avocado in virtualenv in case it is not there already
> +if ! command -v avocado > /dev/null; then
> +    sudo apt-get update -qq
> +    sudo apt-get install -y virtualenv
> +    rm -rf /tmp/avocado_venv
> +    virtualenv --python python3 /tmp/avocado_venv
> +    source /tmp/avocado_venv/bin/activate
> +    pip install subprocess32
> avocado-framework-plugin-varianter-yaml-to-mux +fi
> +
>  # Get Avocado build tests path
>  BUILD_TEST_DIR="$(pwd)/testsuite/build_test"
>  


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] CI: export avocado junit as gitlab report
  2021-10-19 10:05 ` [PATCH 2/2] CI: export avocado junit as gitlab report Henning Schild
@ 2021-10-19 10:10   ` Henning Schild
  0 siblings, 0 replies; 6+ messages in thread
From: Henning Schild @ 2021-10-19 10:10 UTC (permalink / raw)
  To: isar-users

This most likely works ... can tell in about two hours. Feel free to
apply p1 and leave that one open in case a quick fix is wanted.

Henning

Am Tue, 19 Oct 2021 12:05:15 +0200
schrieb Henning Schild <henning.schild@siemens.com>:

> Having the artifact as "report" makes sure we get nice rendering in
> the gitlab web UI. For that to really work we want the artifacts no
> matter what the return will be.
> 
> Signed-off-by: Henning Schild <henning.schild@siemens.com>
> ---
>  .gitlab-ci.yml | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
> index fad42102be89..1693a8ab4037 100644
> --- a/.gitlab-ci.yml
> +++ b/.gitlab-ci.yml
> @@ -16,7 +16,10 @@ variables:
>      paths:
>        - build/tmp/work/*/*/*/temp
>        - build/job-results
> -    when: on_failure
> +    reports:
> +      junit:
> +        - build/job-results/job*/results.xml
> +    when: always
>      expire_in: 1 week
>  
>  fast-ci:


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] CI: install avocado in venv if host does not have it
  2021-10-19 10:09 ` [PATCH 1/2] CI: install avocado in venv if host does not have it Henning Schild
@ 2021-10-19 14:53   ` Baurzhan Ismagulov
  2021-10-19 17:19     ` Henning Schild
  0 siblings, 1 reply; 6+ messages in thread
From: Baurzhan Ismagulov @ 2021-10-19 14:53 UTC (permalink / raw)
  To: isar-users

On Tue, Oct 19, 2021 at 12:09:25PM +0200, Henning Schild wrote:
> Please feel free to take over and adjust as needed. I think the repair
> should happen rather quickly, so no need to wait for me to provide a v2
> for potentially minor problems.

Didn't work in our GitLab, taking over.

With kind regards,
Baurzhan.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] CI: install avocado in venv if host does not have it
  2021-10-19 14:53   ` Baurzhan Ismagulov
@ 2021-10-19 17:19     ` Henning Schild
  0 siblings, 0 replies; 6+ messages in thread
From: Henning Schild @ 2021-10-19 17:19 UTC (permalink / raw)
  To: Baurzhan Ismagulov; +Cc: isar-users

Am Tue, 19 Oct 2021 16:53:31 +0200
schrieb Baurzhan Ismagulov <ibr@radix50.net>:

> On Tue, Oct 19, 2021 at 12:09:25PM +0200, Henning Schild wrote:
> > Please feel free to take over and adjust as needed. I think the
> > repair should happen rather quickly, so no need to wait for me to
> > provide a v2 for potentially minor problems.  
> 
> Didn't work in our GitLab, taking over.

Did not work on ours either. Running into the "FileNotFoundError:"
messages Adriaan also encountered.

but p2 seems to work ... for what it is worth

Thanks for taking over!
Henning

> With kind regards,
> Baurzhan.
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-10-19 17:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-19 10:05 [PATCH 1/2] CI: install avocado in venv if host does not have it Henning Schild
2021-10-19 10:05 ` [PATCH 2/2] CI: export avocado junit as gitlab report Henning Schild
2021-10-19 10:10   ` Henning Schild
2021-10-19 10:09 ` [PATCH 1/2] CI: install avocado in venv if host does not have it Henning Schild
2021-10-19 14:53   ` Baurzhan Ismagulov
2021-10-19 17:19     ` Henning Schild

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox