Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support asdf .tool-versions #354

Open
schmijos opened this issue Jul 26, 2022 · 7 comments
Open

Support asdf .tool-versions #354

schmijos opened this issue Jul 26, 2022 · 7 comments

Comments

@schmijos
Copy link

schmijos commented Jul 26, 2022

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:

  • Less context knowledge about the CI runtime is needed. It's enough to know that asdf is available.
  • Caching is easier to manage because runtimes install their environment into the same folder (~/.asdf/installs).
@coorasse
Copy link

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

@lucianoliberti
Copy link

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

@lucianoliberti
Copy link

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

@coorasse
Copy link

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

@lucianoliberti
Copy link

@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
Copy link

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

@luontola
Copy link

luontola commented Oct 4, 2024

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:

  • asdf is already installed, so no need to run git clone
  • the asdf.sh command is already in .bashrc to make it work
  • cache store and cache restore would by default cache also ~/.asdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants