You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
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.
A simple solution for CI operators is to cd to root within their CI scripts before executing eib.
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.
The text was updated successfully, but these errors were encountered: