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 multiple lines in devcontainer action #4192

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

Conversation

guybartal
Copy link
Collaborator

Support multiple lines in devcontainer action

Before this PR CI workflow developers could only code commands in a single line (inline) to run inside devcontainer,
this becomes challenging to code complex scenarios and maintain it overtime as it is less readable.

This PR introduces a way to embed multiple shell command lines which are more readable and maintainable,
this inline script then materializes into a temp unique shell file which is mounted as command.sh file inside the workspace path.

- Updated the action to create a temporary script file for the command execution, ensuring the script name is in lowercase.
- Changed the command execution from directly passing the command to using the generated script file.
- Cleaned up the temporary script file after execution.
- Updated workflow files to use a multiline string for the COMMAND input, improving readability.

This change enhances the handling of commands in the DevContainer action and maintains a cleaner environment post-execution.
@guybartal guybartal requested review from Copilot, tamirkamara and marrobi and removed request for Copilot December 12, 2024 07:45

Choose a reason for hiding this comment

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated no suggestions.

Copy link

github-actions bot commented Dec 12, 2024

Unit Test Results

0 tests   0 ✅  0s ⏱️
0 suites  0 💤
0 files    0 ❌

Results for commit ddf1cc0.

♻️ This comment has been updated with latest results.

@guybartal guybartal enabled auto-merge (squash) December 12, 2024 07:47
@guybartal guybartal disabled auto-merge December 12, 2024 07:47
@guybartal guybartal enabled auto-merge (squash) December 12, 2024 07:47
@marrobi
Copy link
Member

marrobi commented Dec 12, 2024

@guy has this been tested end to end? If so can you post a link to the run? Thanks.

@guybartal
Copy link
Collaborator Author

/test

Copy link

🤖 pr-bot 🤖

🏃 Running tests: https://github.com/microsoft/AzureTRE/actions/runs/12355453987 (with refid c166b0a4)

(in response to this comment from @guybartal)

Copy link
Member

Choose a reason for hiding this comment

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

@guybartal , @tamirkamara has said he will review this prior to being merged. Please await his review! Thanks.

@guybartal guybartal disabled auto-merge December 17, 2024 09:29
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