diff --git a/packages/amazon/src/serverGroup/details/AmazonServerGroupActions.tsx b/packages/amazon/src/serverGroup/details/AmazonServerGroupActions.tsx index bdec5a25984..60768290ea5 100644 --- a/packages/amazon/src/serverGroup/details/AmazonServerGroupActions.tsx +++ b/packages/amazon/src/serverGroup/details/AmazonServerGroupActions.tsx @@ -287,7 +287,7 @@ export class AmazonServerGroupActions extends React.Component - {AWSProviderSettings.adHocInfraWritesEnabled && ( + {AWSProviderSettings.adHocInfraWritesEnabled && SETTINGS.adHocInfraEditEnabled && ( Server Group Actions diff --git a/packages/app/src/settings-local.js b/packages/app/src/settings-local.js index dc0a1b821af..2edbb83ea22 100644 --- a/packages/app/src/settings-local.js +++ b/packages/app/src/settings-local.js @@ -3,3 +3,4 @@ e.g., window.spinnakerSettings.defaultInstancePort = 8080; */ +window.spinnakerSettings.kubernetesAdHocInfraEditEnabled = true; diff --git a/packages/core/src/config/settings.ts b/packages/core/src/config/settings.ts index 255c18bd6a5..e62cc4c329b 100644 --- a/packages/core/src/config/settings.ts +++ b/packages/core/src/config/settings.ts @@ -149,7 +149,9 @@ export interface ISpinnakerSettings { triggerTypes: string[]; useClassicFirewallLabels: boolean; kubernetesAdHocInfraWritesEnabled: boolean; + kubernetesAdHocInfraEditEnabled: boolean; changelogUrl: string; + adHocInfraEditEnabled: boolean; } export const SETTINGS: ISpinnakerSettings = (window as any).spinnakerSettings || {}; @@ -158,6 +160,8 @@ export const SETTINGS: ISpinnakerSettings = (window as any).spinnakerSettings || SETTINGS.feature = SETTINGS.feature || {}; SETTINGS.feature.roscoMode = SETTINGS.feature.roscoMode ?? true; SETTINGS.kubernetesAdHocInfraWritesEnabled = SETTINGS.kubernetesAdHocInfraWritesEnabled ?? true; +SETTINGS.kubernetesAdHocInfraEditEnabled = SETTINGS.kubernetesAdHocInfraEditEnabled ?? false; +SETTINGS.adHocInfraEditEnabled = SETTINGS.adHocInfraEditEnabled ?? true; SETTINGS.analytics = SETTINGS.analytics || {}; SETTINGS.providers = SETTINGS.providers || {}; SETTINGS.defaultTimeZone = SETTINGS.defaultTimeZone || 'America/Los_Angeles'; diff --git a/packages/core/src/help/help.contents.ts b/packages/core/src/help/help.contents.ts index ea6772dd1ba..504a7dcb253 100644 --- a/packages/core/src/help/help.contents.ts +++ b/packages/core/src/help/help.contents.ts @@ -239,6 +239,8 @@ const helpContents: { [key: string]: string } = { '

Configures the cluster upon which this destroy operation will act. The target specifies what server group to resolve for the operation.

', 'pipeline.config.jenkins.trigger.propertyFile': '

(Optional) Configures the name to the Jenkins artifact file used to pass in properties to later stages in the Spinnaker pipeline. The contents of this file will now be available as a map under the trigger and accessible via trigger.properties. See Pipeline Expressions docs for more information.

', + 'pipeline.config.jenkins.trigger.unstableBuild': + '

If Jenkins reports the build status as UNSTABLE, Spinnaker will mark the build as SUCCEEDED and start execution of the pipeline.

', 'pipeline.config.jenkins.trigger.payloadConstraints': `

(Optional, Requires Property File) When provided, only a build that contains a Property File with correct constraints will trigger this pipeline. For example, you could restrict the trigger to certain branches by placing the branch name in your Property File and adding a constraint with a key like "branch" and value "master".

The constraint values may be supplied as regex.

`, 'pipeline.config.jenkins.propertyFile': diff --git a/packages/core/src/pipeline/config/triggers/baseBuild/BaseBuildTrigger.tsx b/packages/core/src/pipeline/config/triggers/baseBuild/BaseBuildTrigger.tsx index bee6b644daf..994f638b98c 100644 --- a/packages/core/src/pipeline/config/triggers/baseBuild/BaseBuildTrigger.tsx +++ b/packages/core/src/pipeline/config/triggers/baseBuild/BaseBuildTrigger.tsx @@ -6,7 +6,7 @@ import { BuildServiceType, IgorService } from '../../../../ci/igor.service'; import type { IBuildTrigger } from '../../../../domain'; import { MapEditorInput } from '../../../../forms'; import { HelpField } from '../../../../help'; -import { FormikFormField, TextInput, useLatestPromise } from '../../../../presentation'; +import { CheckboxInput, FormikFormField, TextInput, useLatestPromise } from '../../../../presentation'; export interface IBaseBuildTriggerConfigProps { formik: FormikProps; @@ -80,6 +80,17 @@ export function BaseBuildTrigger(buildTriggerProps: IBaseBuildTriggerConfigProps /> )} + {type == 'jenkins' && ( + } + input={(props) => ( + + )} + /> + )} + { + return SETTINGS.adHocInfraEditEnabled; + }; }, ]); diff --git a/packages/ecs/src/serverGroup/details/serverGroupDetails.html b/packages/ecs/src/serverGroup/details/serverGroupDetails.html index b9c9323938d..5032e5e5ad0 100644 --- a/packages/ecs/src/serverGroup/details/serverGroupDetails.html +++ b/packages/ecs/src/serverGroup/details/serverGroupDetails.html @@ -34,7 +34,11 @@

-
+
-
+
-
+