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

Merged
merged 13 commits into from
Feb 13, 2025

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 eb2f907.

♻️ 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)

@guybartal guybartal disabled auto-merge December 17, 2024 09:29
@guybartal
Copy link
Collaborator Author

/help

Copy link

🤖 pr-bot 🤖

Hello!

You can use the following commands:
    /test - build, deploy and run smoke tests on a PR
    /test-extended - build, deploy and run smoke & extended tests on a PR
    /test-extended-aad - build, deploy and run smoke & extended AAD tests on a PR
    /test-shared-services - test the deployment of shared services on a PR build
    /test-force-approve - force approval of the PR tests (i.e. skip the deployment checks)
    /test-destroy-env - delete the validation environment for a PR (e.g. to enable testing a deployment from a clean start after previous tests)
    /help - show this help

(in response to this comment from @guybartal)

@guybartal
Copy link
Collaborator Author

/test-extended

Copy link

🤖 pr-bot 🤖

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

(in response to this comment from @guybartal)

@guybartal
Copy link
Collaborator Author

/test

Copy link

🤖 pr-bot 🤖

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

(in response to this comment from @guybartal)

@guybartal
Copy link
Collaborator Author

/test

Copy link

🤖 pr-bot 🤖

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

(in response to this comment from @guybartal)

@guybartal
Copy link
Collaborator Author

/test-force-approve

Copy link

🤖 pr-bot 🤖

✅ Marking tests as complete (for commit e53e247)

(in response to this comment from @guybartal)

Copy link
Member

@marrobi marrobi left a comment

Choose a reason for hiding this comment

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

LGTM, hope it works ;)

@guybartal guybartal removed the request for review from tamirkamara February 13, 2025 10:00
@guybartal guybartal enabled auto-merge (squash) February 13, 2025 10:01
@guybartal
Copy link
Collaborator Author

/test-force-approve

Copy link

🤖 pr-bot 🤖

✅ Marking tests as complete (for commit eb2f907)

(in response to this comment from @guybartal)

@guybartal guybartal merged commit 3a5ecb9 into main Feb 13, 2025
12 checks passed
@guybartal guybartal deleted the guybartal/ci-multiple-lines branch February 13, 2025 10:06
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