Polish old modules and collection for release (#11)

This commit is contained in:
Lukas Kämmerling 2020-06-29 13:53:01 +02:00 committed by GitHub
parent e893006906
commit 6d83275ffa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
35 changed files with 364 additions and 168 deletions

View file

@ -2,47 +2,127 @@ stages:
- sanity
- integration
test:sanity1-devel-py38:
ansible-devel-1/4:
stage: sanity
image: python:3.8-buster
except:
- tags
script:
- bash tests/utils/gitlab/gitlab.sh sanity/1
- bash tests/utils/gitlab/gitlab.sh devel/sanity/1
tags:
- hc-bladerunner
test:sanity2-devel-py38:
ansible-devel-2/4:
stage: sanity
image: python:3.8-buster
except:
- tags
script:
- bash tests/utils/gitlab/gitlab.sh sanity/2
- bash tests/utils/gitlab/gitlab.sh devel/sanity/2
tags:
- hc-bladerunner
test:sanity3-devel-py38:
ansible-devel-3/4:
stage: sanity
image: python:3.8-buster
except:
- tags
script:
- bash tests/utils/gitlab/gitlab.sh sanity/3
- bash tests/utils/gitlab/gitlab.sh devel/sanity/3
tags:
- hc-bladerunner
test:sanity4-devel-py38:
ansible-devel-4/4:
stage: sanity
image: python:3.8-buster
except:
- tags
script:
- bash tests/utils/gitlab/gitlab.sh sanity/4
- bash tests/utils/gitlab/gitlab.sh devel/sanity/4
tags:
- hc-bladerunner
test:integration1-devel-py38:
ansible-210-1/4:
stage: sanity
image: python:3.8-buster
except:
- tags
script:
- bash tests/utils/gitlab/gitlab.sh 2.10/sanity/1
tags:
- hc-bladerunner
ansible-210-2/4:
stage: sanity
image: python:3.8-buster
except:
- tags
script:
- bash tests/utils/gitlab/gitlab.sh 2.10/sanity/2
tags:
- hc-bladerunner
ansible-210-3/4:
stage: sanity
image: python:3.8-buster
except:
- tags
script:
- bash tests/utils/gitlab/gitlab.sh 2.10/sanity/3
tags:
- hc-bladerunner
ansible-210-4/4:
stage: sanity
image: python:3.8-buster
except:
- tags
script:
- bash tests/utils/gitlab/gitlab.sh 2.10/sanity/4
tags:
- hc-bladerunner
ansible-29-1/4:
stage: sanity
image: python:3.8-buster
except:
- tags
script:
- bash tests/utils/gitlab/gitlab.sh 2.9/sanity/1
tags:
- hc-bladerunner
ansible-29-2/4:
stage: sanity
image: python:3.8-buster
except:
- tags
script:
- bash tests/utils/gitlab/gitlab.sh 2.9/sanity/2
tags:
- hc-bladerunner
ansible-29-3/4:
stage: sanity
image: python:3.8-buster
except:
- tags
script:
- bash tests/utils/gitlab/gitlab.sh 2.9/sanity/3
tags:
- hc-bladerunner
ansible-29-4/4:
stage: sanity
image: python:3.8-buster
except:
- tags
script:
- bash tests/utils/gitlab/gitlab.sh 2.9/sanity/4
tags:
- hc-bladerunner
ansible-devel-1/2:
stage: integration
image: python:3.8-buster
except:
@ -50,12 +130,12 @@ test:integration1-devel-py38:
script:
- echo "$HCLOUD_TOKEN" >> "$(pwd)/hcloud_token.txt"
- echo "py38-$CI_JOB_ID" >> "$(pwd)/prefix.txt"
- bash tests/utils/gitlab/gitlab.sh integration/1
- bash tests/utils/gitlab/gitlab.sh devel/hcloud/3.8/1
tags:
- hc-bladerunner
test:integration2-devel-py38:
ansible-devel-2/2:
stage: integration
image: python:3.8-buster
except:
@ -63,6 +143,6 @@ test:integration2-devel-py38:
script:
- echo "$HCLOUD_TOKEN" >> "$(pwd)/hcloud_token.txt"
- echo "py39-$CI_JOB_ID" >> "$(pwd)/prefix.txt"
- bash tests/utils/gitlab/gitlab.sh integration/2
- bash tests/utils/gitlab/gitlab.sh devel/hcloud/3.8/2
tags:
- hc-bladerunner

View file

@ -4,3 +4,18 @@ Ansible Collection: hetzner.hcloud
=================================================
Ansible Hetzner Cloud Collection for controlling your Hetzner Cloud Resources.
## Release notes
See [here](https://github.com/ansible-collections/hetzner.hcloud/tree/master/CHANGELOG.rst).
## Publishing New Version
TBD Basic instructions without release branches:
1. Create `changelogs/fragments/<version>.yml` with `release_summary:` section (which must be a string, not a list).
2. Run `antsibull-changelog release --collection-flatmap yes`
3. Make sure `CHANGELOG.rst` and `changelogs/changelog.yaml` are added to git, and the deleted fragments have been removed.
4. Tag the commit with `<version>`. Push changes and tag to the main repository.

1
changelogs/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/.plugin-cache.yaml

28
changelogs/config.yaml Normal file
View file

@ -0,0 +1,28 @@
changelog_filename_template: ../CHANGELOG.rst
changelog_filename_version_depth: 0
changes_file: changelog.yaml
changes_format: combined
keep_fragments: false
mention_ancestor: true
new_plugins_after_name: removed_features
notesdir: fragments
prelude_section_name: release_summary
prelude_section_title: Release Summary
sections:
- - major_changes
- Major Changes
- - minor_changes
- Minor Changes
- - breaking_changes
- Breaking Changes / Porting Guide
- - deprecated_features
- Deprecated Features
- - removed_features
- Removed Features (previously deprecated)
- - security_fixes
- Security Fixes
- - bugfixes
- Bugfixes
- - known_issues
- Known Issues
title: Hetzner Cloud Ansible Collection

View file

@ -3,11 +3,13 @@ name: hcloud
version: 0.1.0
readme: README.md
authors:
- Lukas Kaemmerling (github.com/LKaemmerling)
description: null
- Hetzner Cloud (github.com/hetznercloud)
description: A Collection for managing Hetzner Cloud resources
license: GPL-3.0-or-later
license_file: COPYING
tags: null
tags:
- hetzner
- cloud
- hcloud
dependencies:
ansible.netcommon: '>=0.0.1'
repository: https://github.com:ansible-collections/hetzner.hcloud

View file

@ -1,34 +1,35 @@
requires_ansible: '>=2.9.10'
plugin_routing:
modules:
hcloud_location_facts:
deprecation:
removal_date: TBD
removal_version: 2.0.0
warning_text: see plugin documentation for details
hcloud_server_type_facts:
deprecation:
removal_date: TBD
removal_version: 2.0.0
warning_text: see plugin documentation for details
hcloud_image_facts:
deprecation:
removal_date: TBD
removal_version: 2.0.0
warning_text: see plugin documentation for details
hcloud_volume_facts:
deprecation:
removal_date: TBD
removal_version: 2.0.0
warning_text: see plugin documentation for details
hcloud_floating_ip_facts:
deprecation:
removal_date: TBD
removal_version: 2.0.0
warning_text: see plugin documentation for details
hcloud_ssh_key_facts:
deprecation:
removal_date: TBD
removal_version: 2.0.0
warning_text: see plugin documentation for details
hcloud_datacenter_facts:
deprecation:
removal_date: TBD
removal_version: 2.0.0
warning_text: see plugin documentation for details
hcloud_server_facts:
deprecation:
removal_date: TBD
removal_version: 2.0.0
warning_text: see plugin documentation for details

View file

@ -1,10 +1,12 @@
# -*- coding: utf-8 -*-
# Copyright: (c) 2019, Hetzner Cloud GmbH <info@hetzner-cloud.de>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
class ModuleDocFragment(object):
DOCUMENTATION = '''
options:
api_token:

View file

@ -8,12 +8,6 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {
"metadata_version": "1.1",
"status": ["preview"],
"supported_by": "community",
}
DOCUMENTATION = '''
---
module: hcloud_datacenter_info
@ -23,7 +17,7 @@ short_description: Gather info about the Hetzner Cloud datacenters.
description:
- Gather info about your Hetzner Cloud datacenters.
- This module was called C(hcloud_datacenter_facts) before Ansible 2.9, returning C(ansible_facts) and C(hcloud_datacenter_facts).
Note that the M(hcloud_datacenter_info) module no longer returns C(ansible_facts) and the value was renamed to C(hcloud_datacenter_info)!
Note that the M(hetzner.hcloud.hcloud_datacenter_info) module no longer returns C(ansible_facts) and the value was renamed to C(hcloud_datacenter_info)!
author:
- Lukas Kaemmerling (@LKaemmerling)
@ -56,7 +50,7 @@ hcloud_datacenter_info:
description:
- The datacenter info as list
- This module was called C(hcloud_datacenter_facts) before Ansible 2.9, returning C(ansible_facts) and C(hcloud_datacenter_facts).
Note that the M(hcloud_datacenter_info) module no longer returns C(ansible_facts) and the value was renamed to C(hcloud_datacenter_info)!
Note that the M(hetzner.hcloud.hcloud_datacenter_info) module no longer returns C(ansible_facts) and the value was renamed to C(hcloud_datacenter_info)!
returned: always
type: complex
contains:

View file

@ -8,12 +8,6 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {
"metadata_version": "1.1",
"status": ["preview"],
"supported_by": "community",
}
DOCUMENTATION = '''
---
module: hcloud_floating_ip

View file

@ -8,12 +8,6 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {
"metadata_version": "1.1",
"status": ["preview"],
"supported_by": "community",
}
DOCUMENTATION = '''
---
module: hcloud_floating_ip_info
@ -23,7 +17,7 @@ short_description: Gather infos about the Hetzner Cloud Floating IPs.
description:
- Gather facts about your Hetzner Cloud Floating IPs.
- This module was called C(hcloud_floating_ip_facts) before Ansible 2.9, returning C(ansible_facts) and C(hcloud_floating_ip_facts).
Note that the M(hcloud_floating_ip_info) module no longer returns C(ansible_facts) and the value was renamed to C(hcloud_floating_ip_info)!
Note that the M(hetzner.hcloud.hcloud_floating_ip_info) module no longer returns C(ansible_facts) and the value was renamed to C(hcloud_floating_ip_info)!
author:
- Lukas Kaemmerling (@LKaemmerling)

View file

@ -8,12 +8,6 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {
"metadata_version": "1.1",
"status": ["preview"],
"supported_by": "community",
}
DOCUMENTATION = '''
---
module: hcloud_image_info
@ -24,7 +18,7 @@ short_description: Gather infos about your Hetzner Cloud images.
description:
- Gather infos about your Hetzner Cloud images.
- This module was called C(hcloud_location_facts) before Ansible 2.9, returning C(ansible_facts) and C(hcloud_location_facts).
Note that the M(hcloud_image_info) module no longer returns C(ansible_facts) and the value was renamed to C(hcloud_image_info)!
Note that the M(hetzner.hcloud.hcloud_image_info) module no longer returns C(ansible_facts) and the value was renamed to C(hcloud_image_info)!
author:
- Lukas Kaemmerling (@LKaemmerling)

View file

@ -8,12 +8,6 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {
"metadata_version": "1.1",
"status": ["preview"],
"supported_by": "community",
}
DOCUMENTATION = '''
---
module: hcloud_location_info
@ -24,7 +18,7 @@ short_description: Gather infos about your Hetzner Cloud locations.
description:
- Gather infos about your Hetzner Cloud locations.
- This module was called C(hcloud_location_facts) before Ansible 2.9, returning C(ansible_facts) and C(hcloud_location_facts).
Note that the M(hcloud_location_info) module no longer returns C(ansible_facts) and the value was renamed to C(hcloud_location_info)!
Note that the M(hetzner.hcloud.hcloud_location_info) module no longer returns C(ansible_facts) and the value was renamed to C(hcloud_location_info)!
author:
- Lukas Kaemmerling (@LKaemmerling)

View file

@ -8,12 +8,6 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {
"metadata_version": "1.1",
"status": ["preview"],
"supported_by": "community",
}
DOCUMENTATION = '''
---
module: hcloud_network

View file

@ -8,12 +8,6 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {
"metadata_version": "1.1",
"status": ["preview"],
"supported_by": "community",
}
DOCUMENTATION = '''
---
module: hcloud_network_info
@ -80,14 +74,101 @@ hcloud_network_info:
description: Subnetworks belonging to the network
returned: always
type: complex
contains:
type:
description: Type of the subnetwork.
returned: always
type: str
sample: cloud
network_zone:
description: Network of the subnetwork.
returned: always
type: str
sample: eu-central
ip_range:
description: IP range of the subnetwork
returned: always
type: str
sample: 10.0.0.0/24
gateway:
description: Gateway of this subnetwork
returned: always
type: str
sample: 10.0.0.1
routes:
description: Routes belonging to the network
returned: always
type: complex
contains:
ip_range:
description: Destination network or host of this route.
returned: always
type: str
sample: 10.0.0.0/16
gateway:
description: Gateway of this route
returned: always
type: str
sample: 10.0.0.1
servers:
description: Servers attached to the network
returned: always
type: complex
contains:
id:
description: Numeric identifier of the server
returned: always
type: int
sample: 1937415
name:
description: Name of the server
returned: always
type: str
sample: my-server
status:
description: Status of the server
returned: always
type: str
sample: running
server_type:
description: Name of the server type of the server
returned: always
type: str
sample: cx11
ipv4_address:
description: Public IPv4 address of the server
returned: always
type: str
sample: 116.203.104.109
ipv6:
description: IPv6 network of the server
returned: always
type: str
sample: 2a01:4f8:1c1c:c140::/64
location:
description: Name of the location of the server
returned: always
type: str
sample: fsn1
datacenter:
description: Name of the datacenter of the server
returned: always
type: str
sample: fsn1-dc14
rescue_enabled:
description: True if rescue mode is enabled, Server will then boot into rescue system on next reboot
returned: always
type: bool
sample: false
backup_window:
description: Time window (UTC) in which the backup will run, or null if the backups are not enabled
returned: always
type: bool
sample: 22-02
labels:
description: User-defined labels (key-value pairs)
returned: always
type: dict
delete_protection:
description: True if the network is protected for deletion
returned: always

View file

@ -8,12 +8,6 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {
"metadata_version": "1.1",
"status": ["preview"],
"supported_by": "community",
}
DOCUMENTATION = '''
---
module: hcloud_rdns

View file

@ -8,12 +8,6 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {
"metadata_version": "1.1",
"status": ["preview"],
"supported_by": "community",
}
DOCUMENTATION = '''
---
module: hcloud_route

View file

@ -8,12 +8,6 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {
"metadata_version": "1.1",
"status": ["preview"],
"supported_by": "community",
}
DOCUMENTATION = '''
---
module: hcloud_server
@ -49,10 +43,12 @@ options:
- The key names correspond to the SSH keys configured for your
Hetzner Cloud account access.
type: list
elements: str
volumes:
description:
- List of Volumes IDs that should be attached to the server on server creation.
type: list
elements: str
image:
description:
- Image the server should be created from.
@ -502,8 +498,8 @@ class AnsibleHcloudServer(Hcloud):
location={"type": "str"},
datacenter={"type": "str"},
user_data={"type": "str"},
ssh_keys={"type": "list"},
volumes={"type": "list"},
ssh_keys={"type": "list", "elements": "str"},
volumes={"type": "list", "elements": "str"},
labels={"type": "dict"},
backups={"type": "bool", "default": False},
upgrade_disk={"type": "bool", "default": False},

View file

@ -8,12 +8,6 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {
"metadata_version": "1.1",
"status": ["preview"],
"supported_by": "community",
}
DOCUMENTATION = '''
---
module: hcloud_server_info
@ -24,7 +18,7 @@ short_description: Gather infos about your Hetzner Cloud servers.
description:
- Gather infos about your Hetzner Cloud servers.
- This module was called C(hcloud_server_facts) before Ansible 2.9, returning C(ansible_facts) and C(hcloud_server_facts).
Note that the M(hcloud_server_info) module no longer returns C(ansible_facts) and the value was renamed to C(hcloud_server_info)!
Note that the M(hetzner.hcloud.hcloud_server_info) module no longer returns C(ansible_facts) and the value was renamed to C(hcloud_server_info)!
author:
- Lukas Kaemmerling (@LKaemmerling)

View file

@ -8,12 +8,6 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {
"metadata_version": "1.1",
"status": ["preview"],
"supported_by": "community",
}
DOCUMENTATION = '''
---
module: hcloud_server_network
@ -47,6 +41,7 @@ options:
description:
- Alias IPs the server has.
type: list
elements: str
state:
description:
- State of the server_network.
@ -202,7 +197,7 @@ class AnsibleHcloudServerNetwork(Hcloud):
network={"type": "str", "required": True},
server={"type": "str", "required": True},
ip={"type": "str"},
alias_ips={"type": "list"},
alias_ips={"type": "list", "elements": "str"},
state={
"choices": ["absent", "present"],
"default": "present",

View file

@ -8,12 +8,6 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {
"metadata_version": "1.1",
"status": ["preview"],
"supported_by": "community",
}
DOCUMENTATION = '''
---
module: hcloud_server_type_info
@ -24,7 +18,7 @@ short_description: Gather infos about the Hetzner Cloud server types.
description:
- Gather infos about your Hetzner Cloud server types.
- This module was called C(hcloud_server_type_facts) before Ansible 2.9, returning C(ansible_facts) and C(hcloud_server_type_facts).
Note that the M(hcloud_server_type_info) module no longer returns C(ansible_facts) and the value was renamed to C(hcloud_server_type_info)!
Note that the M(hetzner.hcloud.hcloud_server_type_info) module no longer returns C(ansible_facts) and the value was renamed to C(hcloud_server_type_info)!
author:
- Lukas Kaemmerling (@LKaemmerling)

View file

@ -8,12 +8,6 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {
"metadata_version": "1.1",
"status": ["preview"],
"supported_by": "community",
}
DOCUMENTATION = '''
---
module: hcloud_ssh_key

View file

@ -8,12 +8,6 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {
"metadata_version": "1.1",
"status": ["preview"],
"supported_by": "community",
}
DOCUMENTATION = '''
---
module: hcloud_ssh_key_info
@ -21,7 +15,7 @@ short_description: Gather infos about your Hetzner Cloud ssh_keys.
description:
- Gather facts about your Hetzner Cloud ssh_keys.
- This module was called C(hcloud_ssh_key_facts) before Ansible 2.9, returning C(ansible_facts) and C(hcloud_ssh_key_facts).
Note that the M(hcloud_ssh_key_info) module no longer returns C(ansible_facts) and the value was renamed to C(hcloud_ssh_key_info)!
Note that the M(hetzner.hcloud.hcloud_ssh_key_info) module no longer returns C(ansible_facts) and the value was renamed to C(hcloud_ssh_key_info)!
author:
- Christopher Schmitt (@cschmitt-hcloud)
options:

View file

@ -8,12 +8,6 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {
"metadata_version": "1.1",
"status": ["preview"],
"supported_by": "community",
}
DOCUMENTATION = '''
---
module: hcloud_subnetwork

View file

@ -8,12 +8,6 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {
"metadata_version": "1.1",
"status": ["preview"],
"supported_by": "community",
}
DOCUMENTATION = '''
---
module: hcloud_volume

View file

@ -8,12 +8,6 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {
"metadata_version": "1.1",
"status": ["preview"],
"supported_by": "community",
}
DOCUMENTATION = '''
---
module: hcloud_volume_info

View file

@ -8,13 +8,30 @@ matrix:
exclude:
- env: T=none
include:
- env: T=sanity/1
- env: T=sanity/2
- env: T=sanity/3
- env: T=sanity/4
- env: T=devel/sanity/1
- env: T=devel/sanity/2
- env: T=devel/sanity/3
- env: T=devel/sanity/4
- env: T=devel/sanity/extra
- env: T=hcloud/3.8/1
- env: T=hcloud/3.8/2
- env: T=devel/hcloud/3.8/1
- env: T=devel/hcloud/3.8/2
- env: T=2.10/sanity/1
- env: T=2.10/sanity/2
- env: T=2.10/sanity/3
- env: T=2.10/sanity/4
- env: T=2.10/sanity/extra
- env: T=2.10/hcloud/3.8/1
- env: T=2.10/hcloud/3.8/2
- env: T=2.9/sanity/1
- env: T=2.9/sanity/2
- env: T=2.9/sanity/3
- env: T=2.9/sanity/4
branches:
except:

View file

@ -0,0 +1,2 @@
netaddr
hcloud

View file

@ -0,0 +1,13 @@
{
"python": "3.8",
"output": "path-line-column-message",
"prefixes": [
"changelogs/fragments/"
],
"exclude_prefixes": [
"changelogs/fragments/."
],
"requirements": [
"git+git://github.com/ansible-community/ansibulled.git@pip-installable#egg=ansibulled"
]
}

View file

@ -0,0 +1,29 @@
#!/usr/bin/env python
# Copyright (c) Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import os
import sys
import subprocess
def main():
paths = sys.argv[1:] or sys.stdin.read().splitlines()
allowed_extensions = ('.yml', '.yaml')
for path in paths:
ext = os.path.splitext(path)[1]
if ext not in allowed_extensions:
print('%s:%d:%d: extension must be one of: %s' % (path, 0, 0, ', '.join(allowed_extensions)))
cmd = ['ansibulled-changelog', 'lint'] + paths
subprocess.check_call(cmd)
if __name__ == '__main__':
main()

View file

@ -1,5 +0,0 @@
plugins/modules/hcloud_network_info.py validate-modules:return-syntax-error
plugins/modules/hcloud_server.py validate-modules:parameter-list-no-elements
plugins/modules/hcloud_server_network.py validate-modules:parameter-list-no-elements
plugins/doc_fragments/hcloud.py future-import-boilerplate
plugins/doc_fragments/hcloud.py metaclass-boilerplate

View file

@ -1,5 +0,0 @@
plugins/modules/hcloud_network_info.py validate-modules:return-syntax-error
plugins/modules/hcloud_server.py validate-modules:parameter-list-no-elements
plugins/modules/hcloud_server_network.py validate-modules:parameter-list-no-elements
plugins/doc_fragments/hcloud.py future-import-boilerplate
plugins/doc_fragments/hcloud.py metaclass-boilerplate

View file

@ -6,7 +6,16 @@ declare -a args
IFS='/:' read -ra args <<< "$1"
test="${args[0]}"
ansible_version="${args[0]}"
script="${args[1]}"
function join {
local IFS="$1";
shift;
echo "$*";
}
test="$(join / "${args[@]:1}")"
command -v python
python -V
@ -29,8 +38,11 @@ function retry
command -v pip
pip --version
pip list --disable-pip-version-check
if [ "${ansible_version}" == "devel" ]; then
retry pip install https://github.com/ansible/ansible/archive/devel.tar.gz --disable-pip-version-check
else
retry pip install "https://github.com/ansible/ansible/archive/stable-${ansible_version}.tar.gz" --disable-pip-version-check
fi
export ANSIBLE_COLLECTIONS_PATHS="${HOME}/.ansible"
SHIPPABLE_RESULT_DIR="$(pwd)/shippable"
TEST_DIR="${ANSIBLE_COLLECTIONS_PATHS}/ansible_collections/hetzner/hcloud"
@ -41,7 +53,7 @@ cd "${TEST_DIR}"
# STAR: HACK install dependencies
retry ansible-galaxy -vvv collection install community.general
retry ansible-galaxy -vvv collection install ansible.netcommon
retry ansible-galaxy -vvv collection install community.internal_test_tools
retry pip install netaddr --disable-pip-version-check
retry pip install hcloud
# END: HACK

View file

@ -13,6 +13,11 @@ else
base_branch=""
fi
if [ "${group}" == "extra" ]; then
../internal_test_tools/tools/run.py --color
exit
fi
case "${group}" in
1) options=(--skip-test pylint --skip-test ansible-doc --skip-test validate-modules) ;;
2) options=( --test ansible-doc --test validate-modules) ;;

View file

@ -13,6 +13,11 @@ else
base_branch=""
fi
if [ "${group}" == "extra" ]; then
../../community/internal_test_tools/tools/run.py --color
exit
fi
case "${group}" in
1) options=(--skip-test pylint --skip-test ansible-doc --skip-test validate-modules) ;;
2) options=( --test ansible-doc --test validate-modules) ;;

View file

@ -5,9 +5,16 @@ set -o pipefail -eux
declare -a args
IFS='/:' read -ra args <<< "$1"
script="${args[0]}"
ansible_version="${args[0]}"
script="${args[1]}"
test="$1"
function join {
local IFS="$1";
shift;
echo "$*";
}
test="$(join / "${args[@]:1}")"
docker images ansible/ansible
docker images quay.io/ansible/*
@ -45,8 +52,11 @@ function retry
command -v pip
pip --version
pip list --disable-pip-version-check
if [ "${ansible_version}" == "devel" ]; then
retry pip install https://github.com/ansible/ansible/archive/devel.tar.gz --disable-pip-version-check
else
retry pip install "https://github.com/ansible/ansible/archive/stable-${ansible_version}.tar.gz" --disable-pip-version-check
fi
export ANSIBLE_COLLECTIONS_PATHS="${HOME}/.ansible"
SHIPPABLE_RESULT_DIR="$(pwd)/shippable"
TEST_DIR="${ANSIBLE_COLLECTIONS_PATHS}/ansible_collections/hetzner/hcloud"
@ -59,6 +69,8 @@ retry ansible-galaxy -vvv collection install community.general
retry ansible-galaxy -vvv collection install ansible.netcommon
retry pip install hcloud
retry pip install netaddr --disable-pip-version-check
retry git clone https://github.com/ansible-collections/community.internal_test_tools.git "${ANSIBLE_COLLECTIONS_PATHS}/ansible_collections/community/internal_test_tools"
# END: HACK
export PYTHONIOENCODING='utf-8'