doc fragments workaround for downstream (#59)

* doc fragments workaround for downstream

Signed-off-by: Adam Miller <admiller@redhat.com>

* make shellcheck happy

Signed-off-by: Adam Miller <admiller@redhat.com>

* fix collection location for downstream doc fragment resolution

Signed-off-by: Adam Miller <admiller@redhat.com>

* do things in the correct order

Signed-off-by: Adam Miller <admiller@redhat.com>

* add ANSIBLE_COLLECTIONS_PATH to ansible-doc for downstream

Signed-off-by: Adam Miller <admiller@redhat.com>

* remove elements of the json dump that aren't valid for DOCUMENTATION

Signed-off-by: Adam Miller <admiller@redhat.com>

* Add fix for Ansible 2.9

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

* Update ci/downstream.sh

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Jeff Geerling <geerlingguy@mac.com>
This commit is contained in:
Adam Miller
2020-11-17 11:03:00 -06:00
committed by GitHub
parent 87cd174b96
commit 2d71c469bd
7 changed files with 105 additions and 32 deletions

View File

@@ -6,15 +6,9 @@
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'community'}
# STARTREMOVE (downstream)
DOCUMENTATION = '''
module: k8s
@@ -112,8 +106,8 @@ options:
description:
- The value of the reason field in your desired condition
- For example, if a C(Deployment) is paused, The C(Progressing) C(type) will have the C(DeploymentPaused) reason.
- The possible reasons in a condition are specific to each resource type in Kubernetes. See the API documentation of the status field
for a given resource to see possible choices.
- The possible reasons in a condition are specific to each resource type in Kubernetes.
See the API documentation of the status field for a given resource to see possible choices.
type: dict
validate:
description:
@@ -264,6 +258,7 @@ result:
type: int
sample: 48
'''
# ENDREMOVE (downstream)
import re
import operator
@@ -396,7 +391,9 @@ class OKDRawModule(KubernetesRawModule):
image = existing['spec']['template']['spec']['containers'][old_container_index]['image']
definition['spec']['template']['spec']['containers'][new_container_index]['image'] = image
existing_index = self.get_index(trigger['imageChangeParams'], [x.get('imageChangeParams') for x in existing_triggers], ['containerNames'])
existing_index = self.get_index(trigger['imageChangeParams'],
[x.get('imageChangeParams') for x in existing_triggers],
['containerNames'])
if existing_index is not None:
existing_image = existing_triggers[existing_index].get('imageChangeParams', {}).get('lastTriggeredImage')
if existing_image: