devbox icon indicating copy to clipboard operation
devbox copied to clipboard

question: devbox in CI

Open tuananh opened this issue 1 year ago • 4 comments

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

tuananh avatar Jan 12 '24 07:01 tuananh

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

Lagoja avatar Jan 17 '24 22:01 Lagoja

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 ?

savil avatar Jan 26 '24 23:01 savil

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.

tuananh avatar Jan 29 '24 04:01 tuananh

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

savil avatar Jan 30 '24 19:01 savil