-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add azure-cli-persistence copied from was-cli-persistence #59
Conversation
…It aims to preserve the `~/.azure` folder across container instances of Azure CLI, avoiding extra logins. The feature consists of an extension file (`devcontainer.json`) and two shell scripts (`install.sh` and `oncreate.sh`). The `devcontainer.json` file defines the feature's metadata, such as its name, version, documentation URL, description, options, mounts, installsAfter dependencies, and onCreateCommand. The mounts section is used to mount the source volume `${devcontainerId}-azure-cli` to the target directory `/dc/azure-cli`. The `install.sh` script sets up the cache directories for the Azure CLI and creates a symlink from the user's home folder (`.azure`) to the container's `/dc/azure-cli` directory. It also sets up lifecycle scripts if they exist. The `oncreate.sh` script is empty in this version, but it can be used to run additional setup tasks when a new container instance is created. Overall, this feature helps maintain the Azure CLI configuration across container instances, reducing the need for repeated logins and improving the development experience.
…he `azure-cli-persistence` feature, which is designed to persist Azure CLI configuration across container restarts. The tests are written in Bash and use the `dev-container-features-test-lib` library for reporting test results. The `scenarios.json` file defines four different test scenarios: one using Node.js, one using Zsh shell, one using Fish shell, and one using a root user. Each scenario specifies an image to use as the base container and lists the required features (including `azure-cli-persistence`). The `test.sh` file is empty, but it's likely that it would import the test library and then run the tests for each scenario defined in `scenarios.json`. The other files (`with_node.sh`, `zsh_shell.sh`, `fish_shell.sh`, and `root_user.sh`) are specific test scripts for each scenario, which likely contain commands to check that the Azure CLI configuration is persisted across container restarts. Overall, these files suggest that the `azure-cli-persistence` feature is designed to work with different shells (Node.js, Zsh, Fish, and root user) and that it can be tested using a set of automated tests.
@@ -0,0 +1,23 @@ | |||
{ | |||
"name": "Azure CLI Persistence", | |||
"id": "azure-cli-persistence", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think devcontainer feature IDs need to be unique - maybe change this to azure-cli-persistence-new
or something similar? I think the name can stay the same.
We can also update the description field to something similar to "(fork of stuartleeks): "
source dev-container-features-test-lib | ||
|
||
# check that `azure --help` works | ||
check "help" bash -c "azure help | grep 'usage'" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think tests are failing because this should be `az help, but other than that the tests seem good
Hey @robinmordasiewicz, thanks for opening this PR! I'll be willing to maintain azure-cli-persistence in my repo. Added a couple quick comments to fix |
Hey @robinmordasiewicz, just checking in. Do you still want to finish this PR? |
Oh sorry. I had assumed it was already done. And yep. It’s up to you if you wish to accept the PR. On May 9, 2024, at 12:51 PM, Joshua Ji ***@***.***> wrote:
Hey @robinmordasiewicz, just checking in. Do you still want to finish this PR?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Thanks for letting me know! I'll fix failing CI and then merge |
Add azure-cli-persistence copied from aws-cli-persistence #59
#58 the upstream repo does not seem to be maintained and this repo holds more comprehensive and maintained features. Please add azure-cli-persistence to this repo.