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

Dev container with vscode configuration #412

Merged
merged 1 commit into from
Nov 22, 2024

Conversation

mbussolotto
Copy link
Member

@mbussolotto mbussolotto commented Jul 23, 2024

What does this PR change?

  • dev container for uyuni-tools
  • vscode settings (installing extension to help development, like unit test utilities)
  • add information about GitHub Codespace in PR template
  • added pre-commit and pre-hooks
  • push automatically devcontainer in github registry

I discover that it's possible to run devcontainer using CLI: so devcontainer up --workspace-folder=. then devcontainer exec --workspace-folder=. /bin/bash and you would have a container with everything setup...also the vim plugin for working with golang

Test coverage

  • No tests

  • DONE

Links

  • DONE

Changelogs

Make sure the changelogs entries you are adding are compliant with https://github.com/uyuni-project/uyuni/wiki/Contributing#changelogs and https://github.com/uyuni-project/uyuni/wiki/Contributing#uyuni-projectuyuni-repository

If you don't need a changelog check, please mark this checkbox:

  • No changelog needed

If you uncheck the checkbox after the PR is created, you will need to re-run changelog_test (see below)

Before you merge

Check How to branch and merge properly!

@mbussolotto mbussolotto changed the title Dev container Learning Tuesday: GitHub Dev container with and without dependencies Jul 23, 2024
@mbussolotto mbussolotto force-pushed the main branch 5 times, most recently from 0910aa6 to 3742f22 Compare November 5, 2024 09:36
@mbussolotto mbussolotto changed the title Learning Tuesday: GitHub Dev container with and without dependencies Dev container with vscode configuration Nov 5, 2024
@mbussolotto mbussolotto marked this pull request as ready for review November 5, 2024 09:58
@mbussolotto mbussolotto requested a review from cbosdo November 5, 2024 09:59
]
}
},
"postCreateCommand": "curl -fLo \"${XDG_DATA_HOME:-$HOME/.local/share}\"/nvim/site/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim && echo \"alias vim='nvim -u .devcontainer/init.vim'\" >> ~/.bashrc && nvim -u ${containerWorkspaceFolder}/.devcontainer/init.vim +PlugInstall +qall && cd ${containerWorkspaceFolder} && go mod download && pre-commit install-hooks && ./install-hooks.sh"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Funny that you install nvim there... how comes?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I installed nvim with my init.vim file.. in this way running devcontainer exec --workspace-folder=. /bin/bash I can use vim and have exactly the same vim as I have in my host machine :) I hope it might help to use just devcontainer than host machine

@mbussolotto mbussolotto force-pushed the main branch 3 times, most recently from 8e84b91 to d498012 Compare November 19, 2024 20:00
Copy link
Contributor

@rjpmestre rjpmestre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested both ways, looks good

@mbussolotto mbussolotto merged commit e83438e into uyuni-project:main Nov 22, 2024
7 of 8 checks passed
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

Successfully merging this pull request may close these issues.

3 participants