0
votes

I've set up my codedeploy appspec.yml file currently located in my root folder. I have a CI/CD that runs 2 pipelines depending on which branch the new code is pushed/merged into. I have one for production and one for staging. Previously i've used the s3 artifacts from the staging to build the production but i want to change it so it runs the production pipeline and deploys when i push to master. The issue is that in order to build it i have some hooks running bash scripts where the content is different from the staging appspec file. Any ideas on how it is possible to have multiple appspec files for aws codedeploy?

BR Lukas

1
it is not possible...LAMG
the solution is to modify this during build fx. if you have 2 appspec files. Then depending fx. on which branch you're on you can rename the one you want to run during build.LAMG

1 Answers

1
votes

You can't rename artifacts on the fly. You can do it in an intermediate step before invoking CodeDeploy. BTW, you say you are building different versions for different environments, a better approach would be to user either instance / user metadata or tags.