From 9a7c4cfc8ccd6f400d46d83ffa649c594eb8fa21 Mon Sep 17 00:00:00 2001 From: The Magician Date: Thu, 28 Feb 2019 16:05:50 -0800 Subject: [PATCH] Improve docs for Cloud Build (#197) /cc @rileykarson --- plugins/modules/gcp_cloudbuild_trigger.py | 25 +++++++++++++------ .../modules/gcp_cloudbuild_trigger_facts.py | 13 +++++++--- 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/plugins/modules/gcp_cloudbuild_trigger.py b/plugins/modules/gcp_cloudbuild_trigger.py index 3183052..f37e6b6 100644 --- a/plugins/modules/gcp_cloudbuild_trigger.py +++ b/plugins/modules/gcp_cloudbuild_trigger.py @@ -67,6 +67,7 @@ options: filename: description: - Path, from the source root, to a file whose contents is used for the template. + Either a filename or build template must be provided. required: false ignored_files: description: @@ -114,19 +115,23 @@ options: required: false branch_name: description: - - Name of the branch to build. + - Name of the branch to build. Exactly one a of branch name, tag, or commit + SHA must be provided. required: false tag_name: description: - - Name of the tag to build. + - Name of the tag to build. Exactly one of a branch name, tag, or commit SHA + must be provided. required: false commit_sha: description: - - Explicit commit SHA to build. + - Explicit commit SHA to build. Exactly one of a branch name, tag, or commit + SHA must be provided. required: false build: description: - - Contents of the build template. + - Contents of the build template. Either a filename or build template must be + provided. required: false suboptions: tags: @@ -233,6 +238,7 @@ substitutions: filename: description: - Path, from the source root, to a file whose contents is used for the template. + Either a filename or build template must be provided. returned: success type: str ignoredFiles: @@ -285,22 +291,25 @@ triggerTemplate: type: str branchName: description: - - Name of the branch to build. + - Name of the branch to build. Exactly one a of branch name, tag, or commit + SHA must be provided. returned: success type: str tagName: description: - - Name of the tag to build. + - Name of the tag to build. Exactly one of a branch name, tag, or commit SHA + must be provided. returned: success type: str commitSha: description: - - Explicit commit SHA to build. + - Explicit commit SHA to build. Exactly one of a branch name, tag, or commit + SHA must be provided. returned: success type: str build: description: - - Contents of the build template. + - Contents of the build template. Either a filename or build template must be provided. returned: success type: complex contains: diff --git a/plugins/modules/gcp_cloudbuild_trigger_facts.py b/plugins/modules/gcp_cloudbuild_trigger_facts.py index 58b5b02..ac40c6e 100644 --- a/plugins/modules/gcp_cloudbuild_trigger_facts.py +++ b/plugins/modules/gcp_cloudbuild_trigger_facts.py @@ -87,6 +87,7 @@ items: filename: description: - Path, from the source root, to a file whose contents is used for the template. + Either a filename or build template must be provided. returned: success type: str ignoredFiles: @@ -142,22 +143,26 @@ items: type: str branchName: description: - - Name of the branch to build. + - Name of the branch to build. Exactly one a of branch name, tag, or commit + SHA must be provided. returned: success type: str tagName: description: - - Name of the tag to build. + - Name of the tag to build. Exactly one of a branch name, tag, or commit + SHA must be provided. returned: success type: str commitSha: description: - - Explicit commit SHA to build. + - Explicit commit SHA to build. Exactly one of a branch name, tag, or commit + SHA must be provided. returned: success type: str build: description: - - Contents of the build template. + - Contents of the build template. Either a filename or build template must be + provided. returned: success type: complex contains: