ryan
04/07/2023, 5:09 AMupdate --force
script within Jenkins Windows Batch.
I will show an example of the issue in this thread to save public real estate.ryan
04/07/2023, 5:12 AMD:\websites\client\staging\source>d:
D:\websites\client\staging\source>cd D:\websites\client\staging\commandbox
D:\websites\client\staging\commandbox>box
______ ______
/ ____/___ ____ ___ ____ ___ ____ _____ ____/ / __ )____ _ __
/ / / __ \/ __ `__ \/ __ `__ \/ __ `/ __ \/ __ / __ / __ \| |/_/
/ /___/ /_/ / / / / / / / / / / / /_/ / / / / /_/ / /_/ / /_/ /> <
\____/\____/_/ /_/ /_/_/ /_/ /_/\__,_/_/ /_/\__,_/_____/\____/_/|_| (R) v5.8.0+00695
Tomorrow will have highs in the mid 70's and a 30% chance of rain
Welcome to CommandBox!
CommandBox> [38;5;2m[1mGoodbye![0m
D:\websites\client\staging\commandbox>box cd ../source
D:\websites\client\staging\source\
D:\websites\client\staging\commandbox>box update --force
[38;5;15m[48;5;9mERROR (5.8.0+00695)[0m
[38;5;9m[1mD:\websites\client\staging\commandbox\ is not a package![0m
[38;5;9m[1m[0m
D:\websites\client\staging\commandbox>exit 1
Build step 'Execute Windows batch command' marked build as failure
Finished: FAILURE
ryan
04/07/2023, 5:16 AMbox
on its own, hoping that it would maybe remain in its own environment, in which I can then cd the path to point to the box.json, but it can't seem to do that in this sandboxed jenkins windows command environment.ryan
04/07/2023, 5:43 AMD:\websites\client\staging\commandbox\box -cliworkingdir ../source update
bdw429s
04/07/2023, 1:03 PMbdw429s
04/07/2023, 1:04 PMbdw429s
04/07/2023, 1:04 PMbdw429s
04/07/2023, 1:07 PMbdw429s
04/07/2023, 1:07 PMbdw429s
04/07/2023, 1:18 PMIf I specify the path to box.json, then the script will not be able to execute box.exe since box.exe is not located in the same place as box.json.
Also, that sentence makes no sense. You can simply run box install from the folder containing box.json and just use the full path to box.exe if you don't have a path env var.
ryan
04/07/2023, 3:28 PMcd
to the box.exe path. In doing so, I was originally unable to figure out a way to have box.exe know where box.json lives because I'm already using the path to point to box.exe.
However, the -cliworkingdir
parameter for box.exe is exactly what I needed in order to solve it and have the executable understand where the box.json file lives in order to process it.