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

Add azure-cli-persistence copied from aws-cli-persistence #59 #62

Merged
merged 4 commits into from
May 10, 2024

Conversation

joshuanianji
Copy link
Owner

@joshuanianji joshuanianji commented May 10, 2024

See also: #59

robinmordasiewicz and others added 4 commits March 25, 2024 12:22
…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.
@joshuanianji joshuanianji merged commit 97c3cf3 into main May 10, 2024
7 checks passed
@joshuanianji joshuanianji deleted the robinmordasiewicz/main branch May 10, 2024 05:15
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.

2 participants