-
Notifications
You must be signed in to change notification settings - Fork 902
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(artifacts): Exclude unmatchable expected artifact types #6709
fix(artifacts): Exclude unmatchable expected artifact types #6709
Conversation
jkschneider
commented
Mar 18, 2019
- Exclude front50 artifact account from trigger artifact constraints.
- Exclude front50, docker, and k8s artifact accounts from CF deploy stage configuration.
* Exclude front50 artifact account from trigger artifact constraints. * Exclude front50, docker, and k8s artifact accounts from CF deploy stage configuration.
78fc49c
to
ea8ae4f
Compare
We now constrain the selection of an artifact account for a Match Artifact for certain trigger types. For example, it isn't possible that an Artifactory trigger will produce an artifact that is matchable to a Github artifact account. At some point if we remove Notice though, that the default artifact account selection is not similarly constrained. We do strike K8S and Front50 artifact accounts from the Default Artifact on all trigger types, however. |
ea8ae4f
to
6478e8b
Compare
|
||
export const excludeAllTypesExcept = (...types: RegExp[]) => | ||
Object.keys(ArtifactTypePatterns) | ||
.map(k => (ArtifactTypePatterns as IArtifactTypePatterns)[k]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can achieve the same as Object.keys(o).map(k => o[k])
with Object.values(o)
.
I also suggest avoiding as
casts as much as possible. Giving ArtifactTypePatterns the IArtifactTypePatterns signature should let us leverage the type checker instead of short-circuiting it for this kind of thing:
export const ArtifactTypePatterns: IArtifactTypePatterns = {
// ...
};
Object.keys(ArtifactTypePatterns).map(k => ArtifactTypePatterns[k]) // <- should now infer the type as RegExp[]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think Object.values()
was introduced in ES2017, but I believe we are still using ES2015? Originally I did the as cast because I found it undesirable to export IArtifactTypePatterns
, but I guess there is no issue with that, so will change it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
872a330
to
b9a2eb5
Compare
@spinnakerbot cherry-pick 1.13 |
* Exclude front50 artifact account from trigger artifact constraints. * Exclude front50, docker, and k8s artifact accounts from CF deploy stage configuration. * Constrain artifact accounts for match artifact by trigger type * Assign type to ArtifactTypePatterns
Cherry pick successful: #6728 |
…6728) * Exclude front50 artifact account from trigger artifact constraints. * Exclude front50, docker, and k8s artifact accounts from CF deploy stage configuration. * Constrain artifact accounts for match artifact by trigger type * Assign type to ArtifactTypePatterns
#6758) * chore(core): Bump version to 0.0.346 4bc6ecd fix(core/projects): Submit task against the 'spinnaker' application (#6748) 1f58407 feat(amazon): show certificate upload/expiration when selected for load balancers (#6731) efcec96 feat(core): add markdown functionality to custom app banners (#6745) 9c14b02 feat(mptv2): add a search input to the mptv2 list (#6742) a84eda8 fix(concourse): Support manual trigger execution by build number (#6738) 5529d53 fix(core): Grey out execution actions for mptv2 pipelines (#6734) 1c9e075 feat(ecs): docker image selection (#6687) 2fd608a feat(mptv2): add list screen for pipeline templates (#6723) 5cd0aa0 fix:(core): Replace copy icon with descriptive text in template modal (#6725) 0d68c80 refactor(forms): Creating contexts for Layout and Help (#6718) 7ab32f9 fix(stages): Do not delete stageTimeoutMs when rendering (#6729) 03fa0d9 fix(artifacts): Exclude unmatchable expected artifact types (#6709) * chore(amazon): Bump version to 0.0.182 f32aa23 refactor(titus): generalize ConfigBin and export it (#6757) 1f58407 feat(amazon): show certificate upload/expiration when selected for load balancers (#6731) 6083b3f fix(amazon): consider all target group names when creating new ones (#6727) * chore(titus): Bump version to 0.0.81 f32aa23 refactor(titus): generalize ConfigBin and export it (#6757)
2f958d9 fix(cf): Change CUPS label to Route Service URL (spinnaker#7090) 8398d77 refactor(*): make accountExtractor return an array of strings (spinnaker#7068) 7cbf241 feature(cf): server group details creation timestamp links to pipeline (spinnaker#7062) b712673 fix(cf): fix deploy service manifest artifact selection (spinnaker#7059) 64589b6 feat(cf): Accepting both JSON and YAML in the Deploy Service Configuration stage `parameters` field (spinnaker#7042) ce8a163 fix(cf): add Artifactory link (spinnaker#6994) 84db0ef fix(cf): reorg build info details on server group detail and summary (spinnaker#6983) f646a5a fix(cf): Clone sg modal appears. Removed unused lb code. (spinnaker#6915) 7312bb5 feat(cf): add build info to server group (spinnaker#6912) 07895b0 fix(cf): Allow deletion of non existing cluster (spinnaker#6907) 7269d2e feat(cf): Added support for rolling red black deployments (spinnaker#6897) 632538d refactor(cf): remove destination from the SG command model (spinnaker#6892) 62c2b51 feat(cf): Reduce angular dependencies (spinnaker#6893) 662b154 feat(cf): Delete Service Key pipeline stage (spinnaker#6844) 33373c4 feat(cf): Remove React shims from pipeline stages (spinnaker#6856) 902613d fix(cloudfoundry): ensure basic validation of artifacts (spinnaker#6851) 7338f7d refactor(cf): use Observable to set state to prevent memory leaks (spinnaker#6832) ca36727 feat(cf): add deployment strategy to clone SG (spinnaker#6827) 36074c2 feat(cf): Create Service Key pipeline stage (spinnaker#6821) aad46c2 fix(provider/cf): Clone model so Orca monitors the correct foundation for up instances (spinnaker#6817) 476e0dd fix(provider/cf): Fix provider selection for resize stage in pipeline (spinnaker#6754) 72e164d refactor(core): de-angularize ApplicationModelBuilder, fix project executions (spinnaker#6802) 1a2af9a fix(provider/cf): Make expected artifacts selectable as clone manifests (spinnaker#6796) 8422d6a fix(pipeline): Fix target impedance validator for clone server group (spinnaker#6785) e0a8639 fix(cf): Repair Rollback Cluster pipeline stage (spinnaker#6743) c37500c fix(cf): Map/Unmap LBs and UI cleanup (spinnaker#6737) 09e96a2 fix(provider/cf): Default clone operations to start on creation (spinnaker#6735) 03fa0d9 fix(artifacts): Exclude unmatchable expected artifact types (spinnaker#6709) 29b001b fix({core,cloudfoundry}/deploy): better red/black, rolling red/black help text (spinnaker#6699) b4ca2b8 fix(cf): Share / unshare execution details (spinnaker#6710) f80dfc5 feat(cf): prefix apps manager and metrics urls with https:// (spinnaker#6637) d00b45f fix(cf): map single route at a time (spinnaker#6700) dafedac feat(cf): Add Updatable Flag To Create Service (spinnaker#6706) facc737 fix(cf): provide meaningful labels in resize dialog (spinnaker#6704) 51eeba4 chore(core): upgrade the version to formik 1.4.1 (spinnaker#6705) 4f826d1 fix(cf): fix the alignment issue for artifacts in deploy SG (spinnaker#6701) e2940b4 feat(cf): Share/Unshare services (spinnaker#6685) 009d8c0 fix(cf): populate saved pipeline stage data (spinnaker#6689) 8f866ff fix(cf): make Deploy Service pipeline stage work again (spinnaker#6677) de57adf refactor(cf): Adopt artifact model in deploy stages (spinnaker#6659) 2224c5e fix(cf): rename text from load balancers to load balancer (spinnaker#6643) 39fe4c6 feat(cf): Display details in pipeline for services 7d5fc34 chore(prettier): Just Use Prettier™ (spinnaker#6600) 2277713 feat(cf): Use spinnaker's built-in timeouts (spinnaker#6476) cc52bee chore(angularjs): Remove all 'ngInject'; in favor of explicit DI annotation b6bab1e chore(prettier): Just Use Prettier™ f3fd790 chore(angularjs): Explicitly annotate all AngularJS injection points b673d2c fix(cf): pipeline edit deploy server group (spinnaker#6576) 26471c4 feat(cf): add clone SG pipeline stage (spinnaker#6555) 93d83d6 fix(eslint): Fix eslint warnings for @typescript-eslint/no-namespace ddbe208 fix(eslint): Fix eslint warnings for no-useless-escape 8cba7ac fix(eslint): Fix eslint warnings for no-case-declarations 7e4b457 fix(amazon): Display capacity as text if using SPEL (spinnaker#6535) a8c1749 chore(package): Just Update Prettier™ 46de5cf chore(cf): rename serviceName to serviceInstanceName (spinnaker#6523) 539457c fix(cf): fix SG pipeline modal display issues (spinnaker#6504) a35088a chore(webpack): Switch to TerserPlugin. Split bundles into ~5mb chunks 5f81f40 feat(cf): Add artifacts for user-defined services (spinnaker#6468) 5c49dd2 chore(typescript): Switch module from 'commonjs' to 'esnext' to emit raw dynamic 'import()' 0451046 chore(package): Add .npmignore to all packages 04bc98b feat(cf): Add Map/Unmap SGs and LBs 651b232 refactor(cloudfoundry/modal): Refactor cloudfoundry modals to use WizardPage component 6bdd9b0 feat(cf/serverGroup): Use discriminator 'type' field to improve type checking (spinnaker#6449) 6f608a0 fix(*): Remove all self closing tags in AngularJS templates Reference: angular/angular.js#1953 (comment) e5bf053 refactor(*): Don't use ts or js file extension in imports 98a85e9 chore(*): bump @types/enzyme@3.1.15, @types/jasmine@3.3.7, enzyme@3.8.0, enzyme-adapter-react-16@1.7.1, karma@4.0.0, karma-jasmine@2.0.1, karma-webpack@3.0.5, typescript@^3.2.4, jasmine-core@3.3.0 - disable jasmine 3.0's random test order by default feature c9e93df refactor(cf): make SG inputs reusable components 8106122 feat(cf): Reactify resize and rollback modals (spinnaker#6325) 3983700 feat(cf): create AccountRegionClusterSelector React component (spinnaker#6314) f039770 refactor(provider/cf): reactify instance details (spinnaker#6172) 655f731 refactor(cf): reactify load balancer details pane (spinnaker#6295) f3d35e1 feat(cf): add user provided service support (spinnaker#6293) 16fd07d refactor(cf): separate SG details sections (spinnaker#6291) 86baac9 refactor(*): use mask-image CSS for cloud provider logos (spinnaker#6280) 1bb55ac feat(provider/cf): support multiple buildpacks (spinnaker#6223) 294df78 fix(provider/cf): show SG and Instance info with LoadBalancers (spinnaker#6224) 283fb36 refactor(provider/cf): refactor create SG to use FormikFormField (spinnaker#6212) b3f7e91 fix(provider/cf): do not trigger validation on serviceName when hidden (spinnaker#6197) 42e1790 feat(provider/cf): add SG clone action (spinnaker#6162) b1740a4 feat(provider/cf): Server Group Detail port is default health check type (spinnaker#6159) 307da1b refactor(core/account): Refactor AccountSelectInput to use 'value' prop 6f7f543 refactor(core/account): rename AccountSelectField to AccountSelectInput 142680b feat(provider/cf): add the metrics link to SG details (spinnaker#6147) d5c2511 feat(provider/cf): deploy Service via manifest (spinnaker#6094) 6b8188b chore(*): Add core alias to module tsconfigs fa9229c feat(provider/cf): shorten the appsManagerUri (spinnaker#6105) cd62a34 fix(provider/cf): make validators more robust (spinnaker#6047) 27a26b3 fix(provider/cf): use ICapacity type for scaling server groups 5165973 feat(provider/cf): option to define timeouts for service creation/destroy 790c4b6 feat(provider/cf): display cf health check details for app (spinnaker#6081) 1f47d7c fix(provider/cf): populate red/black strategy additional fields (spinnaker#6072) c8b8456 refactor(provider/cf): use custom implementation of DeploymentStrategySelector 15de39f refactor(provider/cf): reorder artifact types 72325a4 feat(provider/cf): display service tags for server group fd22aa0 feat(provider/cf): Allow health check config on deploy 25a9aa8 fix(provider/cf): render start application checkbox value 4a67136 refactor(provider/cf): use DeploymentStrategySelector react component 8847146 refactor(provider/cf): reactify pipeline stages 35cd08a fix(provider/cf): add missing trigger to deploys 081b48a refactor(provider/cf): make better use of formik library capabilities 23cd1d6 refactor(provider/cf): improve error messages on multiple route issues c8cb9da fix(provider/cf): handle different success/error cases to display checksum 90e6864 fix(provider/cf): allow only alphanumeric and '_' for env variable keys 2634178 chore(provider/cf): rename "Add services" to "Bind services" 57b1e49 chore(core/presentation): Update formik from 0.11.11 to 1.3.1 (spinnaker#5917) c0842ad fix(provider/cf): fetch services on a per-region basis d80e2f6 fix(provider/cf): ensure regions are initialized before rendering 4db9789 fix(provider/cf): fix deploy stage configuration from existing server group 73ed9ae refactor(provider/cf): rename deleteService to destroyService c8fae53 fix(provider/cf): fix environment variable definition for CF deployments 8e23f8f refactor(*): Replace all uses of wrapped AccountSelectField with react version (spinnaker#5832) 4348deb fix(provider/cf): create servergroup ux improvements 46989b4 fix(provider/cf): repair null errors in deploy
2f958d9 fix(cf): Change CUPS label to Route Service URL (#7090) 8398d77 refactor(*): make accountExtractor return an array of strings (#7068) 7cbf241 feature(cf): server group details creation timestamp links to pipeline (#7062) b712673 fix(cf): fix deploy service manifest artifact selection (#7059) 64589b6 feat(cf): Accepting both JSON and YAML in the Deploy Service Configuration stage `parameters` field (#7042) ce8a163 fix(cf): add Artifactory link (#6994) 84db0ef fix(cf): reorg build info details on server group detail and summary (#6983) f646a5a fix(cf): Clone sg modal appears. Removed unused lb code. (#6915) 7312bb5 feat(cf): add build info to server group (#6912) 07895b0 fix(cf): Allow deletion of non existing cluster (#6907) 7269d2e feat(cf): Added support for rolling red black deployments (#6897) 632538d refactor(cf): remove destination from the SG command model (#6892) 62c2b51 feat(cf): Reduce angular dependencies (#6893) 662b154 feat(cf): Delete Service Key pipeline stage (#6844) 33373c4 feat(cf): Remove React shims from pipeline stages (#6856) 902613d fix(cloudfoundry): ensure basic validation of artifacts (#6851) 7338f7d refactor(cf): use Observable to set state to prevent memory leaks (#6832) ca36727 feat(cf): add deployment strategy to clone SG (#6827) 36074c2 feat(cf): Create Service Key pipeline stage (#6821) aad46c2 fix(provider/cf): Clone model so Orca monitors the correct foundation for up instances (#6817) 476e0dd fix(provider/cf): Fix provider selection for resize stage in pipeline (#6754) 72e164d refactor(core): de-angularize ApplicationModelBuilder, fix project executions (#6802) 1a2af9a fix(provider/cf): Make expected artifacts selectable as clone manifests (#6796) 8422d6a fix(pipeline): Fix target impedance validator for clone server group (#6785) e0a8639 fix(cf): Repair Rollback Cluster pipeline stage (#6743) c37500c fix(cf): Map/Unmap LBs and UI cleanup (#6737) 09e96a2 fix(provider/cf): Default clone operations to start on creation (#6735) 03fa0d9 fix(artifacts): Exclude unmatchable expected artifact types (#6709) 29b001b fix({core,cloudfoundry}/deploy): better red/black, rolling red/black help text (#6699) b4ca2b8 fix(cf): Share / unshare execution details (#6710) f80dfc5 feat(cf): prefix apps manager and metrics urls with https:// (#6637) d00b45f fix(cf): map single route at a time (#6700) dafedac feat(cf): Add Updatable Flag To Create Service (#6706) facc737 fix(cf): provide meaningful labels in resize dialog (#6704) 51eeba4 chore(core): upgrade the version to formik 1.4.1 (#6705) 4f826d1 fix(cf): fix the alignment issue for artifacts in deploy SG (#6701) e2940b4 feat(cf): Share/Unshare services (#6685) 009d8c0 fix(cf): populate saved pipeline stage data (#6689) 8f866ff fix(cf): make Deploy Service pipeline stage work again (#6677) de57adf refactor(cf): Adopt artifact model in deploy stages (#6659) 2224c5e fix(cf): rename text from load balancers to load balancer (#6643) 39fe4c6 feat(cf): Display details in pipeline for services 7d5fc34 chore(prettier): Just Use Prettier™ (#6600) 2277713 feat(cf): Use spinnaker's built-in timeouts (#6476) cc52bee chore(angularjs): Remove all 'ngInject'; in favor of explicit DI annotation b6bab1e chore(prettier): Just Use Prettier™ f3fd790 chore(angularjs): Explicitly annotate all AngularJS injection points b673d2c fix(cf): pipeline edit deploy server group (#6576) 26471c4 feat(cf): add clone SG pipeline stage (#6555) 93d83d6 fix(eslint): Fix eslint warnings for @typescript-eslint/no-namespace ddbe208 fix(eslint): Fix eslint warnings for no-useless-escape 8cba7ac fix(eslint): Fix eslint warnings for no-case-declarations 7e4b457 fix(amazon): Display capacity as text if using SPEL (#6535) a8c1749 chore(package): Just Update Prettier™ 46de5cf chore(cf): rename serviceName to serviceInstanceName (#6523) 539457c fix(cf): fix SG pipeline modal display issues (#6504) a35088a chore(webpack): Switch to TerserPlugin. Split bundles into ~5mb chunks 5f81f40 feat(cf): Add artifacts for user-defined services (#6468) 5c49dd2 chore(typescript): Switch module from 'commonjs' to 'esnext' to emit raw dynamic 'import()' 0451046 chore(package): Add .npmignore to all packages 04bc98b feat(cf): Add Map/Unmap SGs and LBs 651b232 refactor(cloudfoundry/modal): Refactor cloudfoundry modals to use WizardPage component 6bdd9b0 feat(cf/serverGroup): Use discriminator 'type' field to improve type checking (#6449) 6f608a0 fix(*): Remove all self closing tags in AngularJS templates Reference: angular/angular.js#1953 (comment) e5bf053 refactor(*): Don't use ts or js file extension in imports 98a85e9 chore(*): bump @types/enzyme@3.1.15, @types/jasmine@3.3.7, enzyme@3.8.0, enzyme-adapter-react-16@1.7.1, karma@4.0.0, karma-jasmine@2.0.1, karma-webpack@3.0.5, typescript@^3.2.4, jasmine-core@3.3.0 - disable jasmine 3.0's random test order by default feature c9e93df refactor(cf): make SG inputs reusable components 8106122 feat(cf): Reactify resize and rollback modals (#6325) 3983700 feat(cf): create AccountRegionClusterSelector React component (#6314) f039770 refactor(provider/cf): reactify instance details (#6172) 655f731 refactor(cf): reactify load balancer details pane (#6295) f3d35e1 feat(cf): add user provided service support (#6293) 16fd07d refactor(cf): separate SG details sections (#6291) 86baac9 refactor(*): use mask-image CSS for cloud provider logos (#6280) 1bb55ac feat(provider/cf): support multiple buildpacks (#6223) 294df78 fix(provider/cf): show SG and Instance info with LoadBalancers (#6224) 283fb36 refactor(provider/cf): refactor create SG to use FormikFormField (#6212) b3f7e91 fix(provider/cf): do not trigger validation on serviceName when hidden (#6197) 42e1790 feat(provider/cf): add SG clone action (#6162) b1740a4 feat(provider/cf): Server Group Detail port is default health check type (#6159) 307da1b refactor(core/account): Refactor AccountSelectInput to use 'value' prop 6f7f543 refactor(core/account): rename AccountSelectField to AccountSelectInput 142680b feat(provider/cf): add the metrics link to SG details (#6147) d5c2511 feat(provider/cf): deploy Service via manifest (#6094) 6b8188b chore(*): Add core alias to module tsconfigs fa9229c feat(provider/cf): shorten the appsManagerUri (#6105) cd62a34 fix(provider/cf): make validators more robust (#6047) 27a26b3 fix(provider/cf): use ICapacity type for scaling server groups 5165973 feat(provider/cf): option to define timeouts for service creation/destroy 790c4b6 feat(provider/cf): display cf health check details for app (#6081) 1f47d7c fix(provider/cf): populate red/black strategy additional fields (#6072) c8b8456 refactor(provider/cf): use custom implementation of DeploymentStrategySelector 15de39f refactor(provider/cf): reorder artifact types 72325a4 feat(provider/cf): display service tags for server group fd22aa0 feat(provider/cf): Allow health check config on deploy 25a9aa8 fix(provider/cf): render start application checkbox value 4a67136 refactor(provider/cf): use DeploymentStrategySelector react component 8847146 refactor(provider/cf): reactify pipeline stages 35cd08a fix(provider/cf): add missing trigger to deploys 081b48a refactor(provider/cf): make better use of formik library capabilities 23cd1d6 refactor(provider/cf): improve error messages on multiple route issues c8cb9da fix(provider/cf): handle different success/error cases to display checksum 90e6864 fix(provider/cf): allow only alphanumeric and '_' for env variable keys 2634178 chore(provider/cf): rename "Add services" to "Bind services" 57b1e49 chore(core/presentation): Update formik from 0.11.11 to 1.3.1 (#5917) c0842ad fix(provider/cf): fetch services on a per-region basis d80e2f6 fix(provider/cf): ensure regions are initialized before rendering 4db9789 fix(provider/cf): fix deploy stage configuration from existing server group 73ed9ae refactor(provider/cf): rename deleteService to destroyService c8fae53 fix(provider/cf): fix environment variable definition for CF deployments 8e23f8f refactor(*): Replace all uses of wrapped AccountSelectField with react version (#5832) 4348deb fix(provider/cf): create servergroup ux improvements 46989b4 fix(provider/cf): repair null errors in deploy