zalando-stups / senza

Deploy immutable application stacks and create and execute AWS CloudFormation templates in a sane way
https://pypi.python.org/pypi/stups-senza
Other
96 stars 72 forks source link

Add hyphen support for versions besides alphanumerical characters #501

Closed evangelion1204 closed 6 years ago

evangelion1204 commented 6 years ago

Hi,

We would need support for also hyphens in the version and there seems to be no limitation from AWS.

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 89.575% when pulling 715885503f424fb597d5ee3267bc3c34c0be47a9 on evangelion1204:adjust-version-to-match-aws-specification into fff8cf69b43f5ed958d1d8c960179c590114a885 on zalando-stups:master.

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 89.575% when pulling 715885503f424fb597d5ee3267bc3c34c0be47a9 on evangelion1204:adjust-version-to-match-aws-specification into fff8cf69b43f5ed958d1d8c960179c590114a885 on zalando-stups:master.

mikkeloscar commented 6 years ago

I think senza (and maybe other components) treats the last part of the stackname as version e.g. name-<version> So I suspect having dashes in the version will cause problems where this convention is expected.

evangelion1204 commented 6 years ago

That might be true, but versions need to match the docker tags that are pulled for deployment. I would like to do something like feature-branch/PR based deployments. So I need to add either the PR id or branch-name either to the version <my-branch>-XXX => catalog:feature-1 (seems to be clean) or to artifact name catalog-<branch-name> => catalog-feature:1 which would spam our artifacts.

hjacobs commented 6 years ago

👎

evangelion1204 commented 6 years ago

Maybe what I want to achieve is a kind of hack. But as long as stackname is bound directly to the artifact this will always ne an issue or is there any workaround?

Ok, found a way to do it that I was not aware, we define the source manually in out senza files and thats the place where I can inject a prefix for pierone. I will close the PR.

evangelion1204 commented 6 years ago

Solved via senza definition source taupage config.

hjacobs commented 6 years ago

@evangelion1204 I think there is a misunderstanding: your stack name does not need to be bound to the artifact version! You can use arbitrary stack names (like "v1", "v2" or even "green", "blue") and have semantic Docker artifact versions like "1.2.0-13".