diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 53e9fd6294baf8c07d19bc30ab8e1201f24c97b1..a1737c5f6b78305e7b4b7895355aa15e7bfabe68 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -152,6 +152,9 @@ lava-zephyr-96b-nitrogen-tests: CI_LAVA_JOB_DEFINITION: "https://git.ostc-eu.org/OSTC/infrastructure/lava/lava-config/-/raw/master/lava.ostc-eu.org/job-definitions/ci/nitrogen-test.yaml" CI_BUILD_JOB_NAME: zephyr-96b-nitrogen-tests CI_REPORT_JOB_NAME: lava-report + rules: + - if: '$CI_LAVA_TOKEN == ""' + when: never lava-report: needs: [lava-linux-avenger96, lava-qemu-x86_64, lava-qemu-x86] diff --git a/.oniro-ci/test-generic.yaml b/.oniro-ci/test-generic.yaml index 5101bb8021b961585dc0ea648a9202ff03916c80..6536b93f90349ee4613018cbb3866e3d0c3864da 100644 --- a/.oniro-ci/test-generic.yaml +++ b/.oniro-ci/test-generic.yaml @@ -8,7 +8,12 @@ interruptible: true image: name: registry.ostc-eu.org/ostc/containers/ostc-builder:latest + variables: + CI_LAVA_INSTANCE: "https://lava.ostc-eu.org/" before_script: + - test -n "$CI_LAVA_TOKEN" || ( + echo "precondition failed - please disable the child job if CI_LAVA_TOKEN not set in gitlab CI/CD variables" + && exit 1 ) # Check if the job is configured properly. - test -n "$CI_LAVA_JOB_DEFINITION" || ( echo "precondition failed - set CI_LAVA_JOB_DEFINITION to the URL of the LAVA test job definition" @@ -77,6 +82,8 @@ image: name: registry.ostc-eu.org/ostc/containers/ostc-builder:latest stage: report + variables: + CI_LAVA_INSTANCE: "https://lava.ostc-eu.org/" script: - | for file in $(find ./ -name "job_ids_*.txt"); do