Skip to content

Integrate gitlab-ci/run-test-from-gitlab-directly

Commit: seco-ne/yocto/infrastructure/gitlab-ci@ab09db0b

CI: Lava Test: Allow to install test image directly from gitlab

The images from the build job can be directly installed from gitlab. To achive this some changes in the complete pipeline have been needed.

  1. The variables used in the build job, like CI_PARAM_IMAGE, ... and related variables like BUILDPATH are only valid in the build job now.
  2. The build job writes every variable needed in a follow up job into build.env. This also includes the url to the fng-install.sh of the final image.
  3. The build.env file is used as dotenv artifact, as well as normal file artifact. The dotenv make the written variables automatically available in follow up jobs, that are using the aritfacts, like the deploy job. The normal file artifact is available via artifact download. (I did't found a way to download the dotenv file instead)
  4. Some scripts have been added:
    • Find a job inside the pipeline by name, as the id is not known in advance.
    • Download all artifacts or one file of the artifacts from a given job
    • Download one file of the latest job by name
  5. The scripts are used to download the build.env into the test job (where not artifacts are needed anymore)
  6. The script is sourced and all variables are available inside the script.

Additionally this adds a fake build job to the ci-test pipeline, that copies an image from srv73 and stores it as artifact in a way that a test-job can run on it, like in the normal yocto pipeline.

Merge request reports