Skip to content

add openssh-client to devcontainer #1136

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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

hacki11
Copy link

@hacki11 hacki11 commented Apr 1, 2025

PR Checklist:

  • Provide a meaningful description to this PR or mention which issues this fixes.
  • Ensure the project builds with npm run build
  • Add tests for your change. This includes negative tests (i.e. inputs that need to fail) as well as baseline tests (i.e. how should the directory structure look like?).
  • Run the test suite with npm test
  • If there are baseline changes, review them and make a separate commit for them with the comment "accept baselines" if they are desired changes
  • N/A If you added a required option, also add it to the template creation (.github/create_templates.ts)
  • Add a detailed migration description to docs/updates explaining what the user needs to do when manually updating an existing project
  • Add your changes to CHANGELOG.md (referencing the migration description and this PR or the issue you fixed)

Description:
As a developer, I want to commit & push to the adapters git repository I cloned with a ssh url instead of https.
The current iobroker docker image does not include openssh-client, so ssh is not working. This PR changes that.

@hacki11
Copy link
Author

hacki11 commented Apr 1, 2025

How would you test such a change? Is there a test which validates that the DevContainer is actually working?

@hacki11
Copy link
Author

hacki11 commented Apr 10, 2025

@AlCalzone anything open from your side or can we merge this?

@@ -8,6 +8,9 @@ const templateFunction: TemplateFunction = answers => {
const template = `
FROM iobroker/iobroker:latest
RUN ln -s /opt/iobroker/node_modules/ /root/.node_modules
# Needed to use git-ssh in devcontainer
RUN apt-get update &&\\
apt-get -y --no-install-recommends install openssh-client
Copy link
Collaborator

Choose a reason for hiding this comment

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

Formatting here seems to mix tabs and spaces, would be great to have this consistent (tabs):
grafik

Copy link
Author

@hacki11 hacki11 Apr 11, 2025

Choose a reason for hiding this comment

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

done
Whats the fundamental process here? Tabs are used for the code in the create-adapter projects. Thats fine - but the indentation within the template should follow the answer the user gives for indendation, shouldn't it? Currently the templates use a mix of spaces and tabs depending which file is in focus. I changed it to tabs now bc. of the review comment but if a user wants to have spaces, will they get a issue?

@@ -8,6 +8,9 @@ const templateFunction: TemplateFunction = answers => {
const template = `
FROM iobroker/iobroker:latest
RUN ln -s /opt/iobroker/node_modules/ /root/.node_modules
# Needed to use git-ssh in devcontainer
RUN apt-get update &&\\
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is more of a personal preference, but I find multiline Docker commands easier to grasp if there is a space before the "newline" backspace, and the && is in the next line before the 2nd command.

Copy link
Author

Choose a reason for hiding this comment

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

done

CHANGELOG.md Outdated
@@ -5,6 +5,10 @@
## __WORK IN PROGRESS__
(at the beginning of a new line)
-->

## __WORK IN PROGRESS__
* (hacki11) Support git-ssh in devcontainer (#1136)
Copy link
Collaborator

Choose a reason for hiding this comment

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

There should be a link to your migration guide, see for example the 2.6.0 changelog.

Copy link
Author

Choose a reason for hiding this comment

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

done

@hacki11 hacki11 requested a review from AlCalzone April 11, 2025 09:14
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