Challenge, Easy,  on  CI/CD

Preparation

To complete this challenge, ensure you have a Dagger module initialized at ~/my-module.

💡 You don’t need to specify an SDK for this challenge.

Installing modules

Install the go module from the Daggerverse.

Hint 1 💡

Module path: github.com/sagikazarmark/daggerverse/go

Hint 2 💡

Not sure which command to use? Try running dagger --help to see all available options.

Hint 3 💡

dagger install is the command you need.

Navigate to the Daggerverse, choose a module you like, and install it using the name my-favorite.

Hint 4 💡

You can specify a custom name using the --name flag.

Updating modules

Install an earlier release of the helm module (for example, version 0.13.0).

Hint 5 💡

Module path: github.com/sagikazarmark/daggerverse/helm@v0.13.0

Check dagger.json to review the newly added dependency:

jq -r '.dependencies[] | select(.name == "helm")' ~/my-module/dagger.json

Update the helm module to the latest version.

Hint 6 💡

Not sure which command to use? dagger --help is still there.

Hint 7 💡

dagger update seems useful.

Did anything change? Let’s take another look at the dagger.json file:

jq -r '.dependencies[] | select(.name == "helm")' ~/my-module/dagger.json

What could be the problem?

Hint 8 💡

There is a version in the source field.

Hint 9 💡

Have you tried removing the @helm/v0.13.0 bit from the source field?

You can use the IDE to edit the file or run this script:

jq '.dependencies |= map(if .name == "helm" and has("source") then .source |= sub("@.*$"; "") else . end)' ~/my-module/dagger.json | sponge ~/my-module/dagger.json

Try updating the module again.

Uninstalling modules

Install the helm-docs module.

Hint 10 💡

Module path: github.com/sagikazarmark/daggerverse/helm-docs

Now uninstall the helm-docs module.

Hint 11 💡

If you used dagger install to add a module, what command do you think you’d use to remove one?

Hint 12 💡

Maybe check dagger --help again?

Hint 13 💡

dagger uninstall seems like a logical choice.

References

Discussion:  Discord
Categories: CI/CD
Tags:  #dagger

Level up your Server Side game — Join 10,000 engineers who receive insightful learning materials straight to their inbox