jetify-com / devbox

Instant, easy, and predictable development environments
https://www.jetify.com/devbox/
Apache License 2.0
7.94k stars 191 forks source link

question: devbox in CI #1725

Open tuananh opened 6 months ago

tuananh commented 6 months ago

we're a jenkins shop and we would like to adopt devbox here for CI.

currently, we have a bunch of sh script block like this


sh"""
  commandA
  commandB
"""

when using devbox, we have to convert those to this. we would prefer not having to do this.

sh"""
  devbox run -- commandA
  devbox run -- commandB
"""

we tried to use devbox shell but getting error like this. Not sure is this Jenkins specific behavior or we cannot use devbox shell in non-interactive terminal?

Starting a devbox shell...
xxxxx@tmp/durable-0045aaeb/script.sh: line 9: commandA: command not found
Lagoja commented 6 months ago

@tuananh can you share an example of the devbox.json you are using?

savil commented 5 months ago

For the original shell script:

sh"""
  commandA
  commandB
"""

Lets say it is in run.sh file.

Can you try running devbox run -- /bin/sh run.sh ?

tuananh commented 5 months ago

For the original shell script:

sh"""
  commandA
  commandB
"""

Lets say it is in run.sh file.

Can you try running devbox run -- /bin/sh run.sh ?

it works in that case.

savil commented 5 months ago

@tuananh great. Does that resolve the issue for you? If so, we can close this issue.