Skip to content

Add support for environment resource tags on Windows #51

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 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Available variables are listed below, along with default values (see `defaults/m
az_devops_agent_role: "build"
az_devops_deployment_group_tags: null
az_devops_environment_name: null
az_devops_environment_tags: null
az_devops_deployment_group_name: null
az_devops_agent_replace_existing: false
az_devops_reconfigure_agent: false
Expand Down Expand Up @@ -100,6 +101,10 @@ Available variables are listed below, along with default values (see `defaults/m

Use in conjuction with the `resource` agent role. The name of the environment in which to add the VM resource. **This needs to be manually created in you Azure DevOps project beforehand.**

- **az_devops_environment_tags**

Use in conjuction with the `resource` agent role. A list of tags to describe the VM resource.

- **az_devops_agent_replace_existing**

Adds the `--replace` argument to the configuration script for the [scenario where you need to replace an exiting agent with a new host](https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/v2-linux?view=azure-devops#pool-and-agent-names).
Expand Down Expand Up @@ -180,6 +185,9 @@ Available variables are listed below, along with default values (see `defaults/m
- az_devops_accesstoken: ***
- az_devops_project_name: baz
- az_devops_environment_name: staging
- az_devops_environment_tags:
- foo
- bar
```

### Proxy
Expand Down
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ az_devops_reconfigure_agent: false
az_devops_project_name: null
az_devops_agent_package_url: "{{ az_devops_default_agent_package_url }}"
az_devops_environment_name: null
az_devops_environment_tags: null
az_devops_deployment_group_name: null
az_devops_deployment_group_tags: null
az_devops_proxy_url: null
Expand Down
1 change: 1 addition & 0 deletions tasks/Windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
resource_agent_install_options:
- "/Environment"
- "/EnvironmentName:{{ az_devops_environment_name }}"
- "/EnvironmentTags:{{ az_devops_environment_tags | join(',') }}"
Copy link
Contributor

Choose a reason for hiding this comment

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

does this react well to the default null value?

- "/AgentName:{{ az_devops_agent_name }}"
- "/ProjectName:{{ az_devops_project_name }}"

Expand Down