From 2c7d60249360de7430118d69fb26752be5e40aa6 Mon Sep 17 00:00:00 2001 From: Kaixiang-AWS Date: Tue, 25 Feb 2020 15:51:37 -0800 Subject: [PATCH] feat(codebuild): Add help text to CodeBuild stage (#7948) * feat(codebuild): Add help text to CodeBuild stage * Revise some help text Co-authored-by: Clare Liguori --- app/scripts/modules/core/src/help/help.contents.ts | 7 +++++++ .../stages/awsCodeBuild/AwsCodeBuildStageForm.tsx | 10 +++++++++- .../awsCodeBuild/EditAwsCodeBuildSourceModal.tsx | 3 +++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/app/scripts/modules/core/src/help/help.contents.ts b/app/scripts/modules/core/src/help/help.contents.ts index 2566e7a2938..7639447b58b 100644 --- a/app/scripts/modules/core/src/help/help.contents.ts +++ b/app/scripts/modules/core/src/help/help.contents.ts @@ -479,6 +479,13 @@ const helpContents: { [key: string]: string } = { 'pipeline.config.entitytags.value': `Value can either be a string or an object. If you want to use an object, input a valid JSON string.`, 'pipeline.config.entitytags.region': `(Optional) Target a specific region, use * if you want to apply to all regions.`, 'pipeline.config.deliveryConfig.manifest': `(Optional) Name of the file with your Delivery Config manifest. Leave blank to use the default name (${SETTINGS.managedDelivery?.defaultManifest}).`, + 'pipeline.config.codebuild.source': `(Optional) Source of the build. It will be overrided to Spinnaker artifact if checked. If not checked, source configured in CodeBuild project will be used.`, + 'pipeline.config.codebuild.sourceType': `(Optional) Type of the source. It can be specified explicitly, otherwise it will be inferred from source artifact.`, + 'pipeline.config.codebuild.sourceVersion': `(Optional) Source version of the build. If not specified, the artifact version will be used. If artifact doesn't have a version, the latest version will be used. See the CodeBuild reference for more information.`, + 'pipeline.config.codebuild.buildspec': `(Optional) Inline buildspec definition of the build. If not specified, buildspec configured in CodeBuild project will be used.`, + 'pipeline.config.codebuild.secondarySources': `(Optional) Secondary sources of the build. It can be overrided by adding Spinnaker Artifacts. If not specified, secondary sources configured in CodeBuild project will be used.`, + 'pipeline.config.codebuild.image': `(Optional) Image in which the build will run. It can be overrided by specifying the name of the image. If not specified, image configured in CodeBuild project will be used.`, + 'pipeline.config.codebuild.envVar': `(Optional) Environment variables that will be propagated into the build.`, }; Object.keys(helpContents).forEach(key => HelpContentsRegistry.register(key, helpContents[key])); diff --git a/app/scripts/modules/core/src/pipeline/config/stages/awsCodeBuild/AwsCodeBuildStageForm.tsx b/app/scripts/modules/core/src/pipeline/config/stages/awsCodeBuild/AwsCodeBuildStageForm.tsx index 7787d8b7597..477d4de7e6e 100644 --- a/app/scripts/modules/core/src/pipeline/config/stages/awsCodeBuild/AwsCodeBuildStageForm.tsx +++ b/app/scripts/modules/core/src/pipeline/config/stages/awsCodeBuild/AwsCodeBuildStageForm.tsx @@ -3,6 +3,7 @@ import { get } from 'lodash'; import { FormikFormField, + HelpField, IArtifact, IExpectedArtifact, IFormInputProps, @@ -75,6 +76,7 @@ export function AwsCodeBuildStageForm(props: IAwsCodeBuildStageFormProps & IForm

Source Configuration

} label="Source" name="source.sourceOverride" input={(inputProps: IFormInputProps) => ( @@ -84,7 +86,8 @@ export function AwsCodeBuildStageForm(props: IAwsCodeBuildStageFormProps & IForm {get(stage, 'source.sourceOverride') === true && ( } + label="Source Type" name="source.sourceType" input={(inputProps: IFormInputProps) => ( @@ -118,12 +121,14 @@ export function AwsCodeBuildStageForm(props: IAwsCodeBuildStageFormProps & IForm )} } label="Source Version" name="source.sourceVersion" input={(inputProps: IFormInputProps) => } /> } label="Buildspec" name="source.buildspec" input={(inputProps: IFormInputProps) => ( @@ -136,6 +141,7 @@ export function AwsCodeBuildStageForm(props: IAwsCodeBuildStageFormProps & IForm /> } label="Secondary Sources" name="secondarySources" input={(inputProps: IFormInputProps) => ( @@ -151,6 +157,7 @@ export function AwsCodeBuildStageForm(props: IAwsCodeBuildStageFormProps & IForm

Environment Configuration

} label="Image" name="image" input={(inputProps: IFormInputProps) => } @@ -158,6 +165,7 @@ export function AwsCodeBuildStageForm(props: IAwsCodeBuildStageFormProps & IForm

Advanced Configuration

} label="Environment Variables" name="environmentVariables" input={(inputProps: IFormInputProps) => ( diff --git a/app/scripts/modules/core/src/pipeline/config/stages/awsCodeBuild/EditAwsCodeBuildSourceModal.tsx b/app/scripts/modules/core/src/pipeline/config/stages/awsCodeBuild/EditAwsCodeBuildSourceModal.tsx index 3d5e5cf2df0..d446f887150 100644 --- a/app/scripts/modules/core/src/pipeline/config/stages/awsCodeBuild/EditAwsCodeBuildSourceModal.tsx +++ b/app/scripts/modules/core/src/pipeline/config/stages/awsCodeBuild/EditAwsCodeBuildSourceModal.tsx @@ -6,6 +6,7 @@ import { Modal } from 'react-bootstrap'; import { FormikFormField, FormValidator, + HelpField, IArtifact, IExpectedArtifact, IFormInputProps, @@ -102,6 +103,7 @@ export class EditAwsCodeBuildSourceModal extends React.Component } label="Source Type" name="type" input={(inputProps: IFormInputProps) => ( @@ -110,6 +112,7 @@ export class EditAwsCodeBuildSourceModal extends React.Component } label="Source Version" name="sourceVersion" input={(inputProps: IFormInputProps) => }