Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions samcli/commands/pipeline/bootstrap/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
SHORT_HELP = "Sets up infrastructure resources for AWS SAM CI/CD pipelines."

HELP_TEXT = """Sets up the following infrastructure resources for AWS SAM CI/CD pipelines:
\n\t - Pipeline IAM user with access key ID and secret access key credentials to be shared with the CI/CD provider
\n\t - Pipeline IAM user with access key ID and secret access key credentials to be shared with the CI/CD system
\n\t - Pipeline execution IAM role assumed by the pipeline user to obtain access to the AWS account
\n\t - CloudFormation execution IAM role assumed by CloudFormation to deploy the AWS SAM application
\n\t - Artifacts S3 bucket to hold the AWS SAM build artifacts
Expand All @@ -44,7 +44,7 @@
)
@click.option(
"--pipeline-user",
help="The ARN of the IAM user having its access key ID and secret access key shared with the CI/CD provider. "
help="The ARN of the IAM user having its access key ID and secret access key shared with the CI/CD system. "
"It is used to grant this IAM user the permissions to access the corresponding AWS account. "
"If not provided, the command will create one along with access key ID and secret access key credentials.",
required=False,
Expand Down
7 changes: 5 additions & 2 deletions samcli/commands/pipeline/bootstrap/guided_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,17 @@ def run(self) -> None:
and it will be created by the bootstrap command
"""
if not self.environment_name:
self.environment_name = click.prompt("Environment Name", type=click.STRING)
self.environment_name = click.prompt(
"Environment name (a descriptive name for the environment which will be deployed to this AWS account)",
type=click.STRING,
)

if not self.pipeline_user_arn:
click.echo(
"\nThere must be exactly one pipeline user across all of the environments. "
"If you have ran this command before to bootstrap a previous environment, please "
"provide the ARN of the created pipeline user, otherwise, we will create a new user for you. "
"Please make sure to store the credentials safely with the CI/CD provider."
"Please make sure to store the credentials safely with the CI/CD system."
)
self.pipeline_user_arn = click.prompt(
"Pipeline user [leave blank to create one]", default="", type=click.STRING
Expand Down
2 changes: 1 addition & 1 deletion samcli/commands/pipeline/init/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

SHORT_HELP = "Generates CI/CD pipeline configuration files."
HELP_TEXT = """
Generates CI/CD pipeline configuration files for a chosen CI/CD provider such as Jenkins,
Generates CI/CD pipeline configuration files for a chosen CI/CD system such as Jenkins,
GitLab CI/CD or GitHub Actions
"""

Expand Down
8 changes: 4 additions & 4 deletions samcli/commands/pipeline/init/interactive_init_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def _read_app_pipeline_templates_manifest(pipeline_templates_dir: Path) -> Pipel

def _prompt_pipeline_template(pipeline_templates_manifest: PipelineTemplatesManifest) -> PipelineTemplateMetadata:
"""
Prompts the user a list of the available CI/CD providers along with associated app pipeline templates to choose
Prompts the user a list of the available CI/CD systems along with associated app pipeline templates to choose
one of them

Parameters:
Expand All @@ -217,10 +217,10 @@ def _prompt_pipeline_template(pipeline_templates_manifest: PipelineTemplatesMani

def _prompt_cicd_provider(available_providers: List[Provider]) -> Provider:
"""
Prompts the user a list of the available CI/CD providers to choose from
Prompts the user a list of the available CI/CD systems to choose from

Parameters:
available_providers: List of available CI/CD providers such as Jenkins, Gitlab and CircleCI
available_providers: List of available CI/CD systems such as Jenkins, Gitlab and CircleCI

Returns:
The chosen provider
Expand All @@ -230,7 +230,7 @@ def _prompt_cicd_provider(available_providers: List[Provider]) -> Provider:

question_to_choose_provider = Choice(
key="provider",
text="CI/CD provider",
text="CI/CD system",
options=[p.display_name for p in available_providers],
)
chosen_provider_display_name = question_to_choose_provider.ask()
Expand Down
4 changes: 2 additions & 2 deletions samcli/commands/pipeline/init/pipeline_templates_manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@


class Provider:
""" CI/CD provider such as Jenkins, Gitlab and GitHub-Actions"""
""" CI/CD system such as Jenkins, Gitlab and GitHub-Actions"""

def __init__(self, manifest: Dict) -> None:
self.id: str = manifest["id"]
Expand All @@ -46,7 +46,7 @@ def __init__(self, manifest: Dict) -> None:


class PipelineTemplatesManifest:
""" The metadata of the available CI/CD providers and the pipeline templates"""
""" The metadata of the available CI/CD systems and the pipeline templates"""

def __init__(self, manifest_path: Path) -> None:
try:
Expand Down
2 changes: 1 addition & 1 deletion samcli/lib/pipeline/bootstrap/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class Environment:
aws_region: Optional[str]
The AWS region to deploy this environment to.
pipeline_user: IAMUser
The IAM User having its AccessKeyId and SecretAccessKey credentials shared with the CI/CD provider
The IAM User having its AccessKeyId and SecretAccessKey credentials shared with the CI/CD system
pipeline_execution_role: Resource
The IAM role assumed by the pipeline-user to get access to the AWS account and executes the
CloudFormation stack.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def test_generate_pipeline_configuration_file_from_app_pipeline_template_happy_c

click_mock.prompt.side_effect = [
"1", # App pipeline templates
"2", # choose "Jenkins" when prompt for CI/CD provider. (See pipeline_templates_manifest_mock, Jenkins is the 2nd provider)
"2", # choose "Jenkins" when prompt for CI/CD system. (See pipeline_templates_manifest_mock, Jenkins is the 2nd provider)
"1", # choose "Jenkins pipeline template" when prompt for pipeline template
]

Expand Down Expand Up @@ -205,7 +205,7 @@ def test_generate_pipeline_configuration_file_when_pipeline_template_missing_que

click_mock.prompt.side_effect = [
"1", # App pipeline templates
"2", # choose "Jenkins" when prompt for CI/CD provider. (See pipeline_templates_manifest_mock, Jenkins is the 2nd provider)
"2", # choose "Jenkins" when prompt for CI/CD system. (See pipeline_templates_manifest_mock, Jenkins is the 2nd provider)
"1", # choose "Jenkins pipeline template" when prompt for pipeline template
]

Expand Down