def init_argparser(self, parser, defaults): super(BuildBomCommandFactory, self).init_argparser(parser, defaults) HalRunner.add_parser_args(parser, defaults) buildtool.container_commands.add_bom_parser_args(parser, defaults) buildtool.debian_commands.add_bom_parser_args(parser, defaults) buildtool.image_commands.add_bom_parser_args(parser, defaults) self.add_argument( parser, 'build_number', defaults, DEFAULT_BUILD_NUMBER, help='The build number for this specific bom.') self.add_argument( parser, 'bom_path', defaults, None, help='The path to the local BOM file copy to write out.') self.add_argument( parser, 'bom_dependencies_path', defaults, None, help='The path to YAML file specifying the BOM dependencies section' ' if overriding.') self.add_argument( parser, 'refresh_from_bom_path', defaults, None, help='If specified then use the existing bom_path as a prototype' ' to refresh. Use with --only_repositories to create a new BOM.' ' using only the new versions and build numbers for select repos' ' while keeping the existing versions and build numbers for' ' others.') self.add_argument( parser, 'refresh_from_bom_version', defaults, None, help='Similar to refresh_from_bom_path but using a version obtained.' ' from halyard.') self.add_argument( parser, 'git_fallback_branch', defaults, None, help='The branch to pull for the BOM if --git_branch isnt found.' ' This is intended only for speculative development where' ' some repositories are being modified and the remaing are' ' to come from a release branch.')
def init_argparser(self, parser, defaults): """Adds command-specific arguments.""" super(BuildChangelogFactory, self).init_argparser(parser, defaults) self.add_argument( parser, 'include_changelog_details', defaults, False, action='store_true', help='Include a "details" section with the full commit messages' ' in time sequence in the changelog.') HalRunner.add_parser_args(parser, defaults) self.add_argument( parser, 'relative_to_bom_path', defaults, None, help='If specified then produce the changelog relative to the' ' commits found in the specified bom rather than the previous' ' repository tag.') self.add_argument( parser, 'relative_to_bom_version', defaults, None, help='If specified then produce the changelog relative to the' ' commits found in the specified bom rather than the previous' ' repository tag.')
def init_argparser(self, parser, defaults): super(PublishSpinnakerFactory, self).init_argparser(parser, defaults) HalRunner.add_parser_args(parser, defaults) GitRunner.add_parser_args(parser, defaults) GitRunner.add_publishing_parser_args(parser, defaults) PublishChangelogFactory().init_argparser(parser, defaults) self.add_argument(parser, 'spinnaker_release_alias', defaults, None, help='The spinnaker version alias to publish as.') self.add_argument( parser, 'halyard_bom_bucket', defaults, 'halconfig', help='The bucket manaing halyard BOMs and config profiles.') self.add_argument( parser, 'bom_version', defaults, None, help='The existing bom version usef for this release.') self.add_argument(parser, 'min_halyard_version', defaults, None, help='The minimum halyard version required.')
def init_argparser(self, parser, defaults): super(PublishBomCommandFactory, self).init_argparser(parser, defaults) HalRunner.add_parser_args(parser, defaults) self.add_argument( parser, 'halyard_bom_bucket', defaults, 'halconfig', help='The bucket manaing halyard BOMs and config profiles.') self.add_argument( parser, 'bom_alias', defaults, None, help='Also publish the BOM using this alias name.')
def init_argparser(self, parser, defaults): super(PublishBomCommandFactory, self).init_argparser(parser, defaults) HalRunner.add_parser_args(parser, defaults) self.add_argument( parser, 'halyard_bom_bucket', defaults, 'halconfig', help='The bucket manaing halyard BOMs and config profiles.') self.add_argument( parser, 'bom_alias', defaults, None, help='Also publish the BOM using this alias name.')
def init_argparser(self, parser, defaults): super(PublishHalyardCommandFactory, self).init_argparser( parser, defaults) GradleCommandFactory.add_bom_parser_args(parser, defaults) SpinnakerSourceCodeManager.add_parser_args(parser, defaults) GradleRunner.add_parser_args(parser, defaults) GitRunner.add_publishing_parser_args(parser, defaults) HalRunner.add_parser_args(parser, defaults) self.add_argument( parser, 'build_number', defaults, DEFAULT_BUILD_NUMBER, help='Publishing halyard requires a rebuild. This is the build number' ' to use when rebuilding halyard.') self.add_argument( parser, 'halyard_version', defaults, None, help='The semantic version of the release to publish.') self.add_argument( parser, 'halyard_version_commits_url', defaults, None, help='URL to file containing version and git commit for successful' ' nightly builds. By default this will be' ' "{filename}" in the' ' --halyard_bucket_base_url.'.format( filename=BuildHalyardCommand.HALYARD_VERSIONS_BASENAME)) self.add_argument( parser, 'halyard_docker_image_base', defaults, None, help='Base Docker image name for writing halyard builds.') self.add_argument( parser, 'halyard_bucket_base_url', defaults, None, help='Base Google Cloud Storage URL for writing halyard builds.') self.add_argument(parser, 'docs_repo_owner', defaults, None, help='Owner of the docs repo if one was' ' specified. The default is --github_owner.') self.add_argument( parser, 'skip_existing', defaults, False, type=bool, help='Skip builds if the desired version already exists on bintray.') self.add_argument( parser, 'delete_existing', defaults, None, type=bool, help='Delete pre-existing desired versions if from bintray.') self.add_argument( parser, 'gcb_project', defaults, None, help='The GCP project ID when using the GCP Container Builder.') self.add_argument( parser, 'gcb_service_account', defaults, None, help='Google Service Account when using the GCP Container Builder.') self.add_argument( parser, 'artifact_registry', defaults, None, help='Artifact registry to push the container images to.')
def init_argparser(self, parser, defaults): super(BuildGceComponentImagesFactory, self).init_argparser( parser, defaults) HalRunner.add_parser_args(parser, defaults) self.add_argument( parser, 'halyard_release_track', defaults, 'stable', choices=['nightly', 'stable'], help='Which halyard release track to use when installing images.') self.add_argument( parser, 'skip_existing', defaults, False, type=bool, help='Skip builds if the desired image already exists in GCE.') self.add_argument( parser, 'delete_existing', defaults, None, type=bool, help='Delete pre-existing desired images from GCE.') self.add_argument( parser, 'build_gce_service_account', defaults, None, help='Service account for building images.') self.add_argument( parser, 'build_gce_project', defaults, None, help='Project to build image in.') self.add_argument( parser, 'build_gce_zone', defaults, 'us-central1-f', help='Zone to build image in.') halyard_install_sh = 'dev/halyard_install_component.sh' self.add_argument( parser, 'install_image_script', defaults, halyard_install_sh, help='Script for installing images.') publish_image_sh = os.path.join( os.path.dirname(__file__), '..', '..', 'google', 'dev', 'publish_gce_release.sh') self.add_argument( parser, 'publish_gce_image_script', defaults, publish_image_sh, help='Script for publishing images to a project.') self.add_argument( parser, 'git_branch', defaults, None, help='Github branch to get install scripts from.' ' If none, then use the source repo branch that this script' ' is running from.') self.add_argument( parser, 'bintray_org', defaults, None, help='The bintray organization for the bintray_*_repositories.') self.add_argument( parser, 'bintray_debian_repository', defaults, None, help='Repository where built debians were placed.') self.add_argument( parser, 'halyard_bom_bucket', defaults, 'halconfig', help='The bucket manaing halyard BOMs and config profiles.')
def add_parser_args(parser, defaults): """Add standard parser arguments used by SourceCodeManager.""" if hasattr(parser, 'added_bom_scm'): return parser.added_bom_scm = True SpinnakerSourceCodeManager.add_parser_args(parser, defaults) HalRunner.add_parser_args(parser, defaults) add_parser_argument( parser, 'bom_path', defaults, None, help='Use the sources specified in the BOM path.') add_parser_argument( parser, 'bom_version', defaults, None, help='Use the sources specified in the BOM version.')
def add_parser_args(parser, defaults): """Add standard parser arguments used by SourceCodeManager.""" if hasattr(parser, 'added_bom_scm'): return parser.added_bom_scm = True SpinnakerSourceCodeManager.add_parser_args(parser, defaults) HalRunner.add_parser_args(parser, defaults) add_parser_argument( parser, 'bom_path', defaults, None, help='Use the sources specified in the BOM path.') add_parser_argument( parser, 'bom_version', defaults, None, help='Use the sources specified in the BOM version.')
def init_argparser(self, parser, defaults): super(PublishHalyardCommandFactory, self).init_argparser( parser, defaults) GradleCommandFactory.add_bom_parser_args(parser, defaults) SpinnakerSourceCodeManager.add_parser_args(parser, defaults) GradleRunner.add_parser_args(parser, defaults) GitRunner.add_publishing_parser_args(parser, defaults) HalRunner.add_parser_args(parser, defaults) self.add_argument( parser, 'build_number', defaults, DEFAULT_BUILD_NUMBER, help='Publishing halyard requires a rebuild. This is the build number' ' to use when rebuilding halyard.') self.add_argument( parser, 'halyard_version', defaults, None, help='The semantic version of the release to publish.') self.add_argument( parser, 'halyard_version_commits_url', defaults, None, help='URL to file containing version and git commit for successful' ' nightly builds. By default this will be' ' "{filename}" in the' ' --halyard_bucket_base_url.'.format( filename=BuildHalyardCommand.HALYARD_VERSIONS_BASENAME)) self.add_argument( parser, 'halyard_docker_image_base', defaults, None, help='Base Docker image name for writing halyard builds.') self.add_argument( parser, 'halyard_bucket_base_url', defaults, None, help='Base Google Cloud Storage URL for writing halyard builds.') self.add_argument(parser, 'docs_repo_owner', defaults, None, help='Owner of the docs repo if one was' ' specified. The default is --github_owner.') self.add_argument( parser, 'skip_existing', defaults, False, type=bool, help='Skip builds if the desired version already exists on bintray.') self.add_argument( parser, 'delete_existing', defaults, None, type=bool, help='Delete pre-existing desired versions if from bintray.')
def init_argparser(self, parser, defaults): super(PublishSpinnakerFactory, self).init_argparser(parser, defaults) HalRunner.add_parser_args(parser, defaults) GitRunner.add_parser_args(parser, defaults) GitRunner.add_publishing_parser_args(parser, defaults) PublishChangelogFactory().init_argparser(parser, defaults) self.add_argument( parser, 'spinnaker_release_alias', defaults, None, help='The spinnaker version alias to publish as.') self.add_argument( parser, 'halyard_bom_bucket', defaults, 'halconfig', help='The bucket manaing halyard BOMs and config profiles.') self.add_argument( parser, 'bom_version', defaults, None, help='The existing bom version usef for this release.') self.add_argument( parser, 'min_halyard_version', defaults, None, help='The minimum halyard version required.')
def init_argparser(self, parser, defaults): """Adds command-specific arguments.""" super(BuildChangelogFactory, self).init_argparser( parser, defaults) self.add_argument( parser, 'include_changelog_details', defaults, False, action='store_true', help='Include a "details" section with the full commit messages' ' in time sequence in the changelog.') HalRunner.add_parser_args(parser, defaults) self.add_argument( parser, 'relative_to_bom_path', defaults, None, help='If specified then produce the changelog relative to the' ' commits found in the specified bom rather than the previous' ' repository tag.') self.add_argument( parser, 'relative_to_bom_version', defaults, None, help='If specified then produce the changelog relative to the' ' commits found in the specified bom rather than the previous' ' repository tag.')
def init_argparser(self, parser, defaults): super(BuildBomCommandFactory, self).init_argparser(parser, defaults) HalRunner.add_parser_args(parser, defaults) buildtool.container_commands.add_bom_parser_args(parser, defaults) buildtool.debian_commands.add_bom_parser_args(parser, defaults) self.add_argument( parser, 'publish_gce_image_project', defaults, None, help='Project to publish images to.') self.add_argument( parser, 'build_number', defaults, DEFAULT_BUILD_NUMBER, help='The build number for this specific bom.') self.add_argument( parser, 'bom_path', defaults, None, help='The path to the local BOM file copy to write out.') self.add_argument( parser, 'bom_dependencies_path', defaults, None, help='The path to YAML file specifying the BOM dependencies section' ' if overriding.') self.add_argument( parser, 'refresh_from_bom_path', defaults, None, help='If specified then use the existing bom_path as a prototype' ' to refresh. Use with --only_repositories to create a new BOM.' ' using only the new versions and build numbers for select repos' ' while keeping the existing versions and build numbers for' ' others.') self.add_argument( parser, 'refresh_from_bom_version', defaults, None, help='Similar to refresh_from_bom_path but using a version obtained.' ' from halyard.') self.add_argument( parser, 'git_fallback_branch', defaults, None, help='The branch to pull for the BOM if --git_branch isnt found.' ' This is intended only for speculative development where' ' some repositories are being modified and the remaing are' ' to come from a release branch.')
def init_argparser(self, parser, defaults): super(BuildGceComponentImagesFactory, self).init_argparser(parser, defaults) HalRunner.add_parser_args(parser, defaults) self.add_argument( parser, 'halyard_release_track', defaults, 'stable', choices=['nightly', 'stable'], help='Which halyard release track to use when installing images.') self.add_argument( parser, 'skip_existing', defaults, False, type=bool, help='Skip builds if the desired image already exists in GCE.') self.add_argument(parser, 'delete_existing', defaults, None, type=bool, help='Delete pre-existing desired images from GCE.') self.add_argument(parser, 'build_gce_service_account', defaults, None, help='Service account for building images.') self.add_argument(parser, 'build_gce_project', defaults, None, help='Project to build image in.') self.add_argument(parser, 'build_gce_zone', defaults, 'us-central1-f', help='Zone to build image in.') halyard_install_sh = 'dev/halyard_install_component.sh' self.add_argument(parser, 'install_image_script', defaults, halyard_install_sh, help='Script for installing images.') publish_image_sh = os.path.join(os.path.dirname(__file__), '..', '..', 'google', 'dev', 'publish_gce_release.sh') self.add_argument(parser, 'publish_gce_image_script', defaults, publish_image_sh, help='Script for publishing images to a project.') self.add_argument( parser, 'git_branch', defaults, None, help='Github branch to get install scripts from.' ' If none, then use the source repo branch that this script' ' is running from.') self.add_argument( parser, 'bintray_org', defaults, None, help='The bintray organization for the bintray_*_repositories.') self.add_argument(parser, 'bintray_debian_repository', defaults, None, help='Repository where built debians were placed.') self.add_argument( parser, 'halyard_bom_bucket', defaults, 'halconfig', help='The bucket manaing halyard BOMs and config profiles.')
def init_argparser(self, parser, defaults): super(PublishHalyardCommandFactory, self).init_argparser(parser, defaults) GradleCommandFactory.add_bom_parser_args(parser, defaults) SpinnakerSourceCodeManager.add_parser_args(parser, defaults) GradleRunner.add_parser_args(parser, defaults) GitRunner.add_publishing_parser_args(parser, defaults) HalRunner.add_parser_args(parser, defaults) self.add_argument( parser, "build_number", defaults, DEFAULT_BUILD_NUMBER, help= "Publishing halyard requires a rebuild. This is the build number" " to use when rebuilding halyard.", ) self.add_argument( parser, "halyard_version", defaults, None, help="The semantic version of the release to publish.", ) self.add_argument( parser, "halyard_version_commits_url", defaults, None, help="URL to file containing version and git commit for successful" " nightly builds. By default this will be" ' "{filename}" in the' " --halyard_bucket_base_url.".format( filename=BuildHalyardCommand.HALYARD_VERSIONS_BASENAME), ) self.add_argument( parser, "halyard_docker_image_base", defaults, None, help="Base Docker image name for writing halyard builds.", ) self.add_argument( parser, "halyard_artifact_registry_image_base", defaults, None, help= "Base Artifact Registry image name for writing halyard builds.", ) self.add_argument( parser, "halyard_bucket_base_url", defaults, None, help="Base Google Cloud Storage URL for writing halyard builds.", ) self.add_argument( parser, "docs_repo_owner", defaults, None, help="Owner of the docs repo if one was" " specified. The default is --github_owner.", ) self.add_argument( parser, "skip_existing", defaults, False, type=bool, help= "Skip builds if the desired version already exists on bintray.", ) self.add_argument( parser, "delete_existing", defaults, None, type=bool, help="Delete pre-existing desired versions if from bintray.", ) self.add_argument( parser, "gcb_project", defaults, None, help="The GCP project ID when using the GCP Container Builder.", ) self.add_argument( parser, "gcb_service_account", defaults, None, help="Google Service Account when using the GCP Container Builder.", ) self.add_argument( parser, "artifact_registry", defaults, None, help="Artifact Registry to push the container images to.", )
def init_argparser(self, parser, defaults): super(BuildBomCommandFactory, self).init_argparser(parser, defaults) HalRunner.add_parser_args(parser, defaults) self.add_argument( parser, "publish_gce_image_project", defaults, None, help="Project to publish images to.", ) self.add_argument( parser, "build_number", defaults, DEFAULT_BUILD_NUMBER, help="The build number for this specific bom.", ) self.add_argument( parser, "bom_path", defaults, None, help="The path to the local BOM file copy to write out.", ) self.add_argument( parser, "bom_dependencies_path", defaults, None, help="The path to YAML file specifying the BOM dependencies section" " if overriding.", ) self.add_argument( parser, "refresh_from_bom_path", defaults, None, help="If specified then use the existing bom_path as a prototype" " to refresh. Use with --only_repositories to create a new BOM." " using only the new versions and build numbers for select repos" " while keeping the existing versions and build numbers for" " others.", ) self.add_argument( parser, "refresh_from_bom_version", defaults, None, help="Similar to refresh_from_bom_path but using a version obtained." " from halyard.", ) self.add_argument( parser, "git_fallback_branch", defaults, None, help="The branch to pull for the BOM if --git_branch isnt found." " This is intended only for speculative development where" " some repositories are being modified and the remaing are" " to come from a release branch.", )
def init_argparser(self, parser, defaults): super(BuildGceComponentImagesFactory, self).init_argparser(parser, defaults) HalRunner.add_parser_args(parser, defaults) self.add_argument( parser, "halyard_release_track", defaults, "stable", choices=["nightly", "stable"], help="Which halyard release track to use when installing images.", ) self.add_argument( parser, "skip_existing", defaults, False, type=bool, help="Skip builds if the desired image already exists in GCE.", ) self.add_argument( parser, "delete_existing", defaults, None, type=bool, help="Delete pre-existing desired images from GCE.", ) self.add_argument( parser, "build_gce_service_account", defaults, None, help="Service account for building images.", ) self.add_argument( parser, "build_gce_project", defaults, None, help="Project to build image in.", ) self.add_argument( parser, "build_gce_zone", defaults, "us-central1-f", help="Zone to build image in.", ) halyard_install_sh = "dev/halyard_install_component.sh" self.add_argument( parser, "install_image_script", defaults, halyard_install_sh, help="Script for installing images.", ) publish_image_sh = os.path.join( os.path.dirname(__file__), "..", "..", "google", "dev", "publish_gce_release.sh", ) self.add_argument( parser, "publish_gce_image_script", defaults, publish_image_sh, help="Script for publishing images to a project.", ) self.add_argument( parser, "git_branch", defaults, None, help="Github branch to get install scripts from." " If none, then use the source repo branch that this script" " is running from.", ) self.add_argument( parser, "bintray_org", defaults, None, help="The bintray organization for the bintray_*_repositories.", ) self.add_argument( parser, "bintray_debian_repository", defaults, None, help="Repository where built debians were placed.", ) self.add_argument( parser, "halyard_bom_bucket", defaults, "halconfig", help="The bucket manaing halyard BOMs and config profiles.", )