@spinnaker/core 0.14.1 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +59 -0
- package/dist/config/settings.d.ts +1 -1
- package/dist/core.module.d.ts +1 -1
- package/dist/index.js +89 -47
- package/dist/index.js.map +1 -1
- package/dist/instance/instanceType.service.d.ts +3 -2
- package/dist/managed/artifactActions/ArtifactActions.d.ts +24 -0
- package/dist/managed/constraints/registry.d.ts +13 -2
- package/dist/managed/environmentBaseElements/EnvironmentItem.d.ts +3 -2
- package/dist/managed/graphql/graphql-sdk.d.ts +123 -11
- package/dist/managed/overview/Resource.d.ts +5 -2
- package/dist/managed/overview/artifact/Artifact.d.ts +2 -1
- package/dist/managed/overview/artifact/ArtifactActionModal.d.ts +20 -9
- package/dist/managed/overview/artifact/ArtifactCollapsibleSection.d.ts +7 -0
- package/dist/managed/overview/artifact/ArtifactVersions.d.ts +9 -0
- package/dist/managed/overview/artifact/CurrentVersion.d.ts +7 -6
- package/dist/managed/overview/artifact/VersionTitle.d.ts +9 -0
- package/dist/managed/overview/artifact/hooks.d.ts +6 -11
- package/dist/managed/overview/artifact/useCreateRollbackActions.hook.d.ts +3 -0
- package/dist/managed/overview/artifact/utils.d.ts +15 -14
- package/dist/managed/overview/useIsUpdatingResources.hook.d.ts +1 -0
- package/dist/managed/resources/ResourceTitle.d.ts +3 -3
- package/dist/managed/resources/resourceRegistry.d.ts +1 -1
- package/dist/managed/utils/ActionModal.d.ts +1 -0
- package/dist/managed/utils/defaults.d.ts +1 -0
- package/dist/managed/versionMetadata/MetadataComponents.d.ts +18 -19
- package/dist/managed/versionMetadata/VersionMetadata.d.ts +6 -2
- package/dist/search/infrastructure/infrastructureSearch.service.d.ts +2 -1
- package/dist/securityGroup/index.d.ts +2 -1
- package/package.json +6 -6
- package/src/account/AccountSelectInput.spec.tsx +9 -4
- package/src/account/AccountService.spec.ts +6 -6
- package/src/api/ApiService.spec.ts +2 -2
- package/src/api/ApiServiceDeprecated.spec.ts +5 -2
- package/src/application/application.model.spec.ts +78 -79
- package/src/application/applications.state.provider.ts +1 -1
- package/src/application/config/applicationAttributes.directive.html +6 -2
- package/src/application/config/applicationAttributes.directive.js +4 -0
- package/src/application/config/applicationConfig.view.html +14 -1
- package/src/application/config/customBanner/CustomBannerConfig.spec.tsx +3 -3
- package/src/application/config/dataSources/applicationDataSourceEditor.component.spec.ts +4 -3
- package/src/application/config/footer/configSectionFooter.component.spec.ts +2 -1
- package/src/application/listExtractor/AppListExtractor.spec.ts +4 -4
- package/src/application/modal/PermissionsConfigurer.spec.tsx +3 -2
- package/src/application/modal/createApplication.modal.controller.js +7 -6
- package/src/application/modal/createApplication.modal.controller.spec.js +1 -0
- package/src/application/modal/editApplication.controller.modal.js +1 -0
- package/src/application/modal/editApplication.html +2 -2
- package/src/application/modal/validation/ApplicationNameValidator.spec.ts +2 -1
- package/src/application/modal/validation/validateApplicationName.directive.spec.ts +3 -2
- package/src/application/nav/ApplicationNavigation.spec.tsx +12 -11
- package/src/application/nav/NavItem.spec.tsx +7 -5
- package/src/application/nav/NavSection.spec.tsx +3 -2
- package/src/application/search/Applications.tsx +48 -0
- package/src/application/service/ApplicationReader.spec.ts +13 -8
- package/src/application/service/ApplicationWriter.spec.ts +4 -2
- package/src/application/service/InferredApplicationWarningService.spec.ts +2 -3
- package/src/artifact/expectedArtifact.service.spec.ts +2 -1
- package/src/artifact/react/ExpectedArtifactSelector.spec.tsx +2 -3
- package/src/authentication/AuthenticationInitializer.spec.ts +2 -1
- package/src/authentication/AuthenticationService.spec.ts +2 -1
- package/src/authentication/authentication.interceptor.spec.ts +4 -2
- package/src/cache/cacheInitializer.service.spec.ts +7 -4
- package/src/cache/infrastructureCaches.spec.ts +4 -4
- package/src/chaosMonkey/chaosMonkeyExceptions.component.spec.ts +4 -2
- package/src/cloudProvider/providerSelection/ProviderSelectionService.spec.ts +23 -21
- package/src/cluster/ClusterRuleMatcher.spec.ts +2 -1
- package/src/cluster/cluster.service.spec.ts +7 -7
- package/src/cluster/filter/ClusterFilterService.spec.ts +15 -14
- package/src/cluster/filter/LabelFilter.spec.tsx +3 -3
- package/src/cluster/filter/MultiselectModel.spec.ts +2 -2
- package/src/cluster/filter/labelFilterUtils.spec.ts +3 -7
- package/src/config/settings.ts +1 -3
- package/src/core.module.ts +1 -1
- package/src/filterModel/dependentFilter/DependentFilterService.spec.ts +1 -1
- package/src/function/filter/FunctionFilterService.spec.ts +5 -3
- package/src/function/function.read.service.spec.ts +4 -3
- package/src/header/customBanner/CustomBanner.spec.tsx +3 -4
- package/src/healthCounts/HealthCounts.spec.tsx +2 -2
- package/src/history/recentHistory.service.spec.ts +2 -1
- package/src/insight/InsightMenu.spec.tsx +9 -6
- package/src/insight/InsightMenu.tsx +3 -0
- package/src/instance/instance.write.service.spec.ts +8 -7
- package/src/instance/instanceType.service.ts +12 -2
- package/src/instance/instanceTypeService.spec.ts +2 -1
- package/src/loadBalancer/LoadBalancersTag.spec.tsx +8 -6
- package/src/loadBalancer/filter/LoadBalancerFilterService.spec.ts +2 -2
- package/src/managed/Environments.less +4 -4
- package/src/managed/Environments.tsx +1 -1
- package/src/managed/RelativeTimestamp.tsx +8 -6
- package/src/managed/artifactActions/ArtifactActions.tsx +77 -0
- package/src/managed/constraints/AllowedTimes.spec.ts +2 -1
- package/src/managed/constraints/registry.tsx +27 -1
- package/src/managed/environmentBaseElements/BaseEnvironment.less +3 -3
- package/src/managed/environmentBaseElements/EnvironmentItem.tsx +11 -4
- package/src/managed/graphql/graphql-sdk.ts +218 -29
- package/src/managed/graphql/schema.graphql +14 -1
- package/src/managed/overview/EnvironmentOverview.tsx +12 -15
- package/src/managed/overview/EnvironmentsOverview.less +6 -5
- package/src/managed/overview/PreviewEnvironments.tsx +0 -3
- package/src/managed/overview/Resource.less +1 -1
- package/src/managed/overview/Resource.tsx +62 -47
- package/src/managed/overview/artifact/Artifact.less +27 -52
- package/src/managed/overview/artifact/Artifact.tsx +86 -22
- package/src/managed/overview/artifact/ArtifactActionModal.less +19 -0
- package/src/managed/overview/artifact/ArtifactActionModal.tsx +150 -68
- package/src/managed/overview/artifact/ArtifactCollapsibleSection.tsx +32 -0
- package/src/managed/overview/artifact/ArtifactVersionTasks.tsx +2 -0
- package/src/managed/overview/artifact/{PendingVersion.tsx → ArtifactVersions.tsx} +35 -25
- package/src/managed/overview/artifact/Constraints.tsx +61 -21
- package/src/managed/overview/artifact/CurrentVersion.tsx +42 -27
- package/src/managed/overview/artifact/VersionTitle.tsx +18 -0
- package/src/managed/overview/artifact/hooks.ts +71 -34
- package/src/managed/overview/artifact/useCreateRollbackActions.hook.ts +75 -0
- package/src/managed/overview/artifact/utils.spec.ts +1 -1
- package/src/managed/overview/artifact/utils.ts +47 -80
- package/src/managed/overview/baseStyles.less +124 -88
- package/src/managed/overview/queries.graphql +54 -13
- package/src/managed/overview/useIsUpdatingResources.hook.ts +9 -0
- package/src/managed/resources/ResourceTitle.tsx +12 -5
- package/src/managed/utils/ActionModal.tsx +4 -1
- package/src/managed/utils/defaults.ts +3 -0
- package/src/managed/utils/useNotifyOnError.hook.ts +1 -1
- package/src/managed/versionMetadata/MetadataComponents.tsx +102 -70
- package/src/managed/versionMetadata/VersionMetadata.less +17 -18
- package/src/managed/versionMetadata/VersionMetadata.tsx +23 -31
- package/src/managed/versionsHistory/VersionContent.tsx +20 -13
- package/src/managed/versionsHistory/VersionHeading.tsx +2 -1
- package/src/managed/versionsHistory/VersionsHistory.less +11 -3
- package/src/manifest/PodNameProvider.spec.ts +1 -1
- package/src/navigation/customParamTypes.spec.ts +1 -1
- package/src/pagerDuty/pagerDuty.read.service.spec.ts +4 -2
- package/src/pagerDuty/pagerDutyTag.component.spec.ts +7 -3
- package/src/pipeline/config/PipelineRegistry.spec.ts +38 -37
- package/src/pipeline/config/actions/templateJson/ShowPipelineTemplateJsonModal.spec.tsx +3 -3
- package/src/pipeline/config/pipelineConfigurer.controller.spec.ts +3 -3
- package/src/pipeline/config/services/PipelineConfigService.spec.ts +4 -3
- package/src/pipeline/config/stages/bakeManifest/helm/BakeHelmConfigForm.spec.tsx +51 -8
- package/src/pipeline/config/stages/bakeManifest/helm/BakeHelmConfigForm.tsx +36 -6
- package/src/pipeline/config/stages/findArtifactFromExecution/findArtifactFromExecution.controller.spec.ts +2 -1
- package/src/pipeline/config/stages/manualJudgment/manualJudgment.service.spec.ts +6 -4
- package/src/pipeline/config/stages/travis/travisExecutionDetails.controller.spec.ts +5 -2
- package/src/pipeline/config/stages/travis/travisStage.controller.spec.ts +3 -2
- package/src/pipeline/config/stages/unmatchedStageTypeStage/unmatchedStageTypeStage.controller.spec.ts +2 -1
- package/src/pipeline/config/stages/wait/SkipWait.tsx +3 -1
- package/src/pipeline/config/stages/wercker/werckerExecutionDetails.controller.spec.ts +5 -2
- package/src/pipeline/config/stages/wercker/werckerStage.controller.spec.ts +3 -2
- package/src/pipeline/config/templates/Variable.spec.tsx +6 -5
- package/src/pipeline/config/templates/configurePipelineTemplateModal.controller.spec.ts +7 -8
- package/src/pipeline/config/templates/v2/configurePipelineTemplateModalV2.controller.spec.ts +7 -8
- package/src/pipeline/config/templates/v2/pipelineTemplateV2.service.spec.ts +1 -1
- package/src/pipeline/config/triggers/TriggersPageContent.spec.tsx +4 -4
- package/src/pipeline/config/triggers/TriggersPageContent.tsx +1 -2
- package/src/pipeline/config/triggers/artifacts/docker/defaultDocker.artifact.spec.ts +1 -2
- package/src/pipeline/config/validation/pipelineConfig.validator.spec.ts +14 -15
- package/src/pipeline/create/CreatePipelineModal.spec.tsx +9 -7
- package/src/pipeline/details/executionDetailsSection.service.spec.ts +3 -2
- package/src/pipeline/executions/Executions.spec.tsx +9 -6
- package/src/pipeline/executions/executionAction/ExecutionAction.spec.tsx +1 -1
- package/src/pipeline/executions/executionGroup/ExecutionGroup.tsx +2 -1
- package/src/pipeline/filter/executionFilter.service.spec.ts +1 -1
- package/src/pipeline/pipeline.dataSource.spec.ts +8 -7
- package/src/pipeline/service/ExecutionsTransformer.spec.ts +2 -2
- package/src/pipeline/service/execution.service.spec.ts +7 -5
- package/src/pipeline/status/Artifact.spec.tsx +7 -6
- package/src/pipeline/status/ArtifactList.spec.tsx +7 -6
- package/src/pipeline/status/ExecutionParameters.spec.tsx +5 -4
- package/src/pipeline/status/ResolvedArtifactList.spec.tsx +7 -6
- package/src/plugins/deck.plugin.spec.ts +4 -2
- package/src/plugins/plugin.registry.spec.ts +6 -4
- package/src/presentation/forms/SpinFormik.spec.tsx +3 -2
- package/src/presentation/forms/fields/FormikFormField.spec.tsx +3 -3
- package/src/presentation/forms/hooks/useSaveRestoreMutuallyExclusiveFields.hook.spec.tsx +4 -3
- package/src/presentation/forms/inputs/ChecklistInput.spec.tsx +1 -1
- package/src/presentation/forms/inputs/RadioButtonInput.spec.tsx +2 -1
- package/src/presentation/forms/inputs/SelectInput.spec.tsx +2 -1
- package/src/presentation/forms/inputs/hooks/useInternalValidator.hook.spec.tsx +4 -3
- package/src/presentation/forms/validation/FormValidator.spec.ts +2 -2
- package/src/presentation/forms/validation/useValidationData.spec.tsx +4 -3
- package/src/presentation/hooks/useContainerClassNames.hook.spec.tsx +2 -1
- package/src/presentation/hooks/useData.hook.spec.tsx +3 -2
- package/src/presentation/hooks/useDebouncedValue.hook.spec.tsx +1 -1
- package/src/presentation/hooks/useDeepObjectDiff.hook.spec.tsx +2 -1
- package/src/presentation/hooks/useEventListener.hook.spec.tsx +2 -1
- package/src/presentation/hooks/useForceUpdate.hook.spec.tsx +2 -1
- package/src/presentation/hooks/useInterval.hook.spec.tsx +2 -1
- package/src/presentation/hooks/useIsMountedRef.hook.spec.tsx +1 -1
- package/src/presentation/hooks/useLatestCallback.hook.spec.tsx +2 -1
- package/src/presentation/hooks/useLatestPromise.hook.spec.tsx +9 -3
- package/src/presentation/hooks/useMountStatusRef.hook.spec.tsx +3 -1
- package/src/presentation/hooks/usePollingData.hook.spec.tsx +3 -2
- package/src/presentation/hooks/usePrevious.hook.spec.tsx +2 -1
- package/src/presentation/navigation/pageNavigator.component.spec.ts +6 -6
- package/src/presentation/spel/SpelInput.spec.tsx +9 -4
- package/src/presentation/spel/SpelService.spec.ts +1 -1
- package/src/scheduler/SchedulerFactory.spec.ts +2 -1
- package/src/search/infrastructure/infrastructure.controller.js +3 -0
- package/src/search/infrastructure/infrastructureSearch.service.ts +3 -2
- package/src/search/widgets/Filter.spec.tsx +5 -3
- package/src/search/widgets/Filters.spec.tsx +5 -3
- package/src/search/widgets/Search.spec.tsx +4 -2
- package/src/securityGroup/index.ts +2 -1
- package/src/securityGroup/securityGroupReader.service.spec.ts +8 -10
- package/src/serverGroup/configure/common/deployInitializer.component.spec.ts +7 -3
- package/src/serverGroup/configure/common/v2instanceArchetypeSelector.component.ts +1 -1
- package/src/serverGroup/details/capacity/CapacityDetailsSection.spec.tsx +1 -1
- package/src/serverGroup/details/scalingActivities/ScalingActivitiesModal.spec.ts +2 -1
- package/src/serverGroup/details/serverGroupWarningMessage.service.spec.ts +4 -4
- package/src/serverGroup/serverGroupWriter.service.spec.ts +10 -8
- package/src/slack/SlackReader.spec.ts +2 -1
- package/src/subnet/subnet.read.service.spec.ts +4 -3
- package/src/task/monitor/taskMonitor.spec.ts +6 -5
- package/src/task/task.dataSource.spec.ts +5 -4
- package/src/task/task.write.service.spec.ts +3 -1
- package/src/utils/clipboard/CopyToClipboard.spec.tsx +2 -1
- package/src/utils/json/json.utility.service.spec.ts +2 -1
- package/src/utils/timeFormatters.spec.ts +3 -2
- package/src/utils/workerPool.spec.ts +2 -1
- package/src/widgets/ApplicationsPickerInput.spec.tsx +3 -2
- package/src/widgets/spelText/SpelAutocompleteService.spec.ts +4 -3
- package/src/widgets/tags/Tag.spec.tsx +4 -2
- package/src/widgets/tags/TagList.spec.tsx +5 -3
- package/src/yamlEditor/yamlEditorUtils.spec.ts +1 -1
- package/dist/managed/overview/artifact/PendingVersion.d.ts +0 -7
|
@@ -2,13 +2,14 @@ import { mock } from 'angular';
|
|
|
2
2
|
import { map } from 'lodash';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
|
|
5
|
+
import { PipelineRegistry } from './PipelineRegistry';
|
|
6
|
+
import type { IRegion } from '../../account/AccountService';
|
|
5
7
|
import { SETTINGS } from '../../config';
|
|
6
|
-
import { IStage,
|
|
7
|
-
import { IRegion } from '../../account/AccountService';
|
|
8
|
-
import { Registry } from '../../registry';
|
|
8
|
+
import type { IStage, IStageTypeConfig, ITriggerTypeConfig } from '../../domain';
|
|
9
9
|
import { ITriggerTemplateComponentProps } from '../manualExecution/TriggerTemplate';
|
|
10
|
-
import {
|
|
11
|
-
import { IPreconfiguredJob
|
|
10
|
+
import { Registry } from '../../registry';
|
|
11
|
+
import type { IPreconfiguredJob } from './stages/preconfiguredJob';
|
|
12
|
+
import { makePreconfiguredJobStage, PreconfiguredJobReader } from './stages/preconfiguredJob';
|
|
12
13
|
|
|
13
14
|
const mockProviderAccount = {
|
|
14
15
|
accountId: 'abc',
|
|
@@ -111,35 +112,35 @@ describe('PipelineRegistry: API', function () {
|
|
|
111
112
|
it(
|
|
112
113
|
'augments provider stages with parent keys, labels, manualExecutionComponents, and descriptions',
|
|
113
114
|
mock.inject(function () {
|
|
114
|
-
const CompA = (
|
|
115
|
+
const CompA = () => React.createElement('a');
|
|
115
116
|
const baseStage = {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
117
|
+
key: 'c',
|
|
118
|
+
useBaseProvider: true,
|
|
119
|
+
description: 'c description',
|
|
120
|
+
label: 'the c',
|
|
121
|
+
manualExecutionComponent: CompA,
|
|
122
|
+
};
|
|
123
|
+
const augmentedA = {
|
|
124
|
+
key: 'd',
|
|
125
|
+
provides: 'c',
|
|
126
|
+
description: 'c description',
|
|
127
|
+
label: 'the c',
|
|
128
|
+
manualExecutionComponent: CompA,
|
|
129
|
+
} as any;
|
|
130
|
+
const augmentedB = {
|
|
131
|
+
key: 'e',
|
|
132
|
+
provides: 'c',
|
|
133
|
+
description: 'c description',
|
|
134
|
+
label: 'the c',
|
|
135
|
+
manualExecutionComponent: CompA,
|
|
136
|
+
};
|
|
137
|
+
const augmentedC = {
|
|
138
|
+
key: 'c',
|
|
139
|
+
provides: 'c',
|
|
140
|
+
description: 'c description',
|
|
141
|
+
label: 'the c',
|
|
142
|
+
manualExecutionComponent: CompA,
|
|
143
|
+
};
|
|
143
144
|
Registry.pipeline.registerStage(baseStage as IStageTypeConfig);
|
|
144
145
|
Registry.pipeline.registerStage({ key: 'd', provides: 'c' } as IStageTypeConfig);
|
|
145
146
|
Registry.pipeline.registerStage({ key: 'e', provides: 'c' } as IStageTypeConfig);
|
|
@@ -153,8 +154,8 @@ describe('PipelineRegistry: API', function () {
|
|
|
153
154
|
it(
|
|
154
155
|
'allows provider stages to override of label, description, manualExecutionComponent',
|
|
155
156
|
mock.inject(function () {
|
|
156
|
-
const CompA = (
|
|
157
|
-
const CompB = (
|
|
157
|
+
const CompA = () => React.createElement('a');
|
|
158
|
+
const CompB = () => React.createElement('b');
|
|
158
159
|
Registry.pipeline.registerStage({
|
|
159
160
|
key: 'a',
|
|
160
161
|
useBaseProvider: true,
|
|
@@ -467,7 +468,7 @@ describe('PipelineRegistry: API', function () {
|
|
|
467
468
|
});
|
|
468
469
|
|
|
469
470
|
it('hasManualExecutionComponentForTriggerType returns true if declared and available', function () {
|
|
470
|
-
const CompA = (
|
|
471
|
+
const CompA = () => React.createElement('a');
|
|
471
472
|
Registry.pipeline.registerTrigger({ key: 'cron', manualExecutionComponent: CompA } as ITriggerTypeConfig);
|
|
472
473
|
expect(Registry.pipeline.hasManualExecutionComponentForTriggerType('cron')).toBe(true);
|
|
473
474
|
});
|
|
@@ -479,7 +480,7 @@ describe('PipelineRegistry: API', function () {
|
|
|
479
480
|
});
|
|
480
481
|
|
|
481
482
|
it('hasManualExecutionComponentForTriggerType returns handler if declared and available', function () {
|
|
482
|
-
const CompA = (
|
|
483
|
+
const CompA = () => React.createElement('a');
|
|
483
484
|
Registry.pipeline.registerTrigger({ key: 'cron', manualExecutionComponent: CompA } as ITriggerTypeConfig);
|
|
484
485
|
expect(Registry.pipeline.getManualExecutionComponentForTriggerType('cron')).toEqual(CompA);
|
|
485
486
|
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { mount } from 'enzyme';
|
|
2
|
+
import React from 'react';
|
|
3
3
|
|
|
4
|
-
import { IPipeline, IPipelineTemplateV2 } from '../../../../domain';
|
|
5
|
-
import { PipelineTemplateV2Service } from '../../templates/v2/pipelineTemplateV2.service';
|
|
6
4
|
import { ShowPipelineTemplateJsonModal } from './ShowPipelineTemplateJsonModal';
|
|
5
|
+
import type { IPipeline, IPipelineTemplateV2 } from '../../../../domain';
|
|
6
|
+
import { PipelineTemplateV2Service } from '../../templates/v2/pipelineTemplateV2.service';
|
|
7
7
|
|
|
8
8
|
describe('<ShowPipelineTemplateJsonModal />', () => {
|
|
9
9
|
const mockPipeline: Partial<IPipeline> = {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { IController, IControllerService, IQService, IRootScopeService, IScope, IWindowService } from 'angular';
|
|
1
|
+
import type { IController, IControllerService, IQService, IRootScopeService, IScope, IWindowService } from 'angular';
|
|
2
2
|
|
|
3
3
|
import { ApplicationModelBuilder } from '../../application/applicationModel.builder';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import type {
|
|
6
5
|
IDockerTrigger,
|
|
7
6
|
IGitTrigger,
|
|
8
7
|
INotification,
|
|
@@ -10,6 +9,7 @@ import {
|
|
|
10
9
|
IPipelineTemplateConfigV2,
|
|
11
10
|
IPipelineTemplatePlanV2,
|
|
12
11
|
} from '../../domain';
|
|
12
|
+
import { PipelineConfigService } from './services/PipelineConfigService';
|
|
13
13
|
|
|
14
14
|
const githubTrigger: IGitTrigger = {
|
|
15
15
|
branch: 'master',
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { mockHttpClient } from '../../../api/mock/jasmine';
|
|
2
1
|
import { mock } from 'angular';
|
|
3
|
-
|
|
4
|
-
import { IPipeline } from '../../../domain/IPipeline';
|
|
2
|
+
|
|
5
3
|
import { PipelineConfigService } from './PipelineConfigService';
|
|
4
|
+
import { mockHttpClient } from '../../../api/mock/jasmine';
|
|
5
|
+
import type { IPipeline } from '../../../domain/IPipeline';
|
|
6
|
+
import type { IStage } from '../../../domain/IStage';
|
|
6
7
|
|
|
7
8
|
describe('PipelineConfigService', () => {
|
|
8
9
|
let $scope: ng.IScope;
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { mount } from 'enzyme';
|
|
3
|
-
import { IStage } from '../../../../../domain';
|
|
4
|
-
import { REACT_MODULE } from '../../../../../reactShims';
|
|
5
1
|
import { mock } from 'angular';
|
|
6
|
-
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
import { AccountService } from '../../../../../account';
|
|
2
|
+
import { mount } from 'enzyme';
|
|
3
|
+
import React from 'react';
|
|
10
4
|
|
|
11
5
|
import { StageConfigField } from '../../../..';
|
|
12
6
|
import { BakeHelmConfigForm } from './BakeHelmConfigForm';
|
|
7
|
+
import { AccountService } from '../../../../../account';
|
|
8
|
+
import { ApplicationModelBuilder } from '../../../../../application';
|
|
9
|
+
import { ExpectedArtifactService } from '../../../../../artifact';
|
|
10
|
+
import type { IExpectedArtifact, IStage } from '../../../../../domain';
|
|
13
11
|
import { SpinFormik } from '../../../../../presentation';
|
|
12
|
+
import { REACT_MODULE } from '../../../../../reactShims';
|
|
14
13
|
|
|
15
14
|
describe('<BakeHelmConfigForm />', () => {
|
|
16
15
|
beforeEach(mock.module(REACT_MODULE));
|
|
@@ -86,4 +85,48 @@ describe('<BakeHelmConfigForm />', () => {
|
|
|
86
85
|
|
|
87
86
|
expect(component.find(StageConfigField).findWhere((x) => x.text() === helmChartFilePathFieldName).length).toBe(0);
|
|
88
87
|
});
|
|
88
|
+
|
|
89
|
+
it('render the helm chart file path if the id of the git artifact is given but the account value does not exist', async () => {
|
|
90
|
+
const expectedArtifactDisplayName = 'test-artifact';
|
|
91
|
+
const expectedArtifactId = 'test-artifact-id';
|
|
92
|
+
const expectedGitArtifact: IExpectedArtifact = {
|
|
93
|
+
defaultArtifact: {
|
|
94
|
+
customKind: true,
|
|
95
|
+
id: 'defaultArtifact-id',
|
|
96
|
+
},
|
|
97
|
+
displayName: expectedArtifactDisplayName,
|
|
98
|
+
id: expectedArtifactId,
|
|
99
|
+
matchArtifact: {
|
|
100
|
+
artifactAccount: 'gitrepo',
|
|
101
|
+
id: expectedArtifactId,
|
|
102
|
+
reference: 'git repo',
|
|
103
|
+
type: 'git/repo',
|
|
104
|
+
version: 'master',
|
|
105
|
+
},
|
|
106
|
+
useDefaultArtifact: false,
|
|
107
|
+
usePriorArtifact: false,
|
|
108
|
+
};
|
|
109
|
+
const stage = ({
|
|
110
|
+
inputArtifacts: [{ id: expectedArtifactId }],
|
|
111
|
+
} as unknown) as IStage;
|
|
112
|
+
|
|
113
|
+
spyOn(ExpectedArtifactService, 'getExpectedArtifactsAvailableToStage').and.returnValue([expectedGitArtifact]);
|
|
114
|
+
|
|
115
|
+
const props = getProps();
|
|
116
|
+
|
|
117
|
+
const component = mount(
|
|
118
|
+
<SpinFormik
|
|
119
|
+
initialValues={stage}
|
|
120
|
+
onSubmit={() => null}
|
|
121
|
+
validate={() => null}
|
|
122
|
+
render={(formik) => <BakeHelmConfigForm {...props} formik={formik} />}
|
|
123
|
+
/>,
|
|
124
|
+
);
|
|
125
|
+
|
|
126
|
+
await new Promise((resolve) => setTimeout(resolve)); // wait one js tick for promise to resolve
|
|
127
|
+
component.setProps({}); // force a re-render
|
|
128
|
+
|
|
129
|
+
expect(component.find('.Select-value-label > span').text().includes(expectedArtifactDisplayName)).toBe(true);
|
|
130
|
+
expect(component.find(StageConfigField).findWhere((x) => x.text() === helmChartFilePathFieldName).length).toBe(1);
|
|
131
|
+
});
|
|
89
132
|
});
|
|
@@ -2,7 +2,12 @@ import React from 'react';
|
|
|
2
2
|
|
|
3
3
|
import type { IFormikStageConfigInjectedProps } from '../../FormikStageConfig';
|
|
4
4
|
import { AccountService } from '../../../../../account';
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
ArtifactTypePatterns,
|
|
7
|
+
excludeAllTypesExcept,
|
|
8
|
+
ExpectedArtifactService,
|
|
9
|
+
StageArtifactSelectorDelegate,
|
|
10
|
+
} from '../../../../../artifact';
|
|
6
11
|
import { StageConfigField } from '../../common/stageConfigField/StageConfigField';
|
|
7
12
|
import type { IArtifact, IExpectedArtifact } from '../../../../../domain';
|
|
8
13
|
import { MapEditor } from '../../../../../forms';
|
|
@@ -41,6 +46,25 @@ export class BakeHelmConfigForm extends React.Component<IFormikStageConfigInject
|
|
|
41
46
|
},
|
|
42
47
|
]);
|
|
43
48
|
}
|
|
49
|
+
|
|
50
|
+
// If the Expected Artifact id is provided but the account is not, then attempt to find the artifact from
|
|
51
|
+
// upstream stages and set the account value.
|
|
52
|
+
// This is needed because helm chart file path field will need to be rendered if the artifact has a git repo account type
|
|
53
|
+
const expectedArtifact = this.getInputArtifact(stage, 0);
|
|
54
|
+
if (expectedArtifact.id && !expectedArtifact.account) {
|
|
55
|
+
const availableArtifacts = ExpectedArtifactService.getExpectedArtifactsAvailableToStage(
|
|
56
|
+
stage,
|
|
57
|
+
this.props.pipeline,
|
|
58
|
+
);
|
|
59
|
+
const expectedMatchedArtifact = availableArtifacts.find((a) => a.id === expectedArtifact.id);
|
|
60
|
+
if (expectedMatchedArtifact && expectedMatchedArtifact.matchArtifact) {
|
|
61
|
+
this.props.formik.setFieldValue(
|
|
62
|
+
`inputArtifacts[0].account`,
|
|
63
|
+
expectedMatchedArtifact.matchArtifact.artifactAccount,
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
44
68
|
AccountService.getArtifactAccounts().then((artifactAccounts) => {
|
|
45
69
|
this.setState({
|
|
46
70
|
gitRepoArtifactAccountNames: artifactAccounts
|
|
@@ -56,9 +80,16 @@ export class BakeHelmConfigForm extends React.Component<IFormikStageConfigInject
|
|
|
56
80
|
this.props.formik.setFieldValue(`inputArtifacts[${index}].account`, artifact.artifactAccount);
|
|
57
81
|
};
|
|
58
82
|
|
|
59
|
-
private onTemplateArtifactSelected = (
|
|
60
|
-
this.props.formik.setFieldValue(`inputArtifacts[${index}].id`, id);
|
|
83
|
+
private onTemplateArtifactSelected = (artifact: IExpectedArtifact, index: number) => {
|
|
84
|
+
this.props.formik.setFieldValue(`inputArtifacts[${index}].id`, artifact.id);
|
|
61
85
|
this.props.formik.setFieldValue(`inputArtifacts[${index}].artifact`, null);
|
|
86
|
+
// Set the account to matchArtifact.artifactAccount if it exists.
|
|
87
|
+
// This account value will be used to determine if the Helm Chart File Path should be displayed.
|
|
88
|
+
if (artifact.matchArtifact) {
|
|
89
|
+
this.props.formik.setFieldValue(`inputArtifacts[${index}].account`, artifact.matchArtifact.artifactAccount);
|
|
90
|
+
} else {
|
|
91
|
+
this.props.formik.setFieldValue(`inputArtifacts[${index}].account`, null);
|
|
92
|
+
}
|
|
62
93
|
};
|
|
63
94
|
|
|
64
95
|
private addInputArtifact = () => {
|
|
@@ -119,7 +150,6 @@ export class BakeHelmConfigForm extends React.Component<IFormikStageConfigInject
|
|
|
119
150
|
|
|
120
151
|
public render() {
|
|
121
152
|
const stage = this.props.formik.values;
|
|
122
|
-
|
|
123
153
|
return (
|
|
124
154
|
<>
|
|
125
155
|
<h4>Helm Options</h4>
|
|
@@ -150,7 +180,7 @@ export class BakeHelmConfigForm extends React.Component<IFormikStageConfigInject
|
|
|
150
180
|
onArtifactEdited={(artifact) => {
|
|
151
181
|
this.onTemplateArtifactEdited(artifact, 0);
|
|
152
182
|
}}
|
|
153
|
-
onExpectedArtifactSelected={(artifact: IExpectedArtifact) => this.onTemplateArtifactSelected(artifact
|
|
183
|
+
onExpectedArtifactSelected={(artifact: IExpectedArtifact) => this.onTemplateArtifactSelected(artifact, 0)}
|
|
154
184
|
pipeline={this.props.pipeline}
|
|
155
185
|
stage={stage}
|
|
156
186
|
/>
|
|
@@ -180,7 +210,7 @@ export class BakeHelmConfigForm extends React.Component<IFormikStageConfigInject
|
|
|
180
210
|
this.onTemplateArtifactEdited(artifact, index + 1);
|
|
181
211
|
}}
|
|
182
212
|
onExpectedArtifactSelected={(artifact: IExpectedArtifact) =>
|
|
183
|
-
this.onTemplateArtifactSelected(artifact
|
|
213
|
+
this.onTemplateArtifactSelected(artifact, index + 1)
|
|
184
214
|
}
|
|
185
215
|
pipeline={this.props.pipeline}
|
|
186
216
|
stage={stage}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
import { IScope
|
|
3
|
+
import type { IScope } from 'angular';
|
|
4
|
+
import { mock } from 'angular';
|
|
4
5
|
import { FindArtifactFromExecutionCtrl } from './findArtifactFromExecution.controller';
|
|
5
6
|
|
|
6
7
|
describe('Find Artifact From Execution Controller:', function () {
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import type { IDeferred, IQService, IRootScopeService, IScope } from 'angular';
|
|
2
|
+
import { mock } from 'angular';
|
|
3
|
+
|
|
1
4
|
import { mockHttpClient } from '../../../../api/mock/jasmine';
|
|
2
5
|
import { tick } from '../../../../api/mock/mockHttpUtils';
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
import { ExecutionService } from '../../../service/execution.service';
|
|
6
|
+
import type { ManualJudgmentService } from './manualJudgment.service';
|
|
7
|
+
import { MANUAL_JUDGMENT_SERVICE } from './manualJudgment.service';
|
|
8
|
+
import type { ExecutionService } from '../../../service/execution.service';
|
|
7
9
|
|
|
8
10
|
describe('Service: manualJudgment', () => {
|
|
9
11
|
let $scope: IScope, service: ManualJudgmentService, $q: IQService, executionService: ExecutionService;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { IControllerService, IRootScopeService, IScope } from 'angular';
|
|
2
|
+
import { mock } from 'angular';
|
|
2
3
|
|
|
3
4
|
import { TRAVIS_EXECUTION_DETAILS_CONTROLLER, TravisExecutionDetailsCtrl } from './travisExecutionDetails.controller';
|
|
4
5
|
|
|
@@ -18,7 +19,9 @@ describe('Travis Execution Details Controller:', () => {
|
|
|
18
19
|
$scope.stage = stage;
|
|
19
20
|
return $ctrl(TravisExecutionDetailsCtrl, {
|
|
20
21
|
$scope,
|
|
21
|
-
executionDetailsSectionService: {
|
|
22
|
+
executionDetailsSectionService: {
|
|
23
|
+
synchronizeSection: (_availableSections: string[], fn: () => any) => fn(),
|
|
24
|
+
},
|
|
22
25
|
});
|
|
23
26
|
};
|
|
24
27
|
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import Spy = jasmine.Spy;
|
|
2
|
-
import {
|
|
2
|
+
import type { IControllerService, IQService, IRootScopeService, IScope } from 'angular';
|
|
3
|
+
import { mock } from 'angular';
|
|
3
4
|
|
|
4
5
|
import { IgorService } from '../../../../ci/igor.service';
|
|
5
|
-
import { IJobConfig, IParameterDefinitionList } from '../../../../domain';
|
|
6
|
+
import type { IJobConfig, IParameterDefinitionList } from '../../../../domain';
|
|
6
7
|
import { TRAVIS_STAGE, TravisStage } from './travisStage';
|
|
7
8
|
|
|
8
9
|
describe('Travis Stage Controller', () => {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { mock } from 'angular';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import type { UnmatchedStageTypeStageCtrl } from './unmatchedStageTypeStage.controller';
|
|
4
|
+
import { UNMATCHED_STAGE_TYPE_STAGE_CTRL } from './unmatchedStageTypeStage.controller';
|
|
4
5
|
|
|
5
6
|
describe('Controller: UnmatchedStageTypeStageCtrl', () => {
|
|
6
7
|
let ctrl: UnmatchedStageTypeStageCtrl;
|
|
@@ -66,11 +66,13 @@ export class SkipWait extends React.Component<ISkipWaitProps, ISkipWaitState> {
|
|
|
66
66
|
|
|
67
67
|
public render() {
|
|
68
68
|
const stage = this.props.stage;
|
|
69
|
+
const waitMs = stage.context.waitTime * 1000;
|
|
70
|
+
|
|
69
71
|
return (
|
|
70
72
|
<div>
|
|
71
73
|
<div>
|
|
72
74
|
<b>Wait time: </b>
|
|
73
|
-
{stage.context.waitTime} seconds
|
|
75
|
+
{stage.context.waitTime > 3600 ? duration(waitMs) : `${stage.context.waitTime} seconds`}
|
|
74
76
|
{stage.context.skipRemainingWait && <span>(skipped after {duration(stage.runningTimeInMs)})</span>}
|
|
75
77
|
</div>
|
|
76
78
|
{stage.isRunning && (
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { IControllerService, IRootScopeService, IScope } from 'angular';
|
|
2
|
+
import { mock } from 'angular';
|
|
2
3
|
|
|
3
4
|
import {
|
|
4
5
|
WERCKER_EXECUTION_DETAILS_CONTROLLER,
|
|
@@ -21,7 +22,9 @@ describe('Wercker Execution Details Controller:', () => {
|
|
|
21
22
|
$scope.stage = stage;
|
|
22
23
|
return $ctrl(WerckerExecutionDetailsCtrl, {
|
|
23
24
|
$scope,
|
|
24
|
-
executionDetailsSectionService: {
|
|
25
|
+
executionDetailsSectionService: {
|
|
26
|
+
synchronizeSection: (_availableSections: string[], fn: () => any) => fn(),
|
|
27
|
+
},
|
|
25
28
|
});
|
|
26
29
|
};
|
|
27
30
|
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import Spy = jasmine.Spy;
|
|
2
|
-
import {
|
|
2
|
+
import type { IControllerService, IQService, IRootScopeService, IScope } from 'angular';
|
|
3
|
+
import { mock } from 'angular';
|
|
3
4
|
|
|
4
5
|
import { IgorService } from '../../../../ci/igor.service';
|
|
5
|
-
import { IJobConfig, IParameterDefinitionList } from '../../../../domain';
|
|
6
|
+
import type { IJobConfig, IParameterDefinitionList } from '../../../../domain';
|
|
6
7
|
import { WERCKER_STAGE, WerckerStage } from './werckerStage';
|
|
7
8
|
|
|
8
9
|
describe('Wercker Stage Controller', () => {
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { mock } from 'angular';
|
|
2
|
+
import type { ReactWrapper } from 'enzyme';
|
|
3
|
+
import { mount } from 'enzyme';
|
|
2
4
|
import React from 'react';
|
|
3
|
-
import { mount, ReactWrapper } from 'enzyme';
|
|
4
5
|
|
|
5
|
-
import {
|
|
6
|
-
import { PIPELINE_TEMPLATE_MODULE } from './pipelineTemplate.module';
|
|
6
|
+
import type { VariableType } from './PipelineTemplateReader';
|
|
7
7
|
import { Variable } from './Variable';
|
|
8
|
-
import { IVariableError, IVariableProps } from './inputs/variableInput.service';
|
|
9
|
-
import {
|
|
8
|
+
import type { IVariableError, IVariableProps } from './inputs/variableInput.service';
|
|
9
|
+
import { PIPELINE_TEMPLATE_MODULE } from './pipelineTemplate.module';
|
|
10
|
+
import { REACT_MODULE } from '../../../reactShims/react.module';
|
|
10
11
|
|
|
11
12
|
describe('Variable component', () => {
|
|
12
13
|
const generateProps = (type: VariableType, value: any) => {
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { IQService, IScope } from 'angular';
|
|
2
|
+
import { mock } from 'angular';
|
|
2
3
|
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
ConfigurePipelineTemplateModalController,
|
|
6
|
-
} from './configurePipelineTemplateModal.controller';
|
|
7
|
-
import { IVariable } from './inputs/variableInput.service';
|
|
4
|
+
import { PipelineTemplateReader } from './PipelineTemplateReader';
|
|
5
|
+
import type { Application } from '../../../application/application.model';
|
|
8
6
|
import { ApplicationModelBuilder } from '../../../application/applicationModel.builder';
|
|
9
|
-
import {
|
|
7
|
+
import type { ConfigurePipelineTemplateModalController } from './configurePipelineTemplateModal.controller';
|
|
8
|
+
import { CONFIGURE_PIPELINE_TEMPLATE_MODAL_CTRL } from './configurePipelineTemplateModal.controller';
|
|
9
|
+
import type { IVariable } from './inputs/variableInput.service';
|
|
10
10
|
import { PIPELINE_TEMPLATE_MODULE } from './pipelineTemplate.module';
|
|
11
|
-
import { PipelineTemplateReader } from './PipelineTemplateReader';
|
|
12
11
|
|
|
13
12
|
describe('Controller: ConfigurePipelineTemplateModalCtrl', () => {
|
|
14
13
|
let ctrl: ConfigurePipelineTemplateModalController, $scope: IScope, $q: IQService, application: Application;
|
package/src/pipeline/config/templates/v2/configurePipelineTemplateModalV2.controller.spec.ts
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { IQService, IScope } from 'angular';
|
|
2
|
+
import { mock } from 'angular';
|
|
2
3
|
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
ConfigurePipelineTemplateModalV2Controller,
|
|
6
|
-
} from './configurePipelineTemplateModalV2.controller';
|
|
7
|
-
import { IVariable } from '../inputs/variableInput.service';
|
|
4
|
+
import { PipelineTemplateReader } from '../PipelineTemplateReader';
|
|
5
|
+
import type { Application } from '../../../../application/application.model';
|
|
8
6
|
import { ApplicationModelBuilder } from '../../../../application/applicationModel.builder';
|
|
9
|
-
import {
|
|
7
|
+
import type { ConfigurePipelineTemplateModalV2Controller } from './configurePipelineTemplateModalV2.controller';
|
|
8
|
+
import { CONFIGURE_PIPELINE_TEMPLATE_MODAL_V2_CTRL } from './configurePipelineTemplateModalV2.controller';
|
|
9
|
+
import type { IVariable } from '../inputs/variableInput.service';
|
|
10
10
|
import { PIPELINE_TEMPLATE_MODULE } from '../pipelineTemplate.module';
|
|
11
|
-
import { PipelineTemplateReader } from '../PipelineTemplateReader';
|
|
12
11
|
|
|
13
12
|
describe('Controller: ConfigurePipelineTemplateModalV2Ctrl', () => {
|
|
14
13
|
let ctrl: ConfigurePipelineTemplateModalV2Controller, $scope: IScope, $q: IQService, application: Application;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { hri as HumanReadableIds } from 'human-readable-ids';
|
|
2
2
|
|
|
3
|
-
import { IPipeline, IPipelineTemplateV2 } from '../../../../domain';
|
|
3
|
+
import type { IPipeline, IPipelineTemplateV2 } from '../../../../domain';
|
|
4
4
|
import { PipelineTemplateV2Service } from './pipelineTemplateV2.service';
|
|
5
5
|
import { UUIDGenerator } from '../../../../utils';
|
|
6
6
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { mount } from 'enzyme';
|
|
2
|
+
import React from 'react';
|
|
3
3
|
|
|
4
|
+
import type { ITriggersPageContentProps } from './TriggersPageContent';
|
|
5
|
+
import { TriggersPageContent } from './TriggersPageContent';
|
|
4
6
|
import { ApplicationModelBuilder } from '../../../application';
|
|
5
7
|
import { ArtifactReferenceService } from '../../../artifact/ArtifactReferenceService';
|
|
6
|
-
import { IExpectedArtifact, ITrigger } from '../../../domain';
|
|
8
|
+
import type { IExpectedArtifact, ITrigger } from '../../../domain';
|
|
7
9
|
import { Registry } from '../../../registry';
|
|
8
10
|
|
|
9
|
-
import { ITriggersPageContentProps, TriggersPageContent } from './TriggersPageContent';
|
|
10
|
-
|
|
11
11
|
describe('<TriggersPageContent />', () => {
|
|
12
12
|
let removeReferencesFromStagesSpy: jasmine.Spy;
|
|
13
13
|
let updatePipelineSpy: jasmine.Spy;
|
|
@@ -164,8 +164,7 @@ export function TriggersPageContent(props: ITriggersPageContentProps) {
|
|
|
164
164
|
{...inputProps}
|
|
165
165
|
text={
|
|
166
166
|
<>
|
|
167
|
-
Disable automated triggers during quiet period
|
|
168
|
-
<strong>does not affect Pipeline triggers</strong>).
|
|
167
|
+
Disable automated triggers during quiet period.
|
|
169
168
|
<HelpField id="pipeline.config.triggers.respectQuietPeriod" />
|
|
170
169
|
</>
|
|
171
170
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { IArtifact } from '../../../../../domain';
|
|
2
|
-
|
|
3
1
|
import { setNameAndVersionFromReference } from './DockerArtifactEditor';
|
|
2
|
+
import type { IArtifact } from '../../../../../domain';
|
|
4
3
|
|
|
5
4
|
describe('defaultDocker.artifact', () => {
|
|
6
5
|
it('parses Docker image references correctly', () => {
|
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
import { mock } from 'angular';
|
|
2
|
-
import Spy = jasmine.Spy;
|
|
3
|
-
import { SETTINGS } from '../../../config/settings';
|
|
4
2
|
|
|
5
|
-
import {
|
|
3
|
+
import type { ICustomValidator, IPipelineValidationResults, IValidatorConfig } from './PipelineConfigValidator';
|
|
4
|
+
import { PipelineConfigValidator } from './PipelineConfigValidator';
|
|
5
|
+
import { SETTINGS } from '../../../config/settings';
|
|
6
|
+
import type { IPipeline, IStage, IStageTypeConfig } from '../../../domain';
|
|
7
|
+
import { Registry } from '../../../registry';
|
|
8
|
+
import type { IRequiredFieldValidationConfig } from './requiredField.validator';
|
|
6
9
|
import { ServiceAccountReader } from '../../../serviceAccount/ServiceAccountReader';
|
|
10
|
+
import type {
|
|
11
|
+
IServiceAccountAccessValidationConfig,
|
|
12
|
+
ITriggerWithServiceAccount,
|
|
13
|
+
} from './serviceAccountAccess.validator';
|
|
7
14
|
import { PipelineConfigService } from '../services/PipelineConfigService';
|
|
8
|
-
import {
|
|
15
|
+
import type { IStageBeforeTypeValidationConfig } from './stageBeforeType.validator';
|
|
16
|
+
import type { IStageOrTriggerBeforeTypeValidationConfig } from './stageOrTriggerBeforeType.validator';
|
|
17
|
+
import type { ITargetImpedanceValidationConfig } from './targetImpedance.validator';
|
|
9
18
|
|
|
10
|
-
import
|
|
11
|
-
ICustomValidator,
|
|
12
|
-
IPipelineValidationResults,
|
|
13
|
-
IValidatorConfig,
|
|
14
|
-
PipelineConfigValidator,
|
|
15
|
-
} from './PipelineConfigValidator';
|
|
16
|
-
import { IRequiredFieldValidationConfig } from './requiredField.validator';
|
|
17
|
-
import { IServiceAccountAccessValidationConfig, ITriggerWithServiceAccount } from './serviceAccountAccess.validator';
|
|
18
|
-
import { IStageBeforeTypeValidationConfig } from './stageBeforeType.validator';
|
|
19
|
-
import { IStageOrTriggerBeforeTypeValidationConfig } from './stageOrTriggerBeforeType.validator';
|
|
20
|
-
import { ITargetImpedanceValidationConfig } from './targetImpedance.validator';
|
|
19
|
+
import Spy = jasmine.Spy;
|
|
21
20
|
|
|
22
21
|
describe('pipelineConfigValidator', () => {
|
|
23
22
|
let pipeline: IPipeline, validate: () => void, validationResults: IPipelineValidationResults, $q: ng.IQService;
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import type { IQService, IScope } from 'angular';
|
|
2
|
+
import { mock } from 'angular';
|
|
3
3
|
import { shallow } from 'enzyme';
|
|
4
|
+
import React from 'react';
|
|
4
5
|
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { Application } from '../../application/application.model';
|
|
6
|
+
import type { ICreatePipelineModalProps } from './CreatePipelineModal';
|
|
7
|
+
import { CreatePipelineModal } from './CreatePipelineModal';
|
|
8
|
+
import type { Application } from '../../application/application.model';
|
|
8
9
|
import { ApplicationModelBuilder } from '../../application/applicationModel.builder';
|
|
9
|
-
import { IPipeline } from '../../domain';
|
|
10
|
-
import { SETTINGS } from '../../config/settings';
|
|
11
10
|
import { PipelineConfigService } from '../config/services/PipelineConfigService';
|
|
11
|
+
import { SETTINGS } from '../../config/settings';
|
|
12
|
+
import { PipelineTemplateReader } from '../config/templates/PipelineTemplateReader';
|
|
13
|
+
import type { IPipeline } from '../../domain';
|
|
12
14
|
|
|
13
15
|
// Disable CreatePipelineModal tests until enzyme supports React 16 https://github.com/airbnb/enzyme/issues/1553
|
|
14
16
|
// CreatePipelineModal uses Overridable() which uses React.forwardRef
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type { StateParams, StateService } from '@uirouter/angularjs';
|
|
1
2
|
import { mock, noop } from 'angular';
|
|
2
|
-
import { StateParams, StateService } from '@uirouter/angularjs';
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import type { ExecutionDetailsSectionService } from './executionDetailsSection.service';
|
|
5
|
+
import { EXECUTION_DETAILS_SECTION_SERVICE } from './executionDetailsSection.service';
|
|
5
6
|
|
|
6
7
|
describe('executionDetailsSectionService', function () {
|
|
7
8
|
let $state: StateService,
|