Closed vincentbernat closed 7 months ago
Hi Vincent This comes to me as a limitation of this action. Fine tuning the entropion per each CI service is not a practical approach.
A few options to consider that easily solve this: 1 Use containerlab 2 build an image with a custom entry point per you need
GitHub requires images to be publicly available to be used as a service, this makes it difficult to build an image with a custom entry point (I would have to push it to a registry, making it difficult to run from pull requests that are not mine). There is an open discussion about customizing the command, but it seems to be stuck as most images have a default command that run the service.
What about a second tag with "-ci" appended to it that would override the command? BTW, you could also add an healthcheck:
FROM ghcr.io/nokia/srlinux:23.7.1
CMD /opt/srlinux/bin/sr_linux
HEALTHCHECK --interval=5s CMD test -f /etc/opt/srlinux/devices/app_ephemeral.mgmt_server.ready_for_config
As for using containerlab, it seems to be an nth rabbit hole to dig just to be able to test a gNMI implementation.
You can build an image with a custom entry point and push it to your gh registry as a public image.
Or leverage containerlab. It very well may be that you're spending 10x more time trying to deal with gh actions way than running containerlab.
Health check is a universally good idea 👍
Hey!
I am trying to use SR Linux as part of GitHub actions:
Unfortunately, there is no way to specify a command and the default one for the image is
/bin/bash
. We can specify the entrypoint, but it needs to be a command without arguments. If I pass just--entrypoint=/opt/srlinux/bin/sr_linux
I don't get the network configuration. The command executed by GitHub is:Maybe the entrypoint could execute
/opt/srlinux/bin/sr_linux
when it detectsGITHUB_ACTIONS=true
?