Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Note in user guide on EIB looking for artifacts.yaml in relative path #521

Open
fdegir opened this issue Aug 5, 2024 · 0 comments
Open
Labels
documentation Improvements or additions to documentation triaged The team has reviewed the issue

Comments

@fdegir
Copy link
Contributor

fdegir commented Aug 5, 2024

While testing EIB 1.1.0 RC1 in CI, we noticed that EIB looks for artifacts.yaml in the relative path. This works when the container is run from console using podman run however it fails to find artifacts.yaml if the container is run by CI and the eib is used from within the container.

The reason for this is that (some) CI orchestrators such as GitLab runs the container and then attaches to it to execute subsequent commands. When the orchestrator does this, the current working directory is set to the root of the CI repo that’s cloned into the container by the orchestrator. The orchestrator then executes eib binary from within that directory, causing EIB to throw an error due to not finding artifacts.yaml file in the relative path which might become an issue to troubleshot and fix.

$ pwd
/builds/edge-engineering/stack-validation
$ eib build --config-dir ${CI_PROJECT_DIR}/eib-temp --definition-file eib.yaml
Loading artifact sources metadata failed. Please check the eib-build.log file under the build directory for more information.
...

A simple solution for CI operators is to cd to root within their CI scripts before executing eib.

$ pwd
/builds/edge-engineering/stack-validation
$ cd / && eib build --config-dir ${CI_PROJECT_DIR}/eib-temp --definition-file eib.yaml
SELinux is enabled in the Kubernetes configuration. The necessary RPM packages will be downloaded.
...

There may be other users running EIB in their CI that behaves similar to GitLab and it would be beneficial to add a note about this behavior for the users in user guide and/or examples.

@jdob jdob changed the title [RFE] Note in user guide on EIB looking for artifacts.yaml in relative path Note in user guide on EIB looking for artifacts.yaml in relative path Aug 16, 2024
@jdob jdob added documentation Improvements or additions to documentation triaged The team has reviewed the issue labels Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation triaged The team has reviewed the issue
Projects
None yet
Development

No branches or pull requests

2 participants