semaphoreci / toolbox

Command line tools available in Semaphore 2.0.
https://semaphoreci.com
17 stars 27 forks source link

Support asdf .tool-versions #354

Open schmijos opened 2 years ago

schmijos commented 2 years ago

We started using asdf as a runtime version manager. It's an 18k GitHub stars project. Would you mind adding asdf to your toolbox?

I see the following advantages for your users:

coorasse commented 1 year ago

Any update on this? It would be great to have support for it

lucianoliberti commented 1 year ago

@coorasse @schmijos thanks for your messages! We appreciate them. We'll review it with the engineers and come up with a definition.

lucianoliberti commented 1 year ago

@coorasse @schmijos we'll include this as a feature request. Thanks!

coorasse commented 1 year ago

@lucianoliberti did something happen here? Could we expect something? Thanks

lucianoliberti commented 1 year ago

@coorasse we're currently analyzing the effort of adding the asdf tool to our toolbox or replacing it completely. Pros&Cons are currently debated internally.

aslakhellesoy commented 1 year ago

We're also using asdf as part of our build. Would be great to have support for this in semaphore!

luontola commented 3 weeks ago

For me, a big benefit of asdf over sem-version is that I can use the latest Java version, whereas the ubuntu2204 image only has Java 17. Also it simplifies managing tool versions, when the same versions are automatically used during development and on CI.

I'm using a script like this to install asdf in my CI build:

#!/usr/bin/env bash

# check if asdf was restored from cache
if [ -d ~/.asdf ]; then
  . "$HOME/.asdf/asdf.sh"
  return
fi

git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.14.1
. "$HOME/.asdf/asdf.sh"
asdf plugin add java
asdf plugin add nodejs
asdf install

I use commands like this for running that script and caching the installed runtimes:

- cache restore asdf-$(checksum .tool-versions)-$(checksum scripts/install-asdf.sh)
- . ./scripts/install-asdf.sh
- asdf current
- cache store asdf-$(checksum .tool-versions)-$(checksum scripts/install-asdf.sh) ~/.asdf

For asdf support, I'd expect the following: