kitchen-azurerm 0.14.1 → 0.14.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/README.md +4 -4
- data/lib/kitchen/driver/azurerm.rb +9 -0
- metadata +6 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b5d83bda848c416fb5719df306a120193935e99ee53ab1401b906ebc88948fb
|
4
|
+
data.tar.gz: 626d44787351985d6c413ee0d8dafc277d66696d882fd69630a1b7044677c8fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea0716bf38900ef503baee304edecab3f88dcfa9c4237f7eed908399c085a33889f85dd10879d81c1667976faf8fdb432bea00c27c5b87236bee51df7ae480d0
|
7
|
+
data.tar.gz: c848451adee29e84e3960676fdafdeef1a9248176e2cd48da7405edce1f2fe2a6322e4430a86885d7aa6dc2bb3f70afd099e69f99589abc26cf489b0aad30285
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# kitchen-azurerm Changelog
|
2
2
|
|
3
|
+
## [0.14.2] - 2018-07-09
|
4
|
+
- Add `destroy_explicit_resource_group` (default: false) property to allow reuse of specific Azure RG, fixes [#85](https://github.com/test-kitchen/kitchen-azurerm/issues/85)
|
5
|
+
|
3
6
|
## [0.14.1] - 2018-05-10
|
4
7
|
- Support for soverign clouds with latest Azure SDK for Ruby, fixes [#79](https://github.com/test-kitchen/kitchen-azurerm/issues/79)
|
5
8
|
- Raise error when subscription_id is not available, fixes [#74](https://github.com/test-kitchen/kitchen-azurerm/issues/74)
|
data/README.md
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# kitchen-azurerm
|
2
2
|
|
3
|
-
**kitchen-azurerm** is a driver for the popular test harness [Test Kitchen](http://kitchen.ci) that allows Microsoft Azure resources to be provisioned prior to testing. This driver uses the new Microsoft Azure Resource Management REST API via the [azure-sdk-for-ruby](https://github.com/azure/azure-sdk-for-ruby).
|
4
|
-
|
5
3
|
[![Gem Version](https://badge.fury.io/rb/kitchen-azurerm.svg)](http://badge.fury.io/rb/kitchen-azurerm) [![Build Status](https://travis-ci.org/test-kitchen/kitchen-azurerm.svg)](https://travis-ci.org/test-kitchen/kitchen-azurerm)
|
6
4
|
|
5
|
+
**kitchen-azurerm** is a driver for the popular test harness [Test Kitchen](http://kitchen.ci) that allows Microsoft Azure resources to be provisioned prior to testing. This driver uses the new Microsoft Azure Resource Management REST API via the [azure-sdk-for-ruby](https://github.com/azure/azure-sdk-for-ruby).
|
6
|
+
|
7
7
|
This version has been tested on Windows, OS/X and Ubuntu. If you encounter a problem on your platform, please raise an issue.
|
8
8
|
|
9
9
|
## Quick-start
|
@@ -461,7 +461,7 @@ data: Canonical UbuntuServer 15.10-DAILY 15.10.201509220 westeurope
|
|
461
461
|
info: vm image list command OK
|
462
462
|
```
|
463
463
|
|
464
|
-
### Additional parameters:
|
464
|
+
### Additional parameters that can be specified:
|
465
465
|
- Note that the ```driver``` section also takes a ```username``` and ```password``` parameter, the defaults if these are not specified are "azure" and "P2ssw0rd" respectively.
|
466
466
|
- The ```storage_account_type``` parameter defaults to 'Standard_LRS' and allows you to switch to premium storage (e.g. 'Premium_LRS')
|
467
467
|
- The ```enable_boot_diagnostics``` parameter defaults to 'true' and allows you to switch off boot diagnostics in case you are using premium storage.
|
@@ -473,7 +473,7 @@ info: vm image list command OK
|
|
473
473
|
- The ```custom_data``` parameter can be used to specify custom data to provide to the instance. This can be a file or the data itself. This module handles base64 encoding for you.
|
474
474
|
- The ```os_disk_size_gb``` parameter can be used to specify a custom os disk size.
|
475
475
|
- The ```azure_resource_group_prefix``` and ```azure_resource_group_suffix``` can be used to further disambiguate Azure resource group names created by the driver.
|
476
|
-
- The ```explicit_resource_group_name``` parameters can be used in scenarios where you are provided a pre-created Resource Group. Example usage: ```explicit_resource_group_name: kitchen-<%= ENV["USERNAME"] %>```
|
476
|
+
- The ```explicit_resource_group_name``` and ```destroy_explicit_resource_group``` (default: "true") parameters can be used in scenarios where you are provided a pre-created Resource Group. Example usage: ```explicit_resource_group_name: kitchen-<%= ENV["USERNAME"] %>```
|
477
477
|
|
478
478
|
## Contributing
|
479
479
|
|
@@ -134,6 +134,10 @@ module Kitchen
|
|
134
134
|
false
|
135
135
|
end
|
136
136
|
|
137
|
+
default_config(:destroy_explicit_resource_group) do |_config|
|
138
|
+
true
|
139
|
+
end
|
140
|
+
|
137
141
|
def create(state)
|
138
142
|
state = validate_state(state)
|
139
143
|
deployment_parameters = {
|
@@ -411,6 +415,11 @@ module Kitchen
|
|
411
415
|
|
412
416
|
def destroy(state)
|
413
417
|
return if state[:server_id].nil?
|
418
|
+
if config[:destroy_explicit_resource_group] == false && !config[:explicit_resource_group_name].nil?
|
419
|
+
warn 'The :destroy_explicit_resource_group setting value is set to "false" so no resources will be destroyed.'
|
420
|
+
warn 'Remember to manually destroy resources to save costs!'
|
421
|
+
return
|
422
|
+
end
|
414
423
|
options = Kitchen::Driver::Credentials.new.azure_options_for_subscription(state[:subscription_id], state[:azure_environment])
|
415
424
|
info "Azure environment: #{state[:azure_environment]}"
|
416
425
|
resource_management_client = ::Azure::Resources::Profiles::Latest::Mgmt::Client.new(options)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kitchen-azurerm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.14.
|
4
|
+
version: 0.14.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stuart Preston
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-07-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: azure_mgmt_network
|
@@ -110,42 +110,28 @@ dependencies:
|
|
110
110
|
requirements:
|
111
111
|
- - "~>"
|
112
112
|
- !ruby/object:Gem::Version
|
113
|
-
version: '
|
113
|
+
version: '11.0'
|
114
114
|
type: :development
|
115
115
|
prerelease: false
|
116
116
|
version_requirements: !ruby/object:Gem::Requirement
|
117
117
|
requirements:
|
118
118
|
- - "~>"
|
119
119
|
- !ruby/object:Gem::Version
|
120
|
-
version: '
|
121
|
-
- !ruby/object:Gem::Dependency
|
122
|
-
name: rspec
|
123
|
-
requirement: !ruby/object:Gem::Requirement
|
124
|
-
requirements:
|
125
|
-
- - "~>"
|
126
|
-
- !ruby/object:Gem::Version
|
127
|
-
version: '0'
|
128
|
-
type: :development
|
129
|
-
prerelease: false
|
130
|
-
version_requirements: !ruby/object:Gem::Requirement
|
131
|
-
requirements:
|
132
|
-
- - "~>"
|
133
|
-
- !ruby/object:Gem::Version
|
134
|
-
version: '0'
|
120
|
+
version: '11.0'
|
135
121
|
- !ruby/object:Gem::Dependency
|
136
122
|
name: rubocop
|
137
123
|
requirement: !ruby/object:Gem::Requirement
|
138
124
|
requirements:
|
139
125
|
- - "~>"
|
140
126
|
- !ruby/object:Gem::Version
|
141
|
-
version:
|
127
|
+
version: 0.57.2
|
142
128
|
type: :development
|
143
129
|
prerelease: false
|
144
130
|
version_requirements: !ruby/object:Gem::Requirement
|
145
131
|
requirements:
|
146
132
|
- - "~>"
|
147
133
|
- !ruby/object:Gem::Version
|
148
|
-
version:
|
134
|
+
version: 0.57.2
|
149
135
|
description: Test Kitchen driver for the Microsoft Azure Resource Manager (ARM) API
|
150
136
|
email:
|
151
137
|
- stuart@chef.io
|