* add v to version if it does not have a leading v
Signed-off-by: kpenfound <kyle@dagger.io>
* test version without the v
Signed-off-by: kpenfound <kyle@dagger.io>
---------
Signed-off-by: kpenfound <kyle@dagger.io>
* avoid overwriting existing dagger install unless force-install is true
Signed-off-by: kpenfound <kyle@dagger.io>
* add force-install to version tests
Signed-off-by: kpenfound <kyle@dagger.io>
* only skip install if we requested the same version that we already had
Signed-off-by: kpenfound <kyle@dagger.io>
* fix dagger check logic
Signed-off-by: kpenfound <kyle@dagger.io>
* remove incorrect and unused default for engine-stop
Signed-off-by: kpenfound <kyle@dagger.io>
* add tests for commit and latest
Signed-off-by: kpenfound <kyle@dagger.io>
* wrong commit in commit test
Signed-off-by: kpenfound <kyle@dagger.io>
---------
Signed-off-by: kpenfound <kyle@dagger.io>
* add options for shell
Signed-off-by: kpenfound <kyle@dagger.io>
assemble dagger command in new step with output
Signed-off-by: kpenfound <kyle@dagger.io>
fixing some inline bash
Signed-off-by: kpenfound <kyle@dagger.io>
wrap conditional inputs in quotes
Signed-off-by: kpenfound <kyle@dagger.io>
use cat for heredoc script file
Signed-off-by: kpenfound <kyle@dagger.io>
missing space in heredoc
Signed-off-by: kpenfound <kyle@dagger.io>
add tab ignore and dagger shebang
Signed-off-by: kpenfound <kyle@dagger.io>
use toJson and jq to safely write the shell input to a file
Signed-off-by: kpenfound <kyle@dagger.io>
put DAGGER_COMMAND in a variable
Signed-off-by: kpenfound <kyle@dagger.io>
missing semicolon for the dagger command
Signed-off-by: kpenfound <kyle@dagger.io>
safely evaluate if shell is set
Signed-off-by: kpenfound <kyle@dagger.io>
extra > in shell file write
Signed-off-by: kpenfound <kyle@dagger.io>
add some logging
Signed-off-by: kpenfound <kyle@dagger.io>
strip extra newline from jq when shell is not set
Signed-off-by: kpenfound <kyle@dagger.io>
debugging
Signed-off-by: kpenfound <kyle@dagger.io>
toJSON and jq will send null instead of empty string with no input
Signed-off-by: kpenfound <kyle@dagger.io>
safely handle all inputs
Signed-off-by: kpenfound <kyle@dagger.io>
did i fix the wrong thing?
Signed-off-by: kpenfound <kyle@dagger.io>
change up the approach a bit for an easier diff
Signed-off-by: kpenfound <kyle@dagger.io>
fix shell test
Signed-off-by: kpenfound <kyle@dagger.io>
single quotes around shell input
Signed-off-by: kpenfound <kyle@dagger.io>
try with piped input
Signed-off-by: kpenfound <kyle@dagger.io>
try single quotes again
Signed-off-by: kpenfound <kyle@dagger.io>
debug
Signed-off-by: kpenfound <kyle@dagger.io>
debug
Signed-off-by: kpenfound <kyle@dagger.io>
fix shell test
Signed-off-by: kpenfound <kyle@dagger.io>
does shell emit a newline?
Signed-off-by: kpenfound <kyle@dagger.io>
remove the trailing newline if its in stdout
Signed-off-by: kpenfound <kyle@dagger.io>
break the trailing output test
Signed-off-by: kpenfound <kyle@dagger.io>
fix shell test
Signed-off-by: kpenfound <kyle@dagger.io>
missed !
Signed-off-by: kpenfound <kyle@dagger.io>
add comment about weird test
Signed-off-by: kpenfound <kyle@dagger.io>
* use echo -n in shell test
Signed-off-by: kpenfound <kyle@dagger.io>
---------
Signed-off-by: kpenfound <kyle@dagger.io>
* test: add versioning tests
Signed-off-by: Justin Chadwell <me@jedevc.com>
* feat: add output for action
To chain on from the github action, it's very useful to be able to get
the output from an action.
Signed-off-by: Justin Chadwell <me@jedevc.com>
---------
Signed-off-by: Justin Chadwell <me@jedevc.com>
* fix(ux): increase readability of install step
The official github self-hosted action container does not include curl in the OS
but because the `curl` command in the GH Action's install step redirects stderr
to /dev/null, it was hard to determine that.
As part of my Dagger interview, @gerhard and I investigated and found that issue.
We changed the `curl` flags from `-sL` to `-fsS` to be more verbose with the
error reporting and remove following redirects, as the move to Cloudfront
obviated the need for that flag.
We also removed the subshell in the install step at the end because it was not
needed and introduced extra complexity.
I could also see checking for the presence of curl at the beginning of the
script and failing quickly with a message, but that was not discussed in the
interview. Given that this happens very quickly and solves for other HTTP errors
it doesn't seem particularly necessary but I could see the potential for it, if
the desire for it was there.
Signed-off-by: Josh Ghiloni <ghiloni@gmail.com>
* Use pipefail when we pipe commands
Use clearer syntax with pipes (functional style similar to Elixir).
Make the shell & if / env obvious in the commands by declaring them
first in the step.
Signed-off-by: Gerhard Lazu <gerhard@dagger.io>
---------
Signed-off-by: Josh Ghiloni <ghiloni@gmail.com>
Signed-off-by: Gerhard Lazu <gerhard@dagger.io>
Co-authored-by: Gerhard Lazu <gerhard@dagger.io>